Super Game Boy border builder
Give it your 256×224 border art. It checks the art against the Super Game Boy's tile and palette limits, shows you which tiles break them, and writes the border as C for a GBDK game.
Choose a 256×224 PNG, drag one onto this box, or paste one.
Everything happens in your browser. Your art is never uploaded.
The rules a border has to follow
- The picture is 256×224 pixels, cut into 8×8 tiles. The Game Boy screen is the 160×144 area at (48, 40), and it has to stay transparent. Anything painted there is cleared for you.
- A border can use three palettes of 16 colours. The Super Game Boy draws colour 0 of every palette as the backdrop, so each palette has 15 colours to paint with, and each tile uses one palette.
- Colours have five bits a channel. Colours that differ only in the low three bits become the same colour.
- The transfer can send 255 different tiles. A tile that is another tile mirrored counts as the same one.
Tiles are given palettes in reading order, each taking the first palette with room for its colours. The Palettes view tints every tile by the palette it landed in, which shows where the colours are going when the art needs a fourth.
Using the output
Save both files beside sgb_border.c and sgb_border.h from GB-SGB-Tooling, build with -Wm-ys, and call this once at startup before loading your own tiles:
DISPLAY_ON;
for (uint8_t i = 4; i != 0; i--) vsync();
set_sgb_border(
border_data_tiles, sizeof(border_data_tiles),
border_data_map, sizeof(border_data_map),
(const unsigned char *)border_data_palettes,
sizeof(border_data_palettes));The files have the layout GBDK's png2asset writes, so they also replace a border_data.c you already build.
Limits
- The art is not resized or reduced to fewer colours. Fix what the check marks in your paint program and load it again.
- The preview is this page's reading of the data, not an emulator. Test the built ROM too: the tooling's
sgb_border_test.pydoes that in PyBoy. - The output is for GBDK-2020. There is no RGBDS export, and no
#pragma bankline; add one if the border lives in a switched bank.
How the border transfer works, and the bugs we fixed in it. To see a border made this way, play FPS Dungeon.
More tools
Game Boy Camera converter
Turn a photo or your webcam into a 128×112, four-shade Game Boy Camera picture, using the camera's real dither tables.
Game Boy Printer strip maker
Print your photos the 1998 way: a strip of Game Boy Camera shots on thermal paper, torn edges and all.
Game Boy Camera save viewer
Open a save file from a real Game Boy Camera and pull out every photo as a PNG, including deleted ones still on the cartridge.
Game Boy tile converter
Turn a PNG into Game Boy tile data and a tile map for GBDK or RGBDS, or turn raw tile data back into a picture.
Game Boy sprite editor
Draw 8×8 and 8×16 sprites and tiles, open existing C arrays, and export png2asset-style C for GBDK.
Game Boy text generator
Type a title and save it as a PNG in a pixel font on a Game Boy palette, in a 160×144 frame or a thumbnail shape.
Game Boy sound toy
Play the Game Boy's four sound channels, then copy the register values and a GBDK C snippet for the sound you made.
Game Boy ROM header inspector
Drop a .gb or .gbc file to read its title, CGB and SGB flags, mapper, ROM and save RAM size, and whether its checksums are valid.