summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/tms9900
diff options
context:
space:
mode:
author Michael Zapf <github@mizapf.de>2024-04-01 02:03:55 +0200
committer Michael Zapf <github@mizapf.de>2024-04-01 02:05:25 +0200
commit8203e170a1ade96f2b934acf1316130f81431632 (patch)
tree92df6dcb1ce96f3975d0ddb57dbc61e4cd5db825 /src/devices/cpu/tms9900
parent033a996db6fc48a77b6058988551990d9f05802b (diff)
tms9900: Fix undefined behaviour when reset occurs during a data derivation sequence.
Diffstat (limited to 'src/devices/cpu/tms9900')
-rw-r--r--src/devices/cpu/tms9900/tms9900.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp
index 49e60c1a28b..2f5c2d413d3 100644
--- a/src/devices/cpu/tms9900/tms9900.cpp
+++ b/src/devices/cpu/tms9900/tms9900.cpp
@@ -1346,6 +1346,12 @@ void tms99xx_device::service_interrupt()
m_reset = false;
LOG("** RESET triggered\n");
+
+ // RESET could occur during a data derivation sequence, so we have to
+ // prevent the execution loop to return into that sequence by
+ // clearing the return index. This fixes a bug that leads to undefined
+ // behaviour in that situation.
+ m_caller_index = NOPRG;
}
else
{