diff options
Diffstat (limited to 'src/devices/bus/spectrum/uspeech.cpp')
-rw-r--r-- | src/devices/bus/spectrum/uspeech.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/devices/bus/spectrum/uspeech.cpp b/src/devices/bus/spectrum/uspeech.cpp index 0de1f5ff946..e3d5fca54d2 100644 --- a/src/devices/bus/spectrum/uspeech.cpp +++ b/src/devices/bus/spectrum/uspeech.cpp @@ -76,6 +76,7 @@ spectrum_uspeech_device::spectrum_uspeech_device(const machine_config &mconfig, void spectrum_uspeech_device::device_start() { + save_item(NAME(m_romcs)); } @@ -98,24 +99,26 @@ READ_LINE_MEMBER(spectrum_uspeech_device::romcs) return m_romcs; } - -uint8_t spectrum_uspeech_device::mreq_r(offs_t offset) +void spectrum_uspeech_device::opcode_fetch(offs_t offset) { - uint8_t data; - - if (!machine().side_effects_disabled() && (offset == 0x38)) + if (!machine().side_effects_disabled() && (offset == 0x0038)) { m_romcs = !m_romcs; } +} - switch (offset) +uint8_t spectrum_uspeech_device::mreq_r(offs_t offset) +{ + uint8_t data = 0xff; + + switch (offset & 0xf000) { + case 0x0000: + data = m_rom->base()[offset & 0x7ff]; + break; case 0x1000: data = !m_nsp->lrq_r(); // (m_nsp->lrq_r() && (m_nsp->sby_r() != 0)) ? 0x00 : 0x01; break; - default: - data = m_rom->base()[offset & 0x7ff]; - break; } return data; @@ -123,7 +126,7 @@ uint8_t spectrum_uspeech_device::mreq_r(offs_t offset) void spectrum_uspeech_device::mreq_w(offs_t offset, uint8_t data) { - switch (offset) + switch (offset & 0xf001) { case 0x1000: // allophone |