From e1480c4a7d469263aa8264aebba8c8f1decb7971 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 8 Feb 2015 16:15:51 +0200 Subject: [PATCH] If interrupt is already active, exit STOP state without waiting. --- newcpu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/newcpu.cpp b/newcpu.cpp index b7f3646f..f4285398 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -3530,8 +3530,8 @@ static int do_specialties (int cycles) unset_special (SPCFLAG_TRAP); Exception (3); } + bool first = true; while ((regs.spcflags & SPCFLAG_STOP) && !(regs.spcflags & SPCFLAG_BRK)) { - isstopped: if (uae_int_requested || uaenet_int_requested) { INTREQ_f (0x8008); @@ -3554,7 +3554,9 @@ isstopped: cputrace.cyclecounter = cputrace.cyclecounter_pre = cputrace.cyclecounter_post = 0; cputrace.readcounter = cputrace.writecounter = 0; } - x_do_cycles (currprefs.cpu_cycle_exact ? 2 * CYCLE_UNIT : 4 * CYCLE_UNIT); + if (!first) + x_do_cycles (currprefs.cpu_cycle_exact ? 2 * CYCLE_UNIT : 4 * CYCLE_UNIT); + first = false; if (regs.spcflags & SPCFLAG_COPPER) do_copper (); -- 2.47.3