diff options
Diffstat (limited to 'src/devices/bus/spectrum/intf2.cpp')
-rw-r--r-- | src/devices/bus/spectrum/intf2.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/devices/bus/spectrum/intf2.cpp b/src/devices/bus/spectrum/intf2.cpp index 789be29717d..2700c2787d0 100644 --- a/src/devices/bus/spectrum/intf2.cpp +++ b/src/devices/bus/spectrum/intf2.cpp @@ -117,7 +117,7 @@ READ_LINE_MEMBER(spectrum_intf2_device::romcs) return 0; } -uint8_t spectrum_intf2_device::mreq_r(offs_t offset) +READ8_MEMBER(spectrum_intf2_device::mreq_r) { if (m_cart && m_cart->exists()) return m_cart->get_rom_base()[offset & 0x3fff]; @@ -125,20 +125,17 @@ uint8_t spectrum_intf2_device::mreq_r(offs_t offset) return 0xff; } -uint8_t spectrum_intf2_device::iorq_r(offs_t offset) +READ8_MEMBER(spectrum_intf2_device::port_fe_r) { uint8_t data = 0xff; - switch (offset & 0xff) - { - case 0xfe: - if (((offset >> 8) & 8) == 0) - data = m_exp_line3->read() | (0xff ^ 0x1f); + uint8_t lines = offset >> 8; - if (((offset >> 8) & 16) == 0) - data = m_exp_line4->read() | (0xff ^ 0x1f); - break; - } + if ((lines & 8) == 0) + data = m_exp_line3->read() | (0xff ^ 0x1f); + + if ((lines & 16) == 0) + data = m_exp_line4->read() | (0xff ^ 0x1f); return data; } |