Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
PPU: Tweak affected bits for $2006 scroll glitch based on Alien Syndr…
Browse files Browse the repository at this point in the history
…ome (J) behavior (and other hardware tests)

It looks like the horizontal nametable bit is also affected when the write falls on a coarse scroll increment
  • Loading branch information
SourMesen committed Apr 24, 2020
1 parent 5d67994 commit e586ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/PPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ void PPU::UpdateState()
debugger->BreakImmediately(BreakSource::BreakOnPpu2006ScrollGlitch);
}
} else if(_cycle > 0 && (_cycle & 0x07) == 0 && (_cycle <= 256 || _cycle > 320)) {
_state.VideoRamAddr = (_updateVramAddr & ~0x1F) | (_state.VideoRamAddr & _updateVramAddr & 0x1F);
_state.VideoRamAddr = (_updateVramAddr & ~0x41F) | (_state.VideoRamAddr & _updateVramAddr & 0x41F);
shared_ptr<Debugger> debugger = _console->GetDebugger(false);
if(debugger && debugger->CheckFlag(DebuggerFlags::BreakOnPpu2006ScrollGlitch)) {
debugger->BreakImmediately(BreakSource::BreakOnPpu2006ScrollGlitch);
Expand Down

1 comment on commit e586ce7

@ImSpecial
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That shit's expensive.

Please sign in to comment.