From d06a1d8b3ff4678d9536be405dffcdd09783456e Mon Sep 17 00:00:00 2001 From: holub Date: Wed, 12 Jun 2024 17:02:48 -0400 Subject: cpu/z80/z80.cpp: Move busrq check to service step (#12475) --- src/devices/cpu/z80/z80.cpp | 2 +- src/devices/cpu/z80/z80.lst | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index 4fe0ec4e8e7..6dea6725b86 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -809,7 +809,7 @@ void nsc800_device::do_op() ****************************************************************************/ void z80_device::execute_run() { - if (m_wait_state || m_busrq_state) + if (m_wait_state) { m_icount = 0; // stalled return; diff --git a/src/devices/cpu/z80/z80.lst b/src/devices/cpu/z80/z80.lst index 0d23acf39c6..de6b45f792f 100644 --- a/src/devices/cpu/z80/z80.lst +++ b/src/devices/cpu/z80/z80.lst @@ -135,13 +135,10 @@ macro retn macro z80n:retn m_out_retn_seen_cb(0); call pop - if (m_stackless) - { + if (m_stackless) { m_pc.b.l = m_in_nextreg_cb(0xc2); m_pc.b.h = m_in_nextreg_cb(0xc3); - } - else - { + } else { PC = TDAT; } LOGINT("RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); WZ = PC; m_iff1 = m_iff2; @@ -501,14 +498,17 @@ macro ncs800:check_interrupts # ROP ########################################################## ffff + if (m_busrq_state) { + m_icount = 0; + return; + } call check_interrupts m_after_ei = false; m_after_ldair = false; PRVPC = PCD; debugger_instruction_hook(PCD); call rop - if (m_halt) - { + if (m_halt) { PC--; m_ref = 0xffff00; return; -- cgit v1.2.3