NES PPU Questions

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
NES PPU Questions
by on (#27846)
Hi.

I'd like to check my understanding on a couple of things if anybody can help.

The palettes are split into sub-palettes where each palette has four sub-palettes, each of which has either the background colour or transparency as their first element.

The way I get it is that the lower two bits stored in the pattern tables for each pixel of a tile is used to decide which colour in the sub-palette being used should be used for that pixel.

The way that it is decided which sub-palette should be used for the background comes from the attribute table where the same sub-palette must be used for 16x16 blocks (that is, only four colours can be used for each 16x16 block).

The process is the same for sprites except that instead of using the attribute table, the Sprite RAM (SPR-RAM) is used.

Does this sound at all correct?

Thank you.

:D
Re: NES PPU Questions
by on (#27847)
You got everything right on except for...

NESmongoose wrote:
The palettes are split into sub-palettes where each palette has four sub-palettes, each of which has either the background colour or transparency as their first element.


The first element is always transparent... no matter which sub palette is used.

The background color ($3F00) is what the PPU falls back to when there is no BG or sprite pixel to draw (ie: both BG and sprite pixels are transparent).