src/mess/drivers/at.c
| r2670 | r2671 | |
| 69 | 69 | */ |
| 70 | 70 | #define GAMEBLASTER |
| 71 | 71 | |
| 72 | | static ADDRESS_MAP_START( at_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 72 | static ADDRESS_MAP_START( at16_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 73 | 73 | AM_RANGE(0x000000, 0x09ffff) AM_MIRROR(0xff000000) AM_RAMBANK(10) |
| 74 | 74 | AM_RANGE(0x0a0000, 0x0affff) AM_NOP |
| 75 | 75 | AM_RANGE(0x0b0000, 0x0b7fff) AM_NOP |
| 76 | | AM_RANGE(0x0b8000, 0x0bffff) AM_READWRITE(SMH_RAM, pc_video_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 76 | AM_RANGE(0x0b8000, 0x0bffff) AM_READWRITE(SMH_RAM, pc_video_videoram16le_w) AM_BASE((UINT16 **)&videoram) AM_SIZE(&videoram_size) |
| 77 | 77 | AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM |
| 78 | 78 | AM_RANGE(0x0c8000, 0x0c9fff) AM_ROM |
| 79 | 79 | AM_RANGE(0x0ca000, 0x0cffff) AM_RAM |
| r2670 | r2671 | |
| 81 | 81 | AM_RANGE(0x0f0000, 0x0fffff) AM_ROM |
| 82 | 82 | ADDRESS_MAP_END |
| 83 | 83 | |
| 84 | |
| 84 | 85 | static ADDRESS_MAP_START( at386_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 85 | 86 | ADDRESS_MAP_GLOBAL_MASK(0x00ffffff) |
| 86 | 87 | AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK(10) |
| r2670 | r2671 | |
| 113 | 114 | } |
| 114 | 115 | |
| 115 | 116 | |
| 116 | | static ADDRESS_MAP_START(at_io, ADDRESS_SPACE_IO, 8) |
| 117 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE(DMA8237, "dma8237_1", dma8237_r, dma8237_w) |
| 118 | | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE(PIC8259, "pic8259_master", pic8259_r, pic8259_w) |
| 119 | | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, pit8253_r, pit8253_w) |
| 120 | | AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_8_r, kbdc8042_8_w) |
| 121 | | AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port_r, mc146818_port_w) |
| 122 | | AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page8_r, at_page8_w) |
| 123 | | AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE(PIC8259, "pic8259_slave", pic8259_r, pic8259_w) |
| 124 | | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE(DMA8237, "dma8237_2", at_dma8237_1_r, at_dma8237_1_w) |
| 125 | | AM_RANGE(0x01f0, 0x01f7) AM_READWRITE(at_mfm_0_r, at_mfm_0_w) |
| 126 | | AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc_JOY_r, pc_JOY_w) |
| 127 | | AM_RANGE(0x0220, 0x022f) AM_READWRITE(soundblaster_r, soundblaster_w) |
| 128 | | AM_RANGE(0x0278, 0x027f) AM_READWRITE(pc_parallelport2_r, pc_parallelport2_w) |
| 129 | | AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE(NS16450, "ns16450_3", ins8250_r, ins8250_w) |
| 130 | | AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE(NS16450, "ns16450_1", ins8250_r, ins8250_w) |
| 131 | | AM_RANGE(0x0320, 0x0323) AM_READWRITE(pc_HDC1_r, pc_HDC1_w) |
| 132 | | AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc_HDC2_r, pc_HDC2_w) |
| 133 | | AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_parallelport1_r, pc_parallelport1_w) |
| 134 | 117 | #ifdef ADLIB |
| 135 | | AM_RANGE(0x0388, 0x0388) AM_READWRITE(YM3812_status_port_0_r, YM3812_control_port_0_w) |
| 136 | | AM_RANGE(0x0389, 0x0389) AM_WRITE( YM3812_write_port_0_w) |
| 118 | static READ8_HANDLER(at_adlib_r) |
| 119 | { |
| 120 | if ( offset ) |
| 121 | return 0xFF; |
| 122 | else |
| 123 | return YM3812_status_port_0_r( machine, 0 ); |
| 124 | } |
| 125 | |
| 126 | static WRITE8_HANDLER(at_adlib_w) |
| 127 | { |
| 128 | if ( offset ) |
| 129 | YM3812_write_port_0_w( machine, 0, data ); |
| 130 | else |
| 131 | YM3812_control_port_0_w( machine, 0, data ); |
| 132 | } |
| 137 | 133 | #endif |
| 138 | | AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc_parallelport0_r, pc_parallelport0_w) |
| 139 | | AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE(NS16450, "ns16450_2", ins8250_r, ins8250_w) |
| 140 | | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc_fdc_r, pc_fdc_w) |
| 141 | | AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE(NS16450, "ns16450_0", ins8250_r, ins8250_w) |
| 134 | |
| 135 | static ADDRESS_MAP_START(at16_io, ADDRESS_SPACE_IO, 16) |
| 136 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8(DMA8237, "dma8237_1", dma8237_r, dma8237_w, 0xffff) |
| 137 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8(PIC8259, "pic8259_master", pic8259_r, pic8259_w, 0xffff) |
| 138 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8(PIT8254, AT_PIT8254, pit8253_r, pit8253_w, 0xffff) |
| 139 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8(kbdc8042_8_r, kbdc8042_8_w, 0xffff) |
| 140 | AM_RANGE(0x0070, 0x007f) AM_READWRITE8(mc146818_port_r, mc146818_port_w, 0xffff) |
| 141 | AM_RANGE(0x0080, 0x009f) AM_READWRITE8(at_page8_r, at_page8_w, 0xffff) |
| 142 | AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8(PIC8259, "pic8259_slave", pic8259_r, pic8259_w, 0xffff) |
| 143 | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8(DMA8237, "dma8237_2", at_dma8237_1_r, at_dma8237_1_w, 0xffff) |
| 144 | AM_RANGE(0x01f0, 0x01f7) AM_READWRITE8(at_mfm_0_r, at_mfm_0_w, 0xffff) |
| 145 | AM_RANGE(0x0200, 0x0207) AM_READWRITE8(pc_JOY_r, pc_JOY_w, 0xffff) |
| 146 | AM_RANGE(0x0220, 0x022f) AM_READWRITE8(soundblaster_r, soundblaster_w, 0xffff) |
| 147 | AM_RANGE(0x0278, 0x027f) AM_READWRITE8(pc_parallelport2_r, pc_parallelport2_w, 0xffff) |
| 148 | AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8(NS16450, "ns16450_3", ins8250_r, ins8250_w, 0xffff) |
| 149 | AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8(NS16450, "ns16450_1", ins8250_r, ins8250_w, 0xffff) |
| 150 | AM_RANGE(0x0320, 0x0323) AM_READWRITE8(pc_HDC1_r, pc_HDC1_w, 0xffff) |
| 151 | AM_RANGE(0x0324, 0x0327) AM_READWRITE8(pc_HDC2_r, pc_HDC2_w, 0xffff) |
| 152 | AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_parallelport1_r, pc_parallelport1_w, 0xffff) |
| 153 | #ifdef ADLIB |
| 154 | AM_RANGE(0x0388, 0x0389) AM_READWRITE8(at_adlib_r, at_adlib_w, 0xffff) |
| 155 | #endif |
| 156 | AM_RANGE(0x03bc, 0x03bf) AM_READWRITE8(pc_parallelport0_r, pc_parallelport0_w, 0xffff) |
| 157 | AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE8(NS16450, "ns16450_2", ins8250_r, ins8250_w, 0xffff) |
| 158 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE8(pc_fdc_r, pc_fdc_w, 0xffff) |
| 159 | AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8(NS16450, "ns16450_0", ins8250_r, ins8250_w, 0xffff) |
| 142 | 160 | ADDRESS_MAP_END |
| 143 | 161 | |
| 144 | 162 | |
| r2670 | r2671 | |
| 401 | 419 | |
| 402 | 420 | static MACHINE_DRIVER_START( ibm5170 ) |
| 403 | 421 | /* basic machine hardware */ |
| 404 | | MDRV_CPU_ATPC(at, at, I80286, 6000000) |
| 422 | MDRV_CPU_ATPC(at16, at16, I80286, 6000000) |
| 405 | 423 | |
| 406 | 424 | MDRV_DEVICE_ADD( AT_PIT8254, PIT8254 ) |
| 407 | 425 | MDRV_DEVICE_CONFIG( at_pit8254_config ) |
| r2670 | r2671 | |
| 468 | 486 | |
| 469 | 487 | static MACHINE_DRIVER_START( ps2m30286 ) |
| 470 | 488 | /* basic machine hardware */ |
| 471 | | MDRV_CPU_ATPC(at, at, I80286, 12000000) |
| 489 | MDRV_CPU_ATPC(at16, at16, I80286, 12000000) |
| 472 | 490 | |
| 473 | 491 | MDRV_DEVICE_ADD( AT_PIT8254, PIT8254 ) |
| 474 | 492 | MDRV_DEVICE_CONFIG( at_pit8254_config ) |
| r2670 | r2671 | |
| 534 | 552 | |
| 535 | 553 | static MACHINE_DRIVER_START( atvga ) |
| 536 | 554 | /* basic machine hardware */ |
| 537 | | MDRV_CPU_ATPC(at, at, I80286, 12000000) |
| 555 | MDRV_CPU_ATPC(at16, at16, I80286, 12000000) |
| 538 | 556 | |
| 539 | 557 | MDRV_DEVICE_ADD( AT_PIT8254, PIT8254 ) |
| 540 | 558 | MDRV_DEVICE_CONFIG( at_pit8254_config ) |