Hello. Here is an in-depth guide to custom borders with the unofficial Goomba for the GBA by me, Kuwanger. When done, you should have an idea not only on how to make custom borders and include them in your own compilations but also on exactly why on many of the nitty-gritty details of how it all works. So, let's begin by starting out with exactly what a custom border looks like.

Viewing this layout, a few things are apparent. The image is 240x160 large. At the center is a 160x144 blank area. The image in total has a maximal of 16 colors, of which 15 of them are used outside the central blank area. The image itself is composed of various tiles. With some examination, it is apparent that there are several tiles which are identical and probably a few which are mirror images (ie, could be flipped some way to produce the same tile).

All of thse are vital elements. The screen itself is 240x160 large, and the custom border is designed to fit it. The middle area is blank because the custom border overlaps the game being emulated. As such, anything in the center is removed to avoid obstructing the view of a game. The actual transparency of the center is caused by using color 0 for the tiles used in the center. It so happens that for every tile color 0 is transparent. And there's a maximal of 15 other colors available to each tile. There's actually 16 palettes in total, meaning a maximal of 240 colors, but a few of the palettes are in use for the emulated game itself as well as the emulators menus. In any case, it's simpler to limit images to 15 colors.

Finally, the screen mode used in gameboy emulation is in tile mode. This means that tiles are first constructed and then an accumulation of these tiles are used to construct the whole screen. For Goomba, the lower bank of video ram is used for the tile border as well as for the emulator text's tiles. The upper bank of video ram is used mostly for the emulated game itself. So, there isn't enough room for unique tiles across the entire custom border. These elements together are responsible for the restrictions on what makes a custom border.

Having well defined what makes a custom border, it's time to actually use them. The first step after making the border is turning it into a usable form with the emulator. This means using append, which first verifies that the image provided meets all the standards above then chops it into tiles and a tile map and compresses it to save space. But, you might want to have specialty borders and well as borders for each game. So, below is an explanation and some pictures to give you an idea of exactly how those borders can be slapped together to produce the desired result.

First, one creates a bundle of borders one wants to use on all games and pass them through append, naming them. If you're planning on using these global borders with Goomba as a Pogoshell plugin, do note that the total size should be under 58K if you want all of the borders to work. Now, simply join the two with a copy /b or cat and you've got a special goomba-compilation.gba file which can be used with any build program. Or if you want to use it as a plugin under Pogoshell, just use d to compress it into an .mbz file. Finally, using goomba as a plugin has an extra advantage, local borders available for each specific game. Simple make a bundle of borders like one normally would, except for one game. Then, instead of appending the bundle, prepend it to the game. Leave it named as a .gb and be amazed as your game-specific custom borders are selected by default.

Guide to How It All Looks


Create a global compilation [under 58K for the Pogoshell Approach]:
java append global.bin "Goomba.png" "Goomba Title"

Append the result to goomba.gba:
Windows: copy /b goomba.gba+global.bin goomba-compilation.bin
Linux: cat goomba.gba global.bin > goomba-compilation.gba
The build approach

Use a build program and simply use goomba-compilation.gba with gameboy roms.
The Pogoshell Approach

Take goomba-compilation.gba and turn it into a plugin:
java d "goomba-compilation.gba" "goomba.mbz"

Optional:  Make other compilations and prepend them to gameboy roms:
java append "Super Mario Land.bin" "Super Mario Land.png" "Super Mario Land"
Windows:  cp /b "Super Mario Land.bin"+"Super Mario Land.gb" "final\Super Mario Land.gb"
Linux:  cat "Super Mario Land.bin" "Super Mario Land.gb" > "final/Super Mario Land.gb"

Place goomba.mbz in the .shell/plugins directory and make an entry for it in .shell/pogo.cfg:  gb 2 goomba.mbz 1