diff options
Diffstat (limited to 'src/mame/machine/midwunit.c')
-rw-r--r-- | src/mame/machine/midwunit.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mame/machine/midwunit.c b/src/mame/machine/midwunit.c index 55125589617..c43c73a6790 100644 --- a/src/mame/machine/midwunit.c +++ b/src/mame/machine/midwunit.c @@ -110,26 +110,26 @@ WRITE16_MEMBER(midwunit_state::midwunit_io_w) /************************************* * * General I/O reads - * - *************************************/ - -READ16_MEMBER(midwunit_state::midwunit_io_r) -{ - static const char *const portnames[] = { "IN0", "IN1", "DSW", "IN2" }; - - /* apply I/O shuffling */ - offset = m_ioshuffle[offset % 16]; - + *
+ *************************************/
+
+IOPORT_ARRAY_MEMBER(midwunit_state::wunit_ports) { "IN0", "IN1", "DSW", "IN2" };
+
+READ16_MEMBER(midwunit_state::midwunit_io_r)
+{
+ /* apply I/O shuffling */
+ offset = m_ioshuffle[offset % 16];
+
switch (offset) { case 0: - case 1: - case 2: - case 3: - return ioport(portnames[offset])->read(); - - case 4: - return (m_midway_serial_pic->status_r(space,0) << 12) | midwunit_sound_state_r(space,0,0xffff); + case 1:
+ case 2:
+ case 3:
+ return m_ports[offset]->read();
+
+ case 4:
+ return (m_midway_serial_pic->status_r(space,0) << 12) | midwunit_sound_state_r(space,0,0xffff);
default: logerror("%08X:Unknown I/O read from %d\n", space.device().safe_pc(), offset); |