flipacholas / Architecture-of-consoles

Technical articles about console architecture
https://www.copetti.org/writings/consoles/
Creative Commons Attribution 4.0 International
816 stars 52 forks source link

NES: No auto flicker #255

Closed cdmaczane closed 5 months ago

cdmaczane commented 5 months ago

The article says that the PPU could automatically increase the number of sprites on a scanline by alternating each frame, causing flicker. In reality only the first 8 sprites are displayed and the rest are ignored. To get around this, games would alternate the order of sprites stored in OAM each frame. Begin to end one frame, end to begin the next.

If you look carefully, many games will show overlapping sprites moving in front and behind each other on alternating frames, even when there are fewer than 8 sprites on a scanline. There are better ways to handle it, for example always giving certain objects such as the main character a fixed position in OAM. This mechanism is more complex however and might burn extra cycles.

flipacholas commented 5 months ago

Thanks!