src/mess/drivers/mpf1.c
| r5888 | r5889 | |
| 82 | 82 | ADDRESS_MAP_END |
| 83 | 83 | |
| 84 | 84 | static ADDRESS_MAP_START( mpf1_io_map, ADDRESS_SPACE_IO, 8 ) |
| 85 | | /* Appendix B.D from the MPF-I user's manual: |
| 86 | | (contains possible typing/printing errors so I've cited it literally) |
| 87 | | |
| 88 | | * D. Input/Output port addressing |
| 89 | | * |
| 90 | | * U96 (74LS139) is an I/O port decoder. |
| 91 | | * |
| 92 | | * IORQ A7 A6 Selected I/O Port Address |
| 93 | | * |
| 94 | | * 0 0 0 8255 00 - 03 |
| 95 | | * |
| 96 | | * 0 0 1 CTC 40 - 43 |
| 97 | | * |
| 98 | | * 0 1 0 PIO 80 - 83 |
| 99 | | * |
| 100 | | * Note; I/O port is not fully decoded, e.g. the 16 combinations |
| 101 | | * 00 - 03, 04 - 07, 08 - 0B,.....3C - 3F, all select the s |
| 102 | | * 8255. The CTC & PIO are also selected by 16 different |
| 103 | | * combinations. |
| 104 | | |
| 105 | | Where the text states ".... , all select the s ...." it probably means |
| 106 | | "... ., all select the same ....". |
| 107 | | |
| 108 | | So to assure that this "incompleteness" of the hardware does also exist in |
| 109 | | this simulator I've expanded the port assignments accordingly. I've also |
| 110 | | tested whether this is true for the actual hardware, and it is. |
| 111 | | */ |
| 112 | 85 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 113 | | |
| 114 | | // The 16 I/O port combinations for the 8255 (P8255A-5, 8628LLP, (c) 1981 AMD) |
| 115 | | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) AM_MIRROR(0x3C) |
| 116 | | |
| 117 | | // TODO: create drivers to emulate the following two chips |
| 118 | | // The 16 I/O port combinations for the CTC (Zilog, Z0843004PSC, Z80 CTC, 8644) |
| 119 | | // AM_RANGE(0x40, 0x43) AM_WRITE(ctc_enable_w) AM_MIRROR(0x7C) |
| 120 | | |
| 121 | | /* The 16 I/O port combinations for the PIO (Zilog, Z0842004PSC, Z80 PIO, 8735) */ |
| 122 | | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("z80pio", z80pio_r, z80pio_w) AM_MIRROR(0xBF) |
| 123 | | |
| 86 | AM_RANGE(0x00, 0x03) AM_MIRROR(0x3c) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) |
| 87 | AM_RANGE(0x40, 0x43) AM_MIRROR(0x3c) AM_DEVREADWRITE("z80ctc", z80ctc_r, z80ctc_w) |
| 88 | AM_RANGE(0x80, 0x83) AM_MIRROR(0x3c) AM_DEVREADWRITE("z80pio", z80pio_r, z80pio_w) |
| 124 | 89 | ADDRESS_MAP_END |
| 125 | 90 | |
| 126 | 91 | /* Input Ports */ |
| r5888 | r5889 | |
| 410 | 375 | |
| 411 | 376 | /* Machine Drivers */ |
| 412 | 377 | |
| 378 | static const z80ctc_interface mpf1_ctc_intf = |
| 379 | { |
| 380 | 0, |
| 381 | 0, |
| 382 | 0, |
| 383 | 0, |
| 384 | 0 |
| 385 | }; |
| 386 | |
| 413 | 387 | static MACHINE_DRIVER_START( mpf1 ) |
| 414 | 388 | // basic machine hardware |
| 415 | 389 | MDRV_CPU_ADD("maincpu", Z80, 3579500/2) // 1.79 MHz |
| r5888 | r5889 | |
| 419 | 393 | MDRV_MACHINE_START( mpf1 ) |
| 420 | 394 | MDRV_MACHINE_RESET( mpf1 ) |
| 421 | 395 | |
| 422 | | MDRV_Z80PIO_ADD( "z80pio", mpf1_pio_intf ) |
| 396 | MDRV_Z80PIO_ADD("z80pio", mpf1_pio_intf) |
| 397 | MDRV_Z80CTC_ADD("z80ctc", 3579500/2, mpf1_ctc_intf) |
| 398 | MDRV_I8255A_ADD("ppi8255", ppi8255_intf) |
| 423 | 399 | |
| 424 | | MDRV_I8255A_ADD( "ppi8255", ppi8255_intf ) |
| 425 | | |
| 426 | 400 | // sound hardware |
| 427 | 401 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 428 | 402 | MDRV_SOUND_ADD("dac", DAC, 0) |
| r5888 | r5889 | |
| 439 | 413 | |
| 440 | 414 | MDRV_MACHINE_RESET( mpf1 ) |
| 441 | 415 | |
| 442 | | MDRV_Z80PIO_ADD( "z80pio", mpf1_pio_intf ) |
| 416 | MDRV_Z80PIO_ADD("z80pio", mpf1_pio_intf) |
| 417 | MDRV_Z80CTC_ADD("z80ctc", 3579500/2, mpf1_ctc_intf) |
| 418 | MDRV_I8255A_ADD("ppi8255", ppi8255_intf) |
| 443 | 419 | |
| 444 | | MDRV_I8255A_ADD( "ppi8255", ppi8255_intf ) |
| 445 | | |
| 446 | 420 | // sound hardware |
| 447 | 421 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 448 | 422 | MDRV_SOUND_ADD("dac", DAC, 0) |