NES Fix more then 8 sprites option
This commit is contained in:
parent
9e94bec081
commit
9f7a926437
|
@ -1,7 +1,5 @@
|
||||||
//http://nesdev.parodius.com/bbs/viewtopic.php?p=4571&sid=db4c7e35316cc5d734606dd02f11dccb
|
//http://nesdev.parodius.com/bbs/viewtopic.php?p=4571&sid=db4c7e35316cc5d734606dd02f11dccb
|
||||||
|
|
||||||
//todo - read http://wiki.nesdev.com/w/index.php/PPU_sprite_priority
|
|
||||||
|
|
||||||
//TODO - correctly emulate PPU OFF state
|
//TODO - correctly emulate PPU OFF state
|
||||||
|
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
|
@ -499,7 +497,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
|
|
||||||
if (nes.Settings.AllowMoreThanEightSprites)
|
if (nes.Settings.AllowMoreThanEightSprites)
|
||||||
{
|
{
|
||||||
while (oam_index_aux < 64)
|
while (oam_index_aux < 64 && soam_index_aux<64)
|
||||||
{
|
{
|
||||||
//look for sprites
|
//look for sprites
|
||||||
soam[soam_index_aux * 4] = OAM[oam_index_aux * 4];
|
soam[soam_index_aux * 4] = OAM[oam_index_aux * 4];
|
||||||
|
@ -679,14 +677,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
}
|
}
|
||||||
|
|
||||||
} // sprite pattern fetch loop
|
} // sprite pattern fetch loop
|
||||||
|
|
||||||
//now do the same for extra sprites, but without any cycles run
|
//now do the same for extra sprites, but without any cycles run
|
||||||
if (soam_index_aux>8)
|
if (soam_index_aux>8)
|
||||||
{
|
{
|
||||||
for (int s = 8; s < soam_index_aux; s++)
|
for (int s = 8; s < soam_index_aux; s++)
|
||||||
{
|
{
|
||||||
bool junksprite = (!PPUON);
|
|
||||||
|
|
||||||
t_oam[s].oam_y = soam[s * 4];
|
t_oam[s].oam_y = soam[s * 4];
|
||||||
t_oam[s].oam_ind = soam[s * 4 + 1];
|
t_oam[s].oam_ind = soam[s * 4 + 1];
|
||||||
t_oam[s].oam_attr = soam[s * 4 + 2];
|
t_oam[s].oam_attr = soam[s * 4 + 2];
|
||||||
|
@ -789,31 +785,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
//register before around a full frame, but no games
|
//register before around a full frame, but no games
|
||||||
//should write to those regs during that time, it needs
|
//should write to those regs during that time, it needs
|
||||||
//to wait for vblank
|
//to wait for vblank
|
||||||
/*
|
|
||||||
if (ppudead < 2)
|
|
||||||
{
|
|
||||||
ppur.status.sl = 241;
|
|
||||||
runppu(1);
|
|
||||||
Reg2002_vblank_active = true;
|
|
||||||
runppu(5);
|
|
||||||
runppu(postNMIlines * kLineTime - 6);
|
|
||||||
ppur.status.sl = 0;
|
|
||||||
clear_2002();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ppudead==2)
|
|
||||||
{
|
|
||||||
*/
|
|
||||||
runppu(241 * kLineTime+3);// -8*3);
|
|
||||||
/*
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
runppu(241 * kLineTime);
|
|
||||||
runppu(preNMIlines * kLineTime);
|
|
||||||
idleSynch ^= true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
runppu(241 * kLineTime+3);// -8*3);
|
||||||
ppudead--;
|
ppudead--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue