PPU registers

From SNESdev Wiki
Revision as of 00:12, 26 April 2022 by Fiskbit (talk | contribs) (Minor fixes.)
Jump to navigationJump to search

Display configuration

INIDISP - Screen display ($2100 write)

7  bit  0
---- ----
F... BBBB
|    ||||
|    ++++- Screen brightness (linear steps from 0 = none to $F = full)
+--------- Force blanking

BGMODE - BG mode and Character size ($2105 write)

7  bit  0
---- ----
4321 PMMM
|||| ||||
|||| |+++- BG mode
|||| +---- Mode 1 BG3 priority (0 = normal, 1 = high)
|||+------ BG1 character size (0 = 8x8, 1 = 16x16)
||+------- BG2 character size (0 = 8x8, 1 = 16x16)
|+-------- BG3 character size (0 = 8x8, 1 = 16x16)
+--------- BG4 character size (0 = 8x8, 1 = 16x16)
 Mode |  BG bit depth   |  Tile   |      Priorities (front -> back)        |                      Notes                      
      | BG1 BG2 BG3 BG4 | offsets |                                        |                                                 
  0   |  2   2   2   2  |   No    |    S3 1H 2H S2 1L 2L S1 3H 4H S0 3L 4L |                                                 
  1   |  4   4   2      |   No    |    S3 1H 2H S2 1L 2L S1 3H    S0 3L    | BG3 priority = 0                                
      |                 |         | 3H S3 1H 2H S2 1L 2L S1       S0 3L    | BG3 priority = 1                                
  2   |  4   4          |   Yes   |    S3 1H    S2 2H    S1 1L    S0 2L    |                                                 
  3   |  8   4          |   No    |    S3 1H    S2 2H    S1 1L    S0 2L    |                                                 
  4   |  8   2          |   Yes   |    S3 1H    S2 2H    S1 1L    S0 2L    |                                                 
  5   |  4   2          |   No    |    S3 1H    S2 2H    S1 1L    S0 2L    | Fixed 16 pixel char width. Forced high-res mode.
  6   |  4              |   Yes   |    S3 1H    S2       S1 1L    S0       | Fixed 16 pixel char width. Forced high-res mode.
  7   |  8              |   No    |    S3       S2       S1 1L    S0       | Fixed 8x8 char size.                            
7+EXT |  8   7          |   No    |    S3       S2 2H    S1 1L    S0 2L    | Fixed 8x8 char size. BG2 bit 7 acts as priority.

MOSAIC - Screen pixelation ($2106 write)

7  bit  0
---- ----
SSSS 4321
|||| ||||
|||| |||+- Enable BG1 mosaic
|||| ||+-- Enable BG2 mosaic
|||| |+--- Enable BG3 mosaic
|||| +---- Enable BG4 mosaic
++++------ Mosaic size in pixels

BGxSC - BG1-4 tilemap address and size ($2107-$210A write)

7  bit  0
---- ----
AAAA AAYX
|||| ||||
|||| |||+- Horizontal tilemap count (0 = 1 tilemap, 1 = 2 tilemaps)
|||| ||+-- Vertical tilemap count (0 = 1 tilemap, 1 = 2 tilemaps)
++++-++--- Tilemap VRAM address (address = AAAAAA << 10)

BG12NBA - BG1 and BG2 CHR word base address ($210B write)

7  bit  0
---- ----
BBBB AAAA
|||| ++++- BG1 CHR word base address (address = AAAA << 12)
++++------ BG2 CHR word base address (address = BBBB << 12)

BG34NBA - BG3 and BG4 CHR word base address ($210C write)

7  bit  0
---- ----
DDDD CCCC
|||| ++++- BG3 CHR word base address (address = CCCC << 12)
++++------ BG4 CHR word base address (address = DDDD << 12)

W12SEL - Window Mask Settings for BG1 and BG2 ($2123 write)

7  bit  0
---- ----
DdCc BbAa
|||| ||||
|||| |||+- Invert window 1 for BG1
|||| ||+-- Enable window 1 for BG1
|||| |+--- Invert window 2 for BG1
|||| +---- Enable window 2 for BG1
|||+------ Invert window 1 for BG2
||+------- Enable window 1 for BG2
|+-------- Invert window 2 for BG2
+--------- Enable window 2 for BG2

W34SEL - Window Mask Settings for BG3 and BG4 ($2124 write)

7  bit  0
---- ----
HhGg FfEe
|||| ||||
|||| |||+- Invert window 1 for BG3
|||| ||+-- Enable window 1 for BG3
|||| |+--- Invert window 2 for BG3
|||| +---- Enable window 2 for BG3
|||+------ Invert window 1 for BG4
||+------- Enable window 1 for BG4
|+-------- Invert window 2 for BG4
+--------- Enable window 2 for BG4

WOBJSEL - Window Mask Settings for OBJ and Color Window ($2125 write)

7  bit  0
---- ----
LlKk JjIi
|||| ||||
|||| |||+- Invert window 1 for OBJ
|||| ||+-- Enable window 1 for OBJ
|||| |+--- Invert window 2 for OBJ
|||| +---- Enable window 2 for OBJ
|||+------ Invert window 1 for color math
||+------- Enable window 1 for color math
|+-------- Invert window 2 for color math
+--------- Enable window 2 for color math

TM - Main screen layer enable ($212C write)

7  bit  0
---- ----
...O 4321
   | |||+- Enable BG1 on main screen
   | ||+-- Enable BG2 on main screen
   | |+--- Enable BG3 on main screen
   | +---- Enable BG4 on main screen
   +------ Enable OBJ on main screen

TS - Subscreen layer enable ($212D write)

7  bit  0
---- ----
...O 4321
   | |||+- Enable BG1 on subscreen
   | ||+-- Enable BG2 on subscreen
   | |+--- Enable BG3 on subscreen
   | +---- Enable BG4 on subscreen
   +------ Enable OBJ on subscreen

TMW - Main screen layer window enable ($212E write)

7  bit  0
---- ----
...O 4321
   | |||+- Apply enabled windows to main screen BG1
   | ||+-- Apply enabled windows to main screen BG2
   | |+--- Apply enabled windows to main screen BG3
   | +---- Apply enabled windows to main screen BG4
   +------ Apply enabled windows to main screen OBJ

TSW - Subscreen layer window enable ($212F write)

7  bit  0
---- ----
...O 4321
   | |||+- Apply enabled windows to subscreen BG1
   | ||+-- Apply enabled windows to subscreen BG2
   | |+--- Apply enabled windows to subscreen BG3
   | +---- Apply enabled windows to subscreen BG4
   +------ Apply enabled windows to subscreen OBJ

SETINI - Screen Mode/Video Select ($2133 write)

7  bit  0
---- ----
EX.. HOiI
||   ||||
||   |||+- Screen interlacing
||   ||+-- OBJ interlacing
||   |+--- Overscan mode
||   +---- High-res mode
|+-------- EXTBG mode
+--------- External sync