trunk/src/mess/drivers/poly.c
| r23599 | r23600 | |
| 14 | 14 | The keyboard controller is one of those custom XR devices. |
| 15 | 15 | Will use the terminal keyboard instead. |
| 16 | 16 | |
| 17 | With bios 1, after entering your userid and password, you get a black |
| 18 | screen. This is normal, because it joins to a network which isn't there. |
| 19 | |
| 17 | 20 | ToDo: |
| 18 | 21 | - Almost Everything! |
| 19 | 22 | - Connect up the device ports & lines |
| 20 | 23 | - Find out about graphics mode and how it is selected |
| 21 | 24 | - There is a beeper or speaker connected to the 6840 - how? |
| 22 | 25 | - Fix Keyboard so that the Enter key tells BASIC to do something |
| 23 | | - Fix If ^G is pressed, emulation freezes |
| 26 | - Fix If ^G is pressed, the system pauses for about 30 seconds. |
| 24 | 27 | - Find out how to make 2nd teletext screen to display |
| 25 | 28 | |
| 26 | 29 | ****************************************************************************/ |
| r23599 | r23600 | |
| 30 | 33 | #include "cpu/z80/z80.h" |
| 31 | 34 | #include "machine/6821pia.h" |
| 32 | 35 | #include "machine/6840ptm.h" |
| 36 | #include "machine/6850acia.h" |
| 37 | #include "machine/mc6854.h" |
| 33 | 38 | #include "video/saa5050.h" |
| 34 | 39 | #include "machine/keyboard.h" |
| 35 | 40 | |
| r23599 | r23600 | |
| 65 | 70 | AM_RANGE(0xa000,0xcfff) AM_ROM |
| 66 | 71 | AM_RANGE(0xd000,0xdfff) AM_RAM |
| 67 | 72 | AM_RANGE(0xe000,0xe003) AM_DEVREADWRITE("pia0", pia6821_device, read, write) //video control PIA 6821 |
| 68 | | // AM_RANGE(0xe004,0xe006) optional RS232C interface |
| 73 | AM_RANGE(0xe004,0xe004) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write) |
| 74 | AM_RANGE(0xe005,0xe005) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write) |
| 75 | //AM_RANGE(0xe006, 0xe006) // baud rate controller (0=9600,2=4800,4=2400,6=1200,8=600,A=300) |
| 69 | 76 | AM_RANGE(0xe00c,0xe00f) AM_DEVREADWRITE("pia1", pia6821_device, read, write) //keyboard PIA 6821 |
| 70 | 77 | AM_RANGE(0xe020,0xe027) AM_DEVREADWRITE("ptm", ptm6840_device, read, write) //timer 6840 |
| 71 | | // AM_RANGE(0xe030,0xe037) Data Link Controller 6854 |
| 78 | AM_RANGE(0xe030,0xe037) AM_DEVREADWRITE_LEGACY("adlc", mc6854_r, mc6854_w) //Data Link Controller 6854 |
| 72 | 79 | AM_RANGE(0xe040,0xe040) AM_NOP //Set protect flip-flop after 1 E-cycle |
| 73 | 80 | AM_RANGE(0xe050,0xe05f) AM_RAM //Dynamic Address Translater (arranges memory banks) |
| 74 | 81 | // AM_RANGE(0xe060,0xe060) Select Map 1 |
| r23599 | r23600 | |
| 137 | 144 | |
| 138 | 145 | static const ptm6840_interface poly_ptm_intf = |
| 139 | 146 | { |
| 140 | | XTAL_10MHz/10, // not correct |
| 147 | XTAL_12MHz / 3, |
| 141 | 148 | { 0, 0, 0 }, |
| 142 | 149 | { DEVCB_NULL, |
| 143 | 150 | DEVCB_NULL, |
| r23599 | r23600 | |
| 145 | 152 | DEVCB_NULL |
| 146 | 153 | }; |
| 147 | 154 | |
| 155 | static ACIA6850_INTERFACE( acia_intf ) |
| 156 | { |
| 157 | 1, |
| 158 | 1, |
| 159 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, rx), |
| 160 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx), |
| 161 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, cts_r), |
| 162 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w), |
| 163 | DEVCB_NULL, |
| 164 | DEVCB_NULL |
| 165 | }; |
| 166 | |
| 167 | static const mc6854_interface adlc_intf = |
| 168 | { |
| 169 | DEVCB_NULL, |
| 170 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(ECONET_TAG, econet_device, data_r), |
| 171 | DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(ECONET_TAG, econet_device, data_w), |
| 172 | NULL, |
| 173 | DEVCB_NULL, |
| 174 | DEVCB_NULL |
| 175 | }; |
| 176 | |
| 148 | 177 | READ8_MEMBER( poly_state::videoram_r ) |
| 149 | 178 | { |
| 150 | 179 | return m_videoram[offset]; |
| r23599 | r23600 | |
| 160 | 189 | WRITE8_MEMBER( poly_state::kbd_put ) |
| 161 | 190 | { |
| 162 | 191 | m_term_data = data; |
| 192 | |
| 193 | //m_pia1->cb1_w(1); |
| 194 | //m_pia1->cb1_w(0); |
| 163 | 195 | //m_term_key = 1; |
| 164 | 196 | address_space &mem = m_maincpu->space(AS_PROGRAM); |
| 165 | | mem.write_byte(0xebec, data); // this has to be 0xecf1 for bios 1 |
| 197 | mem.write_byte(0xebec, data); // bios 0 |
| 198 | mem.write_byte(0xebf1, data); // bios 1 |
| 166 | 199 | mem.write_byte(0xebd0, 1); // any non-zero here |
| 167 | 200 | } |
| 168 | 201 | |
| r23599 | r23600 | |
| 173 | 206 | |
| 174 | 207 | static MACHINE_CONFIG_START( poly, poly_state ) |
| 175 | 208 | /* basic machine hardware */ |
| 176 | | MCFG_CPU_ADD("maincpu", M6809E, XTAL_4MHz) |
| 209 | MCFG_CPU_ADD("maincpu", M6809E, XTAL_12MHz / 3) // 12.0576MHz |
| 177 | 210 | MCFG_CPU_PROGRAM_MAP(poly_mem) |
| 178 | 211 | |
| 179 | 212 | |
| r23599 | r23600 | |
| 190 | 223 | MCFG_PIA6821_ADD( "pia0", poly_pia0_intf ) |
| 191 | 224 | MCFG_PIA6821_ADD( "pia1", poly_pia1_intf ) |
| 192 | 225 | MCFG_PTM6840_ADD("ptm", poly_ptm_intf) |
| 226 | MCFG_ACIA6850_ADD("acia", acia_intf) |
| 227 | MCFG_MC6854_ADD("adlc", adlc_intf) |
| 193 | 228 | |
| 194 | 229 | // temporary hack |
| 195 | 230 | MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf) |