-
Notifications
You must be signed in to change notification settings - Fork 859
PPU: no 8-sprite-per-scanline limit or sprite overflow flag #604
Copy link
Copy link
Open
Labels
accuracyHardware accuracy improvementHardware accuracy improvementbugcomponent: ppuPPU / graphics (ppu/)PPU / graphics (ppu/)difficulty: mediumModerate change requiring understanding of one subsystemModerate change requiring understanding of one subsystempriority: highSignificantly wrong behavior affecting many gamesSignificantly wrong behavior affecting many games
Description
Activity
Metadata
Metadata
Assignees
Labels
accuracyHardware accuracy improvementHardware accuracy improvementbugcomponent: ppuPPU / graphics (ppu/)PPU / graphics (ppu/)difficulty: mediumModerate change requiring understanding of one subsystemModerate change requiring understanding of one subsystempriority: highSignificantly wrong behavior affecting many gamesSignificantly wrong behavior affecting many games
Summary
The PPU renders all 64 sprites on every scanline. Real hardware only evaluates 8 sprites per scanline — additional sprites are hidden (with the overflow flag set in $2002 bit 5).
Impact
Missing sprite limit
Games that rely on sprite flickering look wrong. Many action games deliberately rotate sprite priority each frame so that flickering makes all sprites visible. Without the limit, there's no flicker and all sprites render simultaneously, which can look correct but also produces visual differences.
Missing overflow flag
The sprite overflow flag ($2002 bit 5) is never set. Games or demos that poll this flag will hang or behave incorrectly.
Implementation notes
Sprite evaluation should:
The sprite overflow bug (incorrect evaluation after finding 8 sprites) should also be considered for accuracy.
References