PPU rendering: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
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. | 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 | == Scanlines 0-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. | 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 == | == Scanline 20 == | ||
This is a dummy scanline, whose sole purpose is to perform the [ | 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. | ||
== Scanlines 21-260 == | |||
These are the visible scanlines, which contain the graphics to be displayed on the screen. | |||
(Details go here) | |||
== Scanline 261 == | |||
The PPU just idles during this scanline. However, this scanline is not considered part of VBlank. |
Revision as of 19:00, 3 April 2011
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-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 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.
Scanlines 21-260
These are the visible scanlines, which contain the graphics to be displayed on the screen. (Details go here)
Scanline 261
The PPU just idles during this scanline. However, this scanline is not considered part of VBlank.