Don't continuously skip over NMI triggers that happened late in the scanline.

This commit is contained in:
Brandon Wright 2018-05-17 14:42:10 -05:00
parent e14a32dd8c
commit 7f88063b84
1 changed files with 4 additions and 0 deletions

View File

@ -412,6 +412,10 @@ void S9xDoHEventProcessing (void)
SuperFX.oneLineDone = FALSE; SuperFX.oneLineDone = FALSE;
} }
/* Did we skip over a late NMI Trigger Pos? If so, reschedule it immediately. */
if (CPU.NMIPending && (CPU.Cycles >= Timings.NMITriggerPos))
Timings.NMITriggerPos = 0;
S9xAPUEndScanline(); S9xAPUEndScanline();
CPU.Cycles -= Timings.H_Max; CPU.Cycles -= Timings.H_Max;
CPU.PrevCycles -= Timings.H_Max; CPU.PrevCycles -= Timings.H_Max;