summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/spectrum/intf1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/spectrum/intf1.cpp')
-rw-r--r--src/devices/bus/spectrum/intf1.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/bus/spectrum/intf1.cpp b/src/devices/bus/spectrum/intf1.cpp
index 344aaf61841..a5e1859e28a 100644
--- a/src/devices/bus/spectrum/intf1.cpp
+++ b/src/devices/bus/spectrum/intf1.cpp
@@ -106,6 +106,9 @@ READ_LINE_MEMBER(spectrum_intf1_device::romcs)
return m_romcs | m_exp->romcs();
}
+// the Interface 1 looks for specific bus conditions to enable / disable the expansion overlay ROM
+
+// the enable must occur BEFORE the opcode is fetched, as the opcode must be fetched from the expansion ROM
void spectrum_intf1_device::opcode_fetch(offs_t offset)
{
m_exp->opcode_fetch(offset);
@@ -117,6 +120,19 @@ void spectrum_intf1_device::opcode_fetch(offs_t offset)
case 0x0008: case 0x1708:
m_romcs = 1;
break;
+ }
+ }
+}
+
+// the disable must occur AFTER the opcode fetch, or the incorrect opcode is fetched for 0x0700
+void spectrum_intf1_device::opcode_fetch_post(offs_t offset)
+{
+ m_exp->opcode_fetch_post(offset);
+
+ if (!machine().side_effects_disabled())
+ {
+ switch (offset)
+ {
case 0x0700:
m_romcs = 0;
break;
@@ -124,6 +140,7 @@ void spectrum_intf1_device::opcode_fetch(offs_t offset)
}
}
+
uint8_t spectrum_intf1_device::mreq_r(offs_t offset)
{
uint8_t data = 0xff;