From a4f6a78d7f0e9b3048bec09fb0ad23eedf317078 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 26 May 2015 09:25:45 +0200 Subject: [PATCH] fix regression with interrupts --- src/emu/cpu/hmcs40/hmcs40.c | 10 +++++----- 1 file 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--;