Fixed oam memory getting overridden during prerender scanline when rendering was disabled. oam_stress & cpu_dummy_writes_ppumem tests now pass.
This commit is contained in:
parent
1424f255e4
commit
181e461db1
1 changed files with 2 additions and 1 deletions
|
@ -612,7 +612,8 @@ void PPU::ProcessPrerenderScanline()
|
|||
{
|
||||
ProcessPreVBlankScanline();
|
||||
|
||||
if(_cycle == 0 && _state.SpriteRamAddr >= 0x08) {
|
||||
if(IsRenderingEnabled() && _cycle == 0 && _state.SpriteRamAddr >= 0x08) {
|
||||
//This should only be done if rendering is enabled (otherwise oam_stress test fails immediately)
|
||||
//"If OAMADDR is not less than eight when rendering starts, the eight bytes starting at OAMADDR & 0xF8 are copied to the first eight bytes of OAM"
|
||||
memcpy(_spriteRAM, _spriteRAM + (_state.SpriteRamAddr & 0xF8), 8);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue