Is this true? I have been working on developing a graphics editor for NES game development, and now that I have the ability to edit the pattern table, name table, attribute table, and palette---I noticed that I wasn't seeing attribute colors when I used palette entry 0, 4, 8 or 12. From reading NESDoc.pdf, it looks like all four of these locations in the palette are treated as transparent. The doc goes on to say that there are 13 displayable colors. Wait a sec---isn't it 12? Or are they counting that background color as the 13th color?
Regards,
-Zom
Every fourth byte in palette is transparent?
Moderator: Moderators
- GradualGames
- Posts: 1106
- Joined: Sun Nov 09, 2008 9:18 pm
- Location: Pennsylvania, USA
- Contact:
Re: Every fourth byte in palette is transparent?
This is true. Not only for sprites, but also for the BG.ZomCoder wrote:I noticed that I wasn't seeing attribute colors when I used palette entry 0, 4, 8 or 12. From reading NESDoc.pdf, it looks like all four of these locations in the palette are treated as transparent.
It'd actually be 25. 4 sets of 3 (12) for sprites, plus another 4 sets of 3 (12) for the BG, plus the background color = 25.The doc goes on to say that there are 13 displayable colors. Wait a sec---isn't it 12? Or are they counting that background color as the 13th color?
But if they said 13 they're probably talking about just the BG colors and the background color.
The Background color is at ppu address $3F00, but is also mirrored at $3F10, so a write to either of those will change the background color. The layering of the NES works like so:
FG priority sprites <--- top layer
Background (nametables)
BG priority sprites
Background color ($3F00) <--- bottom layer
Transparent sprite/bg pixels reveal the layer beneath it, with the background color being the catch all if all BG/sprite pixels are transparent.