Simplify NMI trigger.
This commit is contained in:
parent
574f3b1780
commit
aaae363257
@ -412,13 +412,11 @@ void S9xDoHEventProcessing (void)
|
||||
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 > Timings.H_Max / 2))
|
||||
Timings.NMITriggerPos = 0;
|
||||
|
||||
S9xAPUEndScanline();
|
||||
CPU.Cycles -= Timings.H_Max;
|
||||
CPU.PrevCycles -= Timings.H_Max;
|
||||
if (Timings.NMITriggerPos != 0xffff)
|
||||
Timings.NMITriggerPos -= Timings.H_Max;
|
||||
S9xAPUSetReferenceTime(CPU.Cycles);
|
||||
|
||||
CPU.V_Counter++;
|
||||
|
2
dma.cpp
2
dma.cpp
@ -1291,8 +1291,6 @@ bool8 S9xDoDMA (uint8 Channel)
|
||||
if (CPU.NMIPending && (Timings.NMITriggerPos != 0xffff))
|
||||
{
|
||||
Timings.NMITriggerPos = CPU.Cycles + Timings.NMIDMADelay;
|
||||
if (Timings.NMITriggerPos >= Timings.H_Max)
|
||||
Timings.NMITriggerPos -= Timings.H_Max;
|
||||
}
|
||||
|
||||
// Release the memory used in SPC7110 DMA
|
||||
|
3
ppu.cpp
3
ppu.cpp
@ -1520,8 +1520,6 @@ void S9xSetCPU (uint8 Byte, uint16 Address)
|
||||
// then, when to call S9xOpcode_NMI()?
|
||||
CPU.NMIPending = TRUE;
|
||||
Timings.NMITriggerPos = CPU.Cycles + 6 + 6;
|
||||
if (Timings.NMITriggerPos >= Timings.H_Max)
|
||||
Timings.NMITriggerPos -= Timings.H_Max;
|
||||
|
||||
#ifdef DEBUGGER
|
||||
if (Settings.TraceHCEvent)
|
||||
@ -1798,6 +1796,7 @@ uint8 S9xGetCPU (uint16 Address)
|
||||
byte = CPU.IRQLine ? 0x80 : 0;
|
||||
CPU.IRQLine = FALSE;
|
||||
CPU.IRQTransition = FALSE;
|
||||
|
||||
return (byte | (OpenBus & 0x7f));
|
||||
|
||||
case 0x4212: // HVBJOY
|
||||
|
Loading…
Reference in New Issue
Block a user