]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
If interrupt is already active, exit STOP state without waiting.
authorToni Wilen <twilen@winuae.net>
Sun, 8 Feb 2015 14:15:51 +0000 (16:15 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 8 Feb 2015 14:15:51 +0000 (16:15 +0200)
newcpu.cpp

index b7f3646f5f6ef248d3abe9a2f210428c378e0e09..f4285398489f29186e127c98e3ba170bab3de2d2 100644 (file)
@@ -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 ();