Optiroc / SuperFamiconv

Flexible and composable tile graphics converter supporting Super Nintendo, Game Boy, Game Boy Color, Game Boy Advance, Mega Drive, PC Engine and WonderSwan formats.
MIT License
143 stars 20 forks source link

Support Game Boy Color mode #11

Closed pinobatch closed 4 years ago

pinobatch commented 5 years ago

Super NES backgrounds have several modes with 2 bits per pixel: all planes of mode 0, the third plane of mode 1, and the second plane of modes 4 and 5. The Game Boy Color tile and palette formats are identical to those of Super NES 2bpp modes, but its tilemap entries arrange bits differently.

FEDC BA98 7654 3210  Super NES tilemap
|||| ||++-++++-++++- Character number (max. 0x03FF)
|||+-++------------- Palette
||+----------------- Priority
|+------------------ Flip horizontally
+------------------- Flip vertically

FEDC BA98 7654 3210  Game Boy Color tilemap
|||  +(((-++++-++++- Character number (max. 0x01FF)
|||   +++----------- Palette
||+----------------- Flip horizontally
|+------------------ Flip vertically
+------------------- Priority

Two other differences:

Some Game Boy projects with Super Game Boy support may use SuperFamiconv for the SGB border. If SuperFamiconv also supported GBC tilemaps, this would let games use it for both SGB and GBC assets.

Optiroc commented 5 years ago

I've added preliminary Game Boy Color support, but it's thorougly untested as of now.

Optiroc commented 4 years ago

GBC mode has been confirmed to work now 👍