Number of palettes in the GBC

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Number of palettes in the GBC

Post by Sik »

Something I noticed in Wacky Races (GBC) when I was bored watching videos:
https://www.youtube.com/watch?v=rNedYpA ... age#t=1390

As you can see there's a fog effect where stuff that's far away gets dimmed. Alright, probably some palette stuff... but wait, that thing is eating a lot of palettes, since each sprite gets its own fog level. Hm. (note: in the HUD area it switches sprite palettes on the fly so ignore those... also the constant palette switching mid-screen makes it nearly impossible to check in a debugger)

So, stupid question: how many palettes does the GBC have for each layer? Because I completely forgot.
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Number of palettes in the GBC

Post by Dwedit »

The GBC gets 8 palettes for sprites, and 8 palettes for backgrounds, and can freely change palette colors at any time during rendering. Also, the background color for background palettes is not shared, so each background tile gets a full 4 colors.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Post Reply