We want Libbet to have the same colors no matter what tile she's on.
This means some of the background tiles will need to be modified
to make only one color vary across the four background palettes
in order to leave room for her skin tone.
Replace border tiles with SGB alternate set
Black, dark gray, and light gray cells are modified by replacing
all color 2 pixels with color 1. New plane 0 is plane 0 OR plane
1; new plane 1 is plane 0 AND plane 1. White cells unmodified.
11001100 -> 11111100
11110000 11000000
Palettes
When the program starts in SGB mode, we can send 4 KiB files to the
SGB firmware:
Freeze display
Load binary data into $8000-$8FFF
Load identity tilemap into $9800
Send a *_TRN command
Three types of files that can be sent are the border tile patterns,
the border tilemap, and a set of 512 in-game palettes. We'll save
borders for later, perhaps along with the title screen. But for now,
precalculate these subpalettes at startup using a variant of the GBC
fade code:
Tile data changes
We want Libbet to have the same colors no matter what tile she's on. This means some of the background tiles will need to be modified to make only one color vary across the four background palettes in order to leave room for her skin tone.
Black, dark gray, and light gray cells are modified by replacing all color 2 pixels with color 1. New plane 0 is plane 0 OR plane 1; new plane 1 is plane 0 AND plane 1. White cells unmodified.
Palettes
When the program starts in SGB mode, we can send 4 KiB files to the SGB firmware:
*_TRN
commandThree types of files that can be sent are the border tile patterns, the border tilemap, and a set of 512 in-game palettes. We'll save borders for later, perhaps along with the title screen. But for now, precalculate these subpalettes at startup using a variant of the GBC fade code: