Fix a bug in OAM regs

passes oam_stress
This commit is contained in:
alyosha-tas 2016-06-18 12:07:53 -04:00 committed by GitHub
parent 55feae8bf6
commit bc17e6519c
2 changed files with 28 additions and 19 deletions

View File

@ -396,6 +396,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
reg_2003++;
}
byte read_2004()
{
// behaviour depends on whether things are being rendered or not
if (reg_2001.show_bg || reg_2001.show_obj)
{
if (ppur.status.sl < 241)
{
@ -415,7 +418,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
return soam[0];
}
} else
}
else
{
return OAM[reg_2003];
}
}
else
{
return OAM[reg_2003];
}

View File

@ -138,7 +138,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
//Not sure if this is correct. According to Matt Conte and my own tests, it is. Timing is probably off, though.
//NOTE: Not having this here breaks a Super Donkey Kong game.
reg_2003 = 0;
if (reg_2001.show_obj || reg_2001.show_bg) reg_2003 = 0;
//this was repeatedly finetuned from the fceux days thrugh the old cpu core and into the new one to pass 05-nmi_timing.nes
//note that there is still some leniency. for instance, 4,2 will pass in addition to 3,3