Fix 68040/060 bus error RTE + Trace.

This commit is contained in:
Toni Wilen 2024-01-01 18:47:30 +02:00
parent a3379ca2f4
commit 16e325b30a
2 changed files with 7 additions and 2 deletions

View 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)

View 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);
}
}