Merge pull request #802 from bladeoner/ppu

Backport Only allow instantaneous IRQ when toggling IRQ completely
This commit is contained in:
dborth 2019-01-19 10:35:24 -07:00 committed by GitHub
commit 8640ba22a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1382,7 +1382,13 @@ void S9xSetCPU (uint8 Byte, uint16 Address)
}
if ((Byte & 0x30) != (Memory.FillRAM[0x4200] & 0x30))
{
// Only allow instantaneous IRQ if turning it completely on or off
if ((Byte & 0x30) == 0 || (Memory.FillRAM[0x4200] & 0x30) == 0)
S9xUpdateIRQPositions(true);
else
S9xUpdateIRQPositions(false);
}
// NMI can trigger immediately during VBlank as long as NMI_read ($4210) wasn't cleard.
if ((Byte & 0x80) && !(Memory.FillRAM[0x4200] & 0x80) &&