Skip to content

PPU (video‐device)

Sean Dawson edited this page Jul 3, 2024 · 27 revisions

Specs

Will start similar to the SNES PPU but may change over time

RAM

64KB SRAM (32 KWord)

Palette Data

256 entries x 16bit (5 bits per colour)

Sprite Data

128 x 32bit entries

Address Range

Where XX is the segment the PPU is mapped to

Registers

0x00XX_0000 - 0x00XX_FFFF

Palette Data

0x00XX_6000 - 0x00XX_6100

Sprite Data

0x00XX_7000 - 0x00XX_7100

Direct VRAM access (accessing outside of v/hblank is a no op)

0x00XX_8000 - 0x00XX_FFFF

Graphics Format

Simple packed 2bpp/4bpp palette offset from sprite/tile base palette index

Graphics Mode

Start with a single graphics mode similar to mode 1 on the snes

Three background layers, (2x4bpp, 1x2bpp) Three sprite layers (all 4bpp)

B1 is the 2bpp

Front S1 B1 S2 B2 S3 B3 Back

Registers

0x0000 : Base Config

0

1

2

3

4

5

6

7

8

9-C

D-F

Graphics Disable

B1 Disabled

B2 Disabled

B3 Disabled

Reserved

S1 Disabled

S2 Disabled

S3 Disabled

Reserved

Screen Brightness

-

0x0001 : Tile Sizes

Tile Size: Default (0) is 8x8, 1 is 16x16 Tilemap Size: Default (0) is single, 1 is double (two tile maps)

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

B1 Size Toggle

B2 Size Toggle

B3 Size Toggle

Reserved

S1 Size Toggle

S2 Size Toggle

S3 Size Toggle

Reserved

B1 Tilemap Size X Toggle

B2 Tilemap Size X Toggle

B3 Tilemap Size X Toggle

Reserved

B1 Tilemap Size Y Toggle

B2 Tilemap Size Y Toggle

B3 Tilemap Size Y Toggle

Reserved

0x0002 - 0x0005 : BG Tilemap Addresses

0x0002 = B1 0x0003 = B2 0x0004 = B3 0x0005 = Reserved

0-16

Base address in VRAM segment of tilemap data

0x006-0x0009 : BG Tile Addresses

0x0006 = B1 0x0007 = B2 0x0008 = B3 0x0009 = Reserved

0-16

Base address in VRAM segment of BG tile data

0x000A-0x000D : BG Scroll X

0x000A = B1 0x000B = B2 0x000C = B3 0x000D = Reserved

0-9

A-F

-

BG scroll X amount in pixels (0-1023)

0x000E-0x0011 : BG Scroll Y

0-9

A-F

-

BG scroll Y amount in pixels (0-1023)

0x0012 : Sprite Tile Address

0-16

Base address in VRAM segment of sprite tile data

0x0013 : Status Register

Not much here yet, but will probably be populated with more things after the PPU is fleshed out more

Output Mode Flag: 0 = NTSC, 1 = PAL

0-3

4

5-F

PPU Version

Output Mode Flag

Reserved

Potential features: