PPU rendering
From NESdev Wiki
Jump to navigationJump to search
Work in progress, do not alter.
NTSC PPU
The PPU renders 262 scanlines per frame. Each scanline lasts for 341 PPU clock cycles (113.667 CPU clock cycles; 1 CPU cycle = 3 PPU cycles), with each clock cycle producing one pixel.
Scanlines 0 to 19
These occur during VBlank. The VBlank flag of the PPU is pulled low during scanline 0, so the VBlank NMI occurs here. During this time, the PPU makes no memory accesses, so PPU memory can be freely accessed by the program.
Scanline 20
This is a dummy scanline, whose sole purpose is to perform the [PPU_Sprite_Evaluation|sprite evaluation] for the next scanline. Although no pixels are rendered for this scanline, the PPU still makes the same memory accesses it would for a regular scanline.