From: Toni Wilen Date: Sat, 26 Sep 2020 15:09:30 +0000 (+0300) Subject: Interrupt could have been lost in some edge case situation. X-Git-Tag: 4900~301 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2d5d8649c46aa4c0544a1192572b660ac9a8675d;p=francis%2Fwinuae.git Interrupt could have been lost in some edge case situation. --- diff --git a/newcpu.cpp b/newcpu.cpp index 93865be2..5b2f8403 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -4343,7 +4343,8 @@ void doint(void) #endif if (m68k_interrupt_delay) { regs.ipl_pin = intlev (); - set_special(SPCFLAG_INT); + if (regs.ipl_pin > regs.intmask || regs.ipl_pin == 7) + set_special(SPCFLAG_INT); return; } if (currprefs.cpu_compatible && currprefs.cpu_model < 68020) @@ -4550,8 +4551,8 @@ static int do_specialties (int cycles) } if (m68k_interrupt_delay) { - unset_special(SPCFLAG_INT); if (time_for_interrupt ()) { + unset_special(SPCFLAG_INT); do_interrupt (regs.ipl); } } else { @@ -4854,7 +4855,7 @@ cont: log_dma_record (); } - if (r->spcflags || time_for_interrupt ()) { + if (r->spcflags) { if (do_specialties (0)) exit = true; } @@ -4864,7 +4865,7 @@ cont: } } CATCH (prb) { bus_error(); - if (r->spcflags || time_for_interrupt()) { + if (r->spcflags) { if (do_specialties(0)) exit = true; }