Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
ppu [2021/09/05 16:59] – [Layer 1 and 2 registers] simerppu [2021/09/05 17:03] – [Colors and palettes] simer
Line 127: Line 127:
 The sprite position refers to the center of the sprite (rather than top left corner) and contains signed values with pixel position x=160,y=128 as the origin of the coordinate system and positive Y going upwards. The sprite position refers to the center of the sprite (rather than top left corner) and contains signed values with pixel position x=160,y=128 as the origin of the coordinate system and positive Y going upwards.
  
-Unlike for layers, there is no tile and attribute map: a sprite is made of one single tile, which ID is stored directly in the corresponding register for the sprite.+Unlike for layers, there is no tile and attribute map: a sprite is made of one single tile, with the character ID is stored directly in the corresponding register for the sprite.
  
 +The sprite attribute register format is the same as the one for tile layers, with the exception of bit 14 being assigned to blend enable.
 ===== Colors and palettes ===== ===== Colors and palettes =====
  
Line 139: Line 140:
 In the 16-bit color mode, the value of each pixel in the segment memory directly stores a color, otherwise the value refers to a palette index.  In the 16-bit color mode, the value of each pixel in the segment memory directly stores a color, otherwise the value refers to a palette index. 
 The palette memory is mapped to 0x2B00-0x2BFF and stores 256 different colors in the format mentioned above. The palette memory is mapped to 0x2B00-0x2BFF and stores 256 different colors in the format mentioned above.
-This memory can be split into multiple palettes which can then chosen by a 4-bit value stored for each sprite, tile layer or individual tile (if the attribute map mode is enabled).+This memory can be split into multiple palette banks which can then chosen by a 4-bit value stored for each sprite, tile layer or individual tile (if the attribute map mode is enabled).
  
 The chosen color from the palette memory is determined by the chosen color depth and palette of each tile/sprite and value of each pixel as follows: The chosen color from the palette memory is determined by the chosen color depth and palette of each tile/sprite and value of each pixel as follows:
  
-^ Color depth ^ Chosen color                ^+^ Color depth ^ Chosen color memory index   ^
 | 2-bit       | Palette * 16 + Index        | | 2-bit       | Palette * 16 + Index        |
 | 4-bit       | Palette * 16 + Index        | | 4-bit       | Palette * 16 + Index        |
ppu.txt · Last modified: 2021/09/05 18:10 by simer
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0