]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
68020 CE interrupt change
authorToni Wilen <twilen@winuae.net>
Sun, 19 Apr 2026 16:15:12 +0000 (19:15 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 19 Apr 2026 16:15:12 +0000 (19:15 +0300)
newcpu.cpp

index a60f42bb74b96cb5a6994f06ae59fd841a6b1611..b0ace3ad1426c20c564439d61c9d899a2b574dc3 100644 (file)
@@ -1405,7 +1405,7 @@ static void set_x_funcs (void)
 
        icache_fetch = get_longi;
        icache_fetch_word = NULL;
-       if (currprefs.cpu_cycle_exact) {
+       if (currprefs.cpu_memory_cycle_exact) {
                icache_fetch = mem_access_delay_longi_read_ce020;
        }
        if (currprefs.cpu_model >= 68040 && currprefs.cpu_memory_cycle_exact) {
@@ -2408,8 +2408,9 @@ static void activate_trace(void)
 void checkint(void)
 {
        doint();
-       if (!m68k_accurate_ipl && !currprefs.cachesize && !(regs.spcflags & SPCFLAG_INT) && (regs.spcflags & SPCFLAG_DOINT))
+       if (!m68k_accurate_ipl && !currprefs.cachesize && !(regs.spcflags & SPCFLAG_INT) && (regs.spcflags & SPCFLAG_DOINT)) {
                set_special(SPCFLAG_INT);
+       }
 }
 
 void REGPARAM2 MakeSR(void)
@@ -4822,7 +4823,7 @@ static int do_specialties (int cycles)
                        unset_special(SPCFLAG_UAEINT);
                }
 
-               if (m68k_interrupt_delay) {
+               if (m68k_interrupt_delay && m68k_accurate_ipl) {
                        int ipl = time_for_interrupt();
                        if (ipl) {
                                unset_special(SPCFLAG_INT);
@@ -4831,7 +4832,7 @@ static int do_specialties (int cycles)
                } else {
                        if (spcflags & SPCFLAG_INT) {
                                int intr = intlev();
-                               unset_special (SPCFLAG_INT | SPCFLAG_DOINT);
+                               unset_special(SPCFLAG_INT | SPCFLAG_DOINT);
                                if (intr > regs.intmask || (intr == 7 && intr > regs.lastipl)) {
                                        do_interrupt(intr);
                                }