NES: fix credits sequence in metal slader glory. this may have impact in other MMC5 programs; not tested

This commit is contained in:
goyuken 2014-07-23 20:15:42 +00:00
parent 3e5945660f
commit 235f92c82e
1 changed files with 8 additions and 5 deletions

View File

@ -686,15 +686,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
if (NES.ppu.ppur.status.cycle != 336)
return;
if (!NES.ppu.reg_2001.PPUON)
return;
int sl = NES.ppu.ppur.status.sl + 1;
//not a visible scanline
if (sl >= 241)
if (!NES.ppu.reg_2001.PPUON || sl >= 241)
{
// whenever rendering is off for any reason (vblank or forced disable
// the irq counter resets, as well as the inframe flag (easily verifiable from software)
in_frame = false;
irq_counter = 0;
irq_pending = false;
SyncIRQ();
return;
}
@ -710,6 +712,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
irq_counter++;
if (irq_counter == irq_target)
{
Console.WriteLine("IRQ @{0}", irq_target);
irq_pending = true;
SyncIRQ();
}