From 4c9575b13683903dd6cf451207f04de9eaab7206 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 19 Apr 2026 19:15:12 +0300 Subject: [PATCH] 68020 CE interrupt change --- newcpu.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/newcpu.cpp b/newcpu.cpp index a60f42bb..b0ace3ad 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -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); } -- 2.47.3