PPU

Memory Map

addr contant addr contant
$0000 ~ $1FFF Pattern Tables $0000 ~ $0FFF Pattern Table 0
    $1000 ~ $1FFF Pattern Table 1
$2000 ~ $3EFF Name Tables $2000 ~ $23BF Name Table 0
    $23C0 ~ $23FF Attribute Table 0
    $2400 ~ $27BF Name Table 1
    $27C0 ~ $27FF Attribute Table 1
    $2800 ~ $2BBF Name Table 2
    $2BC0 ~ $2BFF Attribute Table 2
    $2C00 ~ $2FBF Name Table 3
    $2FC0 ~ $2FFF Attribute Table 3
    $3000 ~ $3EFF Mirrors $2000 ~ $2EFF
$3F00 ~ $3FFF Palettes $3F00 ~ $ 3F0F Image Palette
    $3F10 ~ $3F1F Sprite Palette
    $3F20 ~ $3FFF Mirrors $3F00 ~ $3F1F
$4000 ~ $FFFF Mirrors $0000 ~ $3FFF $4000 ~ $FFFF Mirrors $0000 ~ $3FFF

Registers

Common Name Address Bits Notes
PPUCTRL $2000 VPHB SINN NMI enable (V), PPU master/slave (P), sprite height (H), background tile select (B), sprite tile select (S), increment mode (I), nametable select (NN)
PPUMASK $2001 BGRs bMmG color emphasis (BGR), sprite enable (s), background enable (b), sprite left column enable (M), background left column enable (m), greyscale (G)
PPUSTATUS $2002 VSO- ---- vblank (V), sprite 0 hit (S), sprite overflow (O); read resets write pair for $2005/$2006
OAMADDR $2003 aaaa aaaa OAM read/write address
OAMDATA $2004 dddd dddd OAM data read/write
PPUSCROLL $2005 xxxx xxxx fine scroll position (two writes: X scroll, Y scroll)
PPUADDR $2006 aaaa aaaa PPU read/write address (two writes: most significant byte, least significant byte)
PPUDATA $2007 dddd dddd PPU data read/write
OAMDMA $4014 aaaa aaaa OAM DMA high address

Controller ($2000) > write

NN: Base nametable address(0 = $2000; 1 = ​$2400; 2 = $2800; 3 = $2C00)

I: VRAM address increment per CPU read/write of PPUDATA (0: add 1, going across; 1: add 32, going down)

S: Sprite pattern table address for 8x8 sprites(0: $0000; 1: $1000; ignored in 8x16 mode)

B: Background pattern table address (0: $0000; 1: $1000)

H: Sprite size (0: 8x8 pixels; 1: 8x16 pixels)

P: PPU master/slave select(0: read backdrop from EXT pins; 1: output color on EXT pins)

V: Generate an NMI at the start of the vertical blanking interval (0: off; 1: on)

Mask ($2001) > write

G: Greyscale (0: normal color, 1: produce a greyscale display)

m: 1: Show background in leftmost 8 pixels of screen, 0: Hide

M: 1: Show sprites in leftmost 8 pixels of screen, 0: Hide

b: 1: Show background

s: 1: Show sprites

BGR: Emphasize blue, green, red

Color Palette

Palette Entry RGB Value
00 75, 75, 75
01 27, 1B, 8F
02 00, 00, AB
03 47, 00, 9F
04 8F, 00, 77
05 AB, 00, 13
06 A7, 00, 00
07 7F, 0B, 00
08 43, 2F, 00
09 00, 47, 00
0A 00, 51, 00
0B 00, 3F, 17
0C 1B, 3F, 5F
0D 00, 00, 00
0E 00, 00, 00
0F 00, 00, 00
10 BC, BC, BC
11 00, 73, EF
12 23, 3B, EF
13 83, 00, F3
14 BF, 00, BF
15 E7, 00, 5B
16 DB, 2B, 00
17 CB, 4F, 0F
18 8B, 73, 00
19 00, 97, 00
1A 00, AB, 00
1B 00, 93, 3B
1C 00, 83, 8B
1D 00, 00, 00
1E 00, 00, 00
1F 00, 00, 00
20 FF, FF, FF
21 3F, BF, FF
22 5F, 97, FF
23 A7, 8B, FD
24 F7, 7B, FF
25 FF, 77, B7
26 FF, 77, 63
27 FF, 9B, 3B
28 F3, BF, 3F
29 83, D3, 13
2A 4F, DF, 4B
2B 58, F8, 98
2C 00, EB, DB
2D 00, 00, 00
2E 00, 00, 00
2F 00, 00, 00
30 FF, FF, FF
31 AB, E7, FF
32 C7, D7, FF
33 D7, CB, FF
34 FF, C7, FF
35 FF, C7, DB
36 FF, BF, B3
37 FF, DB, AB
38 FF, E7, A3
39 E3, FF, A3
3A AB, F3, BF
3B B3, FF, CF
3C 9F, FF, F3
3D 00, 00, 00
3E 00, 00, 00
3F 00, 00, 00