mirror of https://github.com/snes9xgit/snes9x.git
fix IRQ v-counter edge case
This commit is contained in:
parent
3c8804d6ca
commit
ef683d61c6
|
@ -291,8 +291,11 @@ static inline void S9xCheckInterrupts (void)
|
|||
if (PPU.VTimerEnabled)
|
||||
{
|
||||
int32 vcounter = CPU.V_Counter;
|
||||
if (CPU.Cycles >= Timings.H_Max && (!PPU.HTimerEnabled || PPU.HTimerPosition < CPU.PrevCycles))
|
||||
if (CPU.Cycles >= Timings.H_Max && (!PPU.HTimerEnabled || PPU.HTimerPosition < CPU.PrevCycles)) {
|
||||
vcounter++;
|
||||
if(vcounter >= Timings.V_Max)
|
||||
vcounter = 0;
|
||||
}
|
||||
|
||||
if (vcounter != PPU.VTimerPosition)
|
||||
thisIRQ = FALSE;
|
||||
|
|
Loading…
Reference in New Issue