Previous 199869 Revisions Next

r24059 Wednesday 3rd July, 2013 at 20:07:01 UTC by Angelo Salese
Some changes to PDP-11, nw
[src/emu/cpu/mc68hc11]mc68hc11.c
[src/mess/drivers]pdp11.c
[src/mess/machine]dccons.c

trunk/src/emu/cpu/mc68hc11/mc68hc11.c
r24058r24059
697697      case CPUINFO_STR_FAMILY:                    strcpy(info->s, "Motorola MC68HC11");   break;
698698      case CPUINFO_STR_VERSION:                   strcpy(info->s, "1.0");                 break;
699699      case CPUINFO_STR_SOURCE_FILE:                       strcpy(info->s, __FILE__);              break;
700      case CPUINFO_STR_CREDITS:                   strcpy(info->s, "Copyright Ville Linde"); break;
700      case CPUINFO_STR_CREDITS:                   strcpy(info->s, "Copyright Ville Linde & Angelo Salese"); break;
701701
702702      case CPUINFO_STR_FLAGS:
703703         sprintf(info->s, "%c%c%c%c%c%c%c%c",
trunk/src/mess/machine/dccons.c
r24058r24059
217217      {
218218         reg = ATAPI_REG_ERROR;
219219      }
220      if (reg == ATAPI_REG_CMDSTATUS)
221      {
222         dc_sysctrl_regs[SB_ISTEXT] &= ~IST_EXT_GDROM;
223         dc_update_interrupt_status();
224      }
220225      data = atapi_regs[reg];
221226
222227      #if 0
r24058r24059
382387#if 0
383388      switch( reg )
384389      {
385      case ATAPI_REG_DATA:
390         case ATAPI_REG_DATA:
386391         printf( "atapi_w: data=%02x\n", data );
387392            break;
388393         case ATAPI_REG_FEATURES:
r24058r24059
598603
599604   if (offset == 3)
600605   {
606      //debugger_break(machine());
607      //printf("%08x\n",atapi_regs[ATAPI_REG_CMDSTATUS]);
601608      return gdrom_alt_status;
602609   }
603610   else if (off >= 0x20)
trunk/src/mess/drivers/pdp11.c
r24058r24059
6464
6565        23/02/2009 Skeleton driver.
6666
67      Memory Map (converted from the annoying octal format from the manuals):
68      0x0000 - 0x00ff: irq vectors
69      0xe000: ROM
70      0xff68: "high speed reader and punch device status and buffer register"
71      0xff70 - 0xff7e: "teletype keyboard and punch device status and buffer register"
72      PDP-11 internal registers:
73      0xff80 - 0xffbf: "reserved for expansion of processor registers"
74      0xffc0: R0
75      0xffc2: R1
76      0xffc4: R2
77      0xffc6: R3
78      0xffc8: R4
79      0xffca: R5
80      0xffcc: R6 / SP
81      0xffce: R7 / PC
82      0xfffe: PSW
83
6784****************************************************************************/
6885
6986#include "emu.h"
r24058r24059
8299
83100   required_device<cpu_device> m_maincpu;
84101   required_device<generic_terminal_device> m_terminal;
85   DECLARE_READ16_MEMBER( term_r );
86   DECLARE_READ16_MEMBER( term_tx_status_r );
87   DECLARE_READ16_MEMBER( term_rx_status_r );
88   DECLARE_WRITE16_MEMBER( term_w );
102   DECLARE_READ16_MEMBER( teletype_ctrl_r );
103   DECLARE_WRITE16_MEMBER( teletype_ctrl_w );
89104   DECLARE_WRITE8_MEMBER( kbd_put );
90   UINT8 m_term_data;
91   UINT16 m_term_status;
105   UINT8 m_teletype_data;
106   UINT16 m_teletype_status;
92107   virtual void machine_reset();
93108   DECLARE_MACHINE_RESET(pdp11ub2);
94109   DECLARE_MACHINE_RESET(pdp11qb);
95110   void load9312prom(UINT8 *desc, UINT8 *src, int size);
96111};
97112
98WRITE16_MEMBER(pdp11_state::term_w)
113READ16_MEMBER(pdp11_state::teletype_ctrl_r)
99114{
100   m_terminal->write(space, 0, data);
101}
115   UINT16 res = 0;
102116
103READ16_MEMBER(pdp11_state::term_r)
104{
105   m_term_status = 0x0000;
106   return m_term_data;
107}
117   switch(offset)
118   {
119      /*
120         keyboard
121         ---- x--- ---- ---- busy bit
122         ---- ---- x--- ---- ready bit (set on character receive, clear on buffer read)
123         ---- ---- -x-- ---- irq enable
124         ---- ---- ---- ---x reader enable (?)
125      */
126      case 0: res = m_teletype_status; break; // reader status register (tks)
127      case 1: m_teletype_status &= ~0x80; res = m_teletype_data; break;// reader buffer register (tkb)
128      /*
129         printer
130         ---- ---- x--- ---- ready bit
131         ---- ---- -x-- ---- irq enable
132         ---- ---- ---- -x-- maintenance
133      */
134      case 2: res = 0x80; break; // punch status register (tps)
135      case 3: res = 0; break; // punch buffer register (tpb)
136   }
108137
109READ16_MEMBER(pdp11_state::term_tx_status_r)
110{   // always ready
111   return 0xffff;
138   return res;
112139}
113140
114READ16_MEMBER(pdp11_state::term_rx_status_r)
141WRITE16_MEMBER(pdp11_state::teletype_ctrl_w)
115142{
116   return m_term_status;
143   switch(offset)
144   {
145      case 3:
146         m_terminal->write(space, 0, data);
147         break;
148   }
117149}
118150
119151static ADDRESS_MAP_START(pdp11_mem, AS_PROGRAM, 16, pdp11_state)
120152   ADDRESS_MAP_UNMAP_HIGH
121153   AM_RANGE( 0x0000, 0xdfff ) AM_RAM  // RAM
122154   AM_RANGE( 0xea00, 0xfeff ) AM_ROM
123   AM_RANGE( 0xff70, 0xff71 ) AM_READ(term_rx_status_r)
124   AM_RANGE( 0xff72, 0xff73 ) AM_READ(term_r)
125   AM_RANGE( 0xff74, 0xff75 ) AM_READ(term_tx_status_r)
126   AM_RANGE( 0xff76, 0xff77 ) AM_WRITE(term_w)
155   AM_RANGE( 0xff70, 0xff77 ) AM_READWRITE(teletype_ctrl_r,teletype_ctrl_w)
127156
128157   AM_RANGE( 0xfe78, 0xfe7b ) AM_DEVREADWRITE("rx01", rx01_device, read, write)
129158ADDRESS_MAP_END
r24058r24059
314343
315344WRITE8_MEMBER( pdp11_state::kbd_put )
316345{
317   m_term_data = data;
318   m_term_status = 0xffff;
346   m_teletype_data = data;
347   m_teletype_status |= 0x80;
319348}
320349
321350static GENERIC_TERMINAL_INTERFACE( terminal_intf )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team