![]() Hue $0 is light gray $1 to $C are blue to red to green to cyan $D is dark gray. The palette for the background runs from VRAM $3F00 to $3F0F the palette for the sprites runs from $3F10 to $3F1F. Unlike most display systems you run into nowadays, NES's palette is HSV. This is why games that use the horizontal mirroring mode for diagonal scrolling often have color artifacts on one side of the screen (on the right side in Super Mario Brothers 3 on the trailing side of the scroll in Kirby's Adventure). Nametable tiles are 8x8 pixels, and the $2001 mask is 8 pixels wide, but attribute table tiles are 16x16 pixels. +-+-+-+-+ or 32x32 game pieces (width of SMB pipe). | | | | | 16x16 game pieces (size of SMB ? block) | | | | | palette of a 2x2 cell (16x16 pixel) +-+-+-+-+ and two bits of each byte control the At $23C0, $27C0, $2BC0, and $2FC0, there is an "attribute table." Each byte in the attribute table controls the palette of a 4x4 cell (32x32 pixel) square, This is admittedly one of the hardest things to grasp about the PPU. +-+-+ Bros.) or $2400 to $2000Įach byte in the nametable controls one character cell. The NES has four nametables, arranged in a 2x2 pattern: Sprites do NOT wrap around from one side to the other. ||+- Priority (0: in front of background 1: behind background) Hide a sprite byįor 8x8 sprites, the tile number in VRAM of this sprite. Sprite's Y coordinate before writing it here. Sprite data is delayed by one scanline you must subtract 1 from the Each sprite's information occupies four bytes. ![]() Up to 64 sprite positions and attributes are stored in OAM. Any pixel whose color is 0 is transparent (represented by '.' in the following diagram): The first plane controls bit 0 of the color the second plane controls bit 1. Each tile in the pattern table is 16 bytes, made of two planes. There are two pattern tables, one at $0000 and one at $1000. For more information, see "The Skinny on NES Scrolling" by loopy (who is not loopy), available from Reads are delayed by one cycle discard the first byteĪccess to $2005 and $2006 during screen refresh produces interesting raster effects the starting position of each scanline can be set to any pixel position in nametable memory. When the screen is turned off ($2001), read or write data from PPU When the screen is turned off ($2001), write the address of PPU memory Write the address of OAM memory you want to access here.Īfter reading $2002, write the horizontal and vertical scroll offsets +- Vertical blank start (0: has not started 1: has started) | overlapping a nonzero background pixel. Set when a nonzero pixel of sprite 0 is drawn || scanline and sets this bit if it starts drawing sprites. The PPU can handle only eight sprites on one |||+++++- Least significant bits of the last byte written to a PPU register +- Intensify reds (and darken other colors) |+- Intensify blues (and darken other colors) ||+- Intensify greens (and darken other colors) |||||+- Show sprites in leftmost 8 pixels ||||||+- Show leftmost 8 pixels of background ||||||| with 110000, effectively producing a monochrome display) |||||||+- Color disable (0: normal color 1: AND all palette entries +- Vertical blank NMI generation (0: off 1: on) |+- PPU layer select (should always be 0 in the NES some Nintendo ||+- Sprite size (0: 8x8 sprites 1: 8x16 sprites) ![]() ||||| (0: increment by 1, going across 1: increment by 32, going down) The Nintendo Entertainment System Picture Processing Unit was a quite advanced 2D accelerator for the time.
0 Comments
Leave a Reply. |