src/mess/drivers/at.c
| r2237 | r2238 | |
| 42 | 42 | #include "machine/8237dma.h" |
| 43 | 43 | #include "machine/pci.h" |
| 44 | 44 | #include "memconv.h" |
| 45 | #include "devconv.h" |
| 45 | 46 | |
| 46 | 47 | /* window resizing with dirtybuffering traping in xmess window */ |
| 47 | 48 | |
| 48 | 49 | #define ym3812_StdClock 3579545 |
| 50 | #define AT_PIT8254 "at_pit8254" |
| 49 | 51 | |
| 50 | 52 | /* |
| 51 | 53 | adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster) |
| r2237 | r2238 | |
| 122 | 124 | write32le_with_write8_handler(at_dma8237_1_w, machine, offset, data, mem_mask); |
| 123 | 125 | } |
| 124 | 126 | |
| 127 | DEV_READWRITE8TO32LE_LSB( at_pit8254_32le, pit8253_r, pit8253_w ) |
| 125 | 128 | |
| 126 | 129 | |
| 127 | 130 | static ADDRESS_MAP_START(at_io, ADDRESS_SPACE_IO, 8) |
| 128 | 131 | AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_0_r, dma8237_0_w) |
| 129 | 132 | AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_0_r, pic8259_0_w) |
| 130 | | AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_0_r, pit8253_0_w) |
| 133 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, pit8253_r, pit8253_w) |
| 131 | 134 | AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_8_r, kbdc8042_8_w) |
| 132 | 135 | AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port_r, mc146818_port_w) |
| 133 | 136 | AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page8_r, at_page8_w) |
| r2237 | r2238 | |
| 157 | 160 | static ADDRESS_MAP_START(at386_io, ADDRESS_SPACE_IO, 32) |
| 158 | 161 | AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_32le_0_r, dma8237_32le_0_w) |
| 159 | 162 | AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_32le_0_r, pic8259_32le_0_w) |
| 160 | | AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_32le_0_r, pit8253_32le_0_w) |
| 163 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, at_pit8254_32le_r, at_pit8254_32le_w) |
| 161 | 164 | AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_32le_r, kbdc8042_32le_w) |
| 162 | 165 | AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port32le_r, mc146818_port32le_w) |
| 163 | 166 | AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page32_r, at_page32_w) |
| r2237 | r2238 | |
| 179 | 182 | static ADDRESS_MAP_START(at586_io, ADDRESS_SPACE_IO, 32) |
| 180 | 183 | AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_32le_0_r, dma8237_32le_0_w) |
| 181 | 184 | AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_32le_0_r, pic8259_32le_0_w) |
| 182 | | AM_RANGE(0x0040, 0x005f) AM_READWRITE(pit8253_32le_0_r, pit8253_32le_0_w) |
| 185 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE(PIT8254, AT_PIT8254, at_pit8254_32le_r, at_pit8254_32le_w) |
| 183 | 186 | AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_32le_r, kbdc8042_32le_w) |
| 184 | 187 | AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port32le_r, mc146818_port32le_w) |
| 185 | 188 | AM_RANGE(0x0080, 0x009f) AM_READWRITE(at_page32_r, at_page32_w) |
| r2237 | r2238 | |
| 405 | 408 | #endif |
| 406 | 409 | |
| 407 | 410 | |
| 411 | static PIT8253_OUTPUT_CHANGED( pc_timer0_w ) |
| 412 | { |
| 413 | pic8259_set_irq_line(0, 0, state); |
| 414 | } |
| 408 | 415 | |
| 416 | |
| 417 | static const struct pit8253_config at_pit8254_config = |
| 418 | { |
| 419 | { |
| 420 | { |
| 421 | 4772720/4, /* heartbeat IRQ */ |
| 422 | pc_timer0_w, |
| 423 | NULL |
| 424 | }, { |
| 425 | 4772720/4, /* dram refresh */ |
| 426 | NULL, |
| 427 | NULL |
| 428 | }, { |
| 429 | 4772720/4, /* pio port c pin 4, and speaker polling enough */ |
| 430 | NULL, |
| 431 | pc_sh_speaker_change_clock |
| 432 | } |
| 433 | } |
| 434 | }; |
| 435 | |
| 436 | |
| 437 | |
| 409 | 438 | #define MDRV_CPU_ATPC(mem, port, type, clock) \ |
| 410 | 439 | MDRV_CPU_ADD_TAG("main", type, clock) \ |
| 411 | 440 | MDRV_CPU_PROGRAM_MAP(mem##_map, 0) \ |
| r2237 | r2238 | |
| 416 | 445 | /* basic machine hardware */ |
| 417 | 446 | MDRV_CPU_ATPC(at, at, I80286, 12000000) |
| 418 | 447 | |
| 448 | MDRV_DEVICE_ADD( AT_PIT8254, PIT8254 ) |
| 449 | MDRV_DEVICE_CONFIG( at_pit8254_config ) |
| 450 | |
| 419 | 451 | MDRV_MACHINE_START( at ) |
| 420 | 452 | MDRV_MACHINE_RESET( at ) |
| 421 | 453 | |