mirror of https://github.com/snes9xgit/snes9x.git
Fix some IRQ bits.
This commit is contained in:
parent
0d1bd3f5ae
commit
37954fe510
|
@ -229,7 +229,7 @@ void S9xMainLoop (void)
|
|||
}
|
||||
}
|
||||
|
||||
if (CPU.Cycles >= Timings.NextIRQTimer || CPU.IRQExternal)
|
||||
if ((CPU.Cycles >= Timings.NextIRQTimer || CPU.IRQExternal) && !CPU.IRQLine)
|
||||
{
|
||||
if (CPU.IRQPending)
|
||||
CPU.IRQPending--;
|
||||
|
|
4
ppu.cpp
4
ppu.cpp
|
@ -312,7 +312,7 @@ void S9xUpdateIRQPositions (void)
|
|||
|
||||
PPU.VTimerPosition = PPU.IRQVBeamPos;
|
||||
|
||||
if ((PPU.HTimerPosition >= Timings.H_Max) && (PPU.IRQHBeamPos < 340))
|
||||
if ((PPU.HTimerPosition >= Timings.H_Max) && (PPU.IRQHBeamPos < 340) && PPU.HTimerEnabled)
|
||||
{
|
||||
PPU.HTimerPosition -= Timings.H_Max;
|
||||
PPU.VTimerPosition++;
|
||||
|
@ -336,7 +336,7 @@ void S9xUpdateIRQPositions (void)
|
|||
if (CPU.V_Counter == PPU.VTimerPosition)
|
||||
Timings.NextIRQTimer = 0;
|
||||
else
|
||||
Timings.NextIRQTimer = CyclesUntilNext (0, PPU.VTimerPosition);
|
||||
Timings.NextIRQTimer = CyclesUntilNext (ONE_DOT_CYCLE + Timings.IRQTriggerCycles, PPU.VTimerPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue