pinobatch / libbet

Libbet and the Magic Floor - a puzzle game for Game Boy
zlib License
35 stars 1 forks source link

Colorize for Super Game Boy #12

Closed pinobatch closed 4 years ago

pinobatch commented 4 years ago

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.

Palettes

When the program starts in SGB mode, we can send 4 KiB files to the SGB firmware:

  1. Freeze display
  2. Load binary data into $8000-$8FFF
  3. Load identity tilemap into $9800
  4. 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: