src/mess/drivers/mz2500.c
| r8927 | r8928 | |
| 27 | 27 | #include "machine/z80pio.h" |
| 28 | 28 | #include "machine/i8255a.h" |
| 29 | 29 | #include "machine/wd17xx.h" |
| 30 | #include "machine/pit8253.h" |
| 30 | 31 | #include "sound/2203intf.h" |
| 31 | 32 | |
| 32 | 33 | //#include "devices/cassette.h" |
| r8927 | r8928 | |
| 528 | 529 | } |
| 529 | 530 | } |
| 530 | 531 | |
| 532 | static WRITE8_HANDLER( timer_w ) |
| 533 | { |
| 534 | running_device *pit8253 = space->machine->device("pit"); |
| 535 | |
| 536 | pit8253_gate0_w(pit8253, 1); |
| 537 | pit8253_gate1_w(pit8253, 1); |
| 538 | pit8253_gate0_w(pit8253, 0); |
| 539 | pit8253_gate1_w(pit8253, 0); |
| 540 | pit8253_gate0_w(pit8253, 1); |
| 541 | pit8253_gate1_w(pit8253, 1); |
| 542 | } |
| 543 | |
| 531 | 544 | static ADDRESS_MAP_START(mz2500_io, ADDRESS_SPACE_IO, 8) |
| 532 | 545 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 533 | 546 | // AM_RANGE(0x60, 0x63) AM_WRITE(w3100a_w) |
| r8927 | r8928 | |
| 556 | 569 | AM_RANGE(0xd8, 0xdb) AM_DEVREADWRITE("mb8877a", mz2500_wd17xx_r, mz2500_wd17xx_w) |
| 557 | 570 | AM_RANGE(0xdc, 0xdd) AM_WRITE(mz2500_fdc_w) |
| 558 | 571 | AM_RANGE(0xe0, 0xe3) AM_DEVREADWRITE("i8255_0", i8255a_r, i8255a_w) |
| 559 | | // AM_RANGE(0xe4, 0xe7) AM_READWRITE(pit_r,pit_w) |
| 572 | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_r, pit8253_w) |
| 560 | 573 | AM_RANGE(0xe8, 0xe9) AM_DEVREADWRITE("z80pio_1", z80pio_c_r, z80pio_c_w) |
| 561 | 574 | AM_RANGE(0xea, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_d_r, z80pio_d_w) |
| 562 | 575 | // AM_RANGE(0xef, 0xef) AM_READWRITE(joystick_r,joystick_w) |
| 563 | | // AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w) |
| 576 | AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w) |
| 564 | 577 | AM_RANGE(0xf4, 0xf7) AM_READ(mz2500_crtc_hvblank_r) AM_WRITE(mz2500_txt_crtc_w) |
| 565 | 578 | // AM_RANGE(0xf8, 0xf9) AM_READWRITE(extrom_r,extrom_w) |
| 566 | 579 | ADDRESS_MAP_END |
| r8927 | r8928 | |
| 1150 | 1163 | // ... |
| 1151 | 1164 | } |
| 1152 | 1165 | |
| 1166 | /* PIT8253 Interface */ |
| 1167 | |
| 1168 | static const struct pit8253_config mz2500_pit8253_intf = |
| 1169 | { |
| 1170 | { |
| 1171 | { |
| 1172 | 31250, |
| 1173 | DEVCB_NULL, |
| 1174 | DEVCB_LINE(pit8253_clk1_w) |
| 1175 | }, |
| 1176 | { |
| 1177 | 0, |
| 1178 | DEVCB_NULL, |
| 1179 | DEVCB_LINE(pit8253_clk2_w) |
| 1180 | }, |
| 1181 | { |
| 1182 | 0, |
| 1183 | DEVCB_NULL, |
| 1184 | DEVCB_NULL |
| 1185 | } |
| 1186 | } |
| 1187 | }; |
| 1188 | |
| 1153 | 1189 | static MACHINE_DRIVER_START( mz2500 ) |
| 1154 | 1190 | /* basic machine hardware */ |
| 1155 | 1191 | MDRV_CPU_ADD("maincpu", Z80, 6000000) |
| r8927 | r8928 | |
| 1184 | 1220 | MDRV_SOUND_ADD("ym", YM2203, 6000000/2) //unknown clock / divider |
| 1185 | 1221 | MDRV_SOUND_CONFIG(ym2203_interface_1) |
| 1186 | 1222 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 1223 | |
| 1224 | MDRV_PIT8253_ADD("pit", mz2500_pit8253_intf) |
| 1187 | 1225 | MACHINE_DRIVER_END |
| 1188 | 1226 | |
| 1189 | 1227 | |