src/mess/drivers/sg1000.c
| r5199 | r5200 | |
| 73 | 73 | #include "machine/ctronics.h" |
| 74 | 74 | #include "includes/serial.h" |
| 75 | 75 | #include "machine/msm8251.h" |
| 76 | | #include "machine/8255ppi.h" |
| 76 | #include "machine/i8255a.h" |
| 77 | 77 | #include "machine/nec765.h" |
| 78 | 78 | #include "sound/sn76496.h" |
| 79 | 79 | #include "video/tms9928a.h" |
| r5199 | r5200 | |
| 168 | 168 | AM_RANGE(0x7f, 0x7f) AM_DEVWRITE(SN76489A_TAG, sn76496_w) |
| 169 | 169 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 170 | 170 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| 171 | | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255", ppi8255_r, ppi8255_w) |
| 171 | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) |
| 172 | 172 | ADDRESS_MAP_END |
| 173 | 173 | |
| 174 | 174 | /* This is how the I/O ports are really mapped, but MAME does not support overlapping ranges |
| 175 | 175 | static ADDRESS_MAP_START( sc3000_io_map, ADDRESS_SPACE_IO, 8 ) |
| 176 | 176 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 177 | | AM_RANGE(0x00, 0x00) AM_MIRROR(0xdf) AM_DEVREADWRITE("ppi8255", ppi8255_r, ppi8255_w) |
| 177 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xdf) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) |
| 178 | 178 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x7f) AM_WRITE(sn76496_0_w) |
| 179 | 179 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xae) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 180 | 180 | AM_RANGE(0x01, 0x01) AM_MIRROR(0xae) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| r5199 | r5200 | |
| 194 | 194 | AM_RANGE(0x7f, 0x7f) AM_DEVWRITE(SN76489A_TAG, sn76496_w) |
| 195 | 195 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 196 | 196 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| 197 | | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) |
| 197 | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255_0", i8255a_r, i8255a_w) |
| 198 | 198 | AM_RANGE(0xe0, 0xe0) AM_DEVREAD(NEC765_TAG, nec765_status_r) |
| 199 | 199 | AM_RANGE(0xe1, 0xe1) AM_DEVREADWRITE(NEC765_TAG, nec765_data_r, nec765_data_w) |
| 200 | | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) |
| 200 | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("ppi8255_1", i8255a_r, i8255a_w) |
| 201 | 201 | AM_RANGE(0xe8, 0xe8) AM_DEVREADWRITE("uart", msm8251_data_r, msm8251_data_w) |
| 202 | 202 | AM_RANGE(0xe9, 0xe9) AM_DEVREADWRITE("uart", msm8251_status_r, msm8251_control_w) |
| 203 | 203 | ADDRESS_MAP_END |
| r5199 | r5200 | |
| 567 | 567 | /* printer */ |
| 568 | 568 | } |
| 569 | 569 | |
| 570 | | static const ppi8255_interface sc3000_ppi8255_intf = |
| 570 | static I8255A_INTERFACE( sc3000_ppi8255_intf ) |
| 571 | 571 | { |
| 572 | 572 | DEVCB_HANDLER(sc3000_ppi8255_a_r), // Port A read |
| 573 | 573 | DEVCB_HANDLER(sc3000_ppi8255_b_r), // Port B read |
| r5199 | r5200 | |
| 657 | 657 | centronics_strobe_w(printer, BIT(data, 7)); |
| 658 | 658 | } |
| 659 | 659 | |
| 660 | | static const ppi8255_interface sf7000_ppi8255_intf[2] = |
| 660 | static const i8255a_interface sf7000_ppi8255_intf[2] = |
| 661 | 661 | { |
| 662 | 662 | { |
| 663 | 663 | DEVCB_HANDLER(sc3000_ppi8255_a_r), // Port A read |
| r5199 | r5200 | |
| 880 | 880 | |
| 881 | 881 | MDRV_MACHINE_START( sc3000 ) |
| 882 | 882 | |
| 883 | | MDRV_PPI8255_ADD( "ppi8255", sc3000_ppi8255_intf ) // uPD9255AC-2 |
| 883 | MDRV_I8255A_ADD( "ppi8255", sc3000_ppi8255_intf ) // uPD9255AC-2 |
| 884 | 884 | |
| 885 | 885 | /* video hardware */ |
| 886 | 886 | MDRV_IMPORT_FROM(tms9928a) |
| r5199 | r5200 | |
| 918 | 918 | MDRV_MACHINE_START( sf7000 ) |
| 919 | 919 | MDRV_MACHINE_RESET( sf7000 ) |
| 920 | 920 | |
| 921 | | MDRV_PPI8255_ADD("ppi8255_0", sf7000_ppi8255_intf[0]) |
| 922 | | MDRV_PPI8255_ADD("ppi8255_1", sf7000_ppi8255_intf[1]) |
| 921 | MDRV_I8255A_ADD("ppi8255_0", sf7000_ppi8255_intf[0]) |
| 922 | MDRV_I8255A_ADD("ppi8255_1", sf7000_ppi8255_intf[1]) |
| 923 | 923 | |
| 924 | 924 | /* video hardware */ |
| 925 | 925 | MDRV_IMPORT_FROM(tms9928a) |