summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2015-05-26 09:25:45 +0200
committer hap <happppp@users.noreply.github.com>2015-05-26 09:25:45 +0200
commita4f6a78d7f0e9b3048bec09fb0ad23eedf317078 (patch)
treeb63c03248e70047bcb5f1020945c1affa8e8dc2b /src
parentc5b5e9ac1331944e97dc7b159179c3311416d809 (diff)
fix regression with interrupts
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/hmcs40/hmcs40.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/cpu/hmcs40/hmcs40.c b/src/emu/cpu/hmcs40/hmcs40.c
index 005a7c03b83..1adef6ea242 100644
--- a/src/emu/cpu/hmcs40/hmcs40.c
+++ b/src/emu/cpu/hmcs40/hmcs40.c
@@ -557,18 +557,18 @@ void hmcs40_cpu_device::execute_run()
if ((m_prev_op & 0x3e0) == 0x340)
m_pc = ((m_page << 6) | (m_pc & 0x3f)) & m_pcmask;
+ // remember previous state
+ m_prev_op = m_op;
+ m_prev_pc = m_pc;
+
// check/handle interrupt, but not in the middle of a long jump
- if (m_ie && (m_iri || m_irt) && (m_op & 0x3e0) != 0x340)
+ if (m_ie && (m_iri || m_irt) && (m_prev_op & 0x3e0) != 0x340)
{
do_interrupt();
if (m_icount <= 0)
break;
}
- // remember previous state
- m_prev_op = m_op;
- m_prev_pc = m_pc;
-
// fetch next opcode
debugger_instruction_hook(this, m_pc);
m_icount--;