]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
68020/030 CE delayed interrupt fix
authorToni Wilen <twilen@winuae.net>
Mon, 24 Jan 2022 18:34:12 +0000 (20:34 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 24 Jan 2022 18:34:12 +0000 (20:34 +0200)
newcpu.cpp

index 642448026b9607f3d353a2d889d1cab269119b05..8afe100c574150b59f78f9a04d05781d65d15117 100644 (file)
@@ -4848,6 +4848,7 @@ static void m68k_run_1_ce (void)
                                }
 
                                r->instruction_pc = m68k_getpc ();
+
                                (*cpufunctbl[r->opcode])(r->opcode);
                                if (!regs.loop_mode)
                                        regs.ird = regs.opcode;
@@ -5666,13 +5667,12 @@ insretry:
                                } else {
 
                                        regs.instruction_cnt++;
+                                       regs.ipl = regs.ipl_pin;
                                        if (regs.spcflags || time_for_interrupt ()) {
                                                if (do_specialties (0))
                                                        return;
                                        }
 
-                                       regs.ipl = regs.ipl_pin;
-
                                }
 
                        }
@@ -5923,21 +5923,21 @@ static void m68k_run_2ce (void)
                                regs.instruction_cnt++;
 
                cont:
+                               regs.ipl = regs.ipl_pin;
                                if (r->spcflags || time_for_interrupt ()) {
                                        if (do_specialties (0))
                                                exit = true;
                                }
 
-                               regs.ipl = regs.ipl_pin;
 
                        }
                } CATCH(prb) {
                        bus_error();
+                       regs.ipl = regs.ipl_pin;
                        if (r->spcflags || time_for_interrupt()) {
                                if (do_specialties(0))
                                        exit = true;
                        }
-                       regs.ipl = regs.ipl_pin;
                } ENDTRY
        }
 }