diff options
author | 2019-03-10 13:23:23 +0000 | |
---|---|---|
committer | 2019-03-10 16:03:40 +0000 | |
commit | 09f698ddc8f1e0ee0196f1069a3dc44a2e13b863 (patch) | |
tree | e69a6c2cad7b96856c35f4ecd4a933a7957dd609 /src/devices/bus/spectrum/kempjoy.cpp | |
parent | d62970843f793810da8a8bf245f00eed5c611d5c (diff) |
spectrum: Improved expansion interface to allow devices to act on opcode fetches.
- Added Multiface One/128/3, and MultiPrint devices.
Diffstat (limited to 'src/devices/bus/spectrum/kempjoy.cpp')
-rw-r--r-- | src/devices/bus/spectrum/kempjoy.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/devices/bus/spectrum/kempjoy.cpp b/src/devices/bus/spectrum/kempjoy.cpp index 79cf4d83eb3..a433d615e8c 100644 --- a/src/devices/bus/spectrum/kempjoy.cpp +++ b/src/devices/bus/spectrum/kempjoy.cpp @@ -65,21 +65,17 @@ void spectrum_kempjoy_device::device_start() } -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void spectrum_kempjoy_device::device_reset() -{ - io_space().install_read_handler(0x1f, 0x1f, 0, 0xff00, 0, read8smo_delegate(FUNC(spectrum_kempjoy_device::joystick_r), this)); -} - - //************************************************************************** // IMPLEMENTATION //************************************************************************** -uint8_t spectrum_kempjoy_device::joystick_r() +uint8_t spectrum_kempjoy_device::iorq_r(offs_t offset) { - return m_joy->read() & 0x1f; + uint8_t data = 0xff; + + if (offset == 0x1f) + { + data = m_joy->read() & 0x1f; + } + return data; } |