Previous 15994 Revisions Next

r5889 Friday 25th September, 2009 at 13:38:50 UTC by Dirk Best
[MPF1] Clean up memory map, add Z80CTC
[src/mess/drivers]mpf1.c

src/mess/drivers/mpf1.c
r5888r5889
8282ADDRESS_MAP_END
8383
8484static 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    */
11285   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)
12489ADDRESS_MAP_END
12590
12691/* Input Ports */
r5888r5889
410375
411376/* Machine Drivers */
412377
378static const z80ctc_interface mpf1_ctc_intf =
379{
380   0,
381   0,
382   0,
383   0,
384   0
385};
386
413387static MACHINE_DRIVER_START( mpf1 )
414388   // basic machine hardware
415389   MDRV_CPU_ADD("maincpu", Z80, 3579500/2)   // 1.79 MHz
r5888r5889
419393   MDRV_MACHINE_START( mpf1 )
420394   MDRV_MACHINE_RESET( mpf1 )
421395
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)
423399
424   MDRV_I8255A_ADD( "ppi8255", ppi8255_intf )
425
426400   // sound hardware
427401   MDRV_SPEAKER_STANDARD_MONO("mono")
428402   MDRV_SOUND_ADD("dac", DAC, 0)
r5888r5889
439413
440414   MDRV_MACHINE_RESET( mpf1 )
441415
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)
443419
444   MDRV_I8255A_ADD( "ppi8255", ppi8255_intf )
445
446420   // sound hardware
447421   MDRV_SPEAKER_STANDARD_MONO("mono")
448422   MDRV_SOUND_ADD("dac", DAC, 0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team