]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix 68040/060 bus error RTE + Trace.
authorToni Wilen <twilen@winuae.net>
Mon, 1 Jan 2024 16:47:30 +0000 (18:47 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 1 Jan 2024 16:47:30 +0000 (18:47 +0200)
cpummu.cpp
newcpu.cpp

index 292431a12d0ce81968b5126b544f5ec7b2e38078..15e512a1746caff2ebae7c65d59ab99193820ece 100644 (file)
@@ -1563,7 +1563,7 @@ void m68k_do_rte_mmu040 (uaecptr a7)
                write_log (_T("MMU restarted MOVEM EA=%08X\n"), mmu040_movem_ea);
 #endif
        }
-       if (currprefs.mmu_model == 68060 || mmu_restart) {
+       if (mmu_restart) {
                set_special(SPCFLAG_MMURESTART);
        }
 }
@@ -1573,6 +1573,7 @@ void m68k_do_rte_mmu060 (uaecptr a7)
 #if 0
        mmu060_state = 2;
 #endif
+       set_special(SPCFLAG_MMURESTART);
 }
 
 void flush_mmu040 (uaecptr addr, int n)
index 0017dd559229ec8092cdbc6cd84cff14692d0529..c1b5685ff226f1ddc57024317f9d68473f25a43b 100644 (file)
@@ -4728,6 +4728,10 @@ static int do_specialties (int cycles)
        if (spcflags & SPCFLAG_MMURESTART) {
                // can't have interrupt when 040/060 CPU reruns faulted instruction
                unset_special(SPCFLAG_MMURESTART);
+
+               if (spcflags & SPCFLAG_TRACE) {
+                       do_trace();
+               }
        } else {
 
                if (spcflags & SPCFLAG_DOTRACE) {
@@ -4758,7 +4762,7 @@ static int do_specialties (int cycles)
                        if (spcflags & SPCFLAG_INT) {
                                int intr = intlev();
                                unset_special (SPCFLAG_INT | SPCFLAG_DOINT);
-                               if (intr > 0 && (intr > regs.intmask || intr == 7))
+                               if (intr > regs.intmask || intr == 7)
                                        do_interrupt(intr);
                        }
                }