patters-match / gba-emu-compilation-builders

Python 3 scripts to build emulator + ROM compilations for various emulators for Gameboy Advance. Cross-platform replacements for the original 32bit Windows-only tools.
7 stars 2 forks source link

GBA Emulator Compilation Build Scripts

Python 3 builder scripts for the following emulators for Gameboy Advance: Emulator Target System Author(s) 1st Release
PocketNES Nintendo NES Loopy, later FluBBa, Dwedit Jan 2001?
ZXAdvance Sinclair ZX Spectrum 48K TheHiVE May 2001
PCEAdvance NEC PC Engine / Super CD-ROM² FluBBa Apr 2003
Goomba Nintendo Gameboy FluBBa Oct 2003
HVCA Nintendo NES / Famicom Disk System outside-agb? Sep 2004
Wasabi Watara Supervision FluBBa Nov 2004
SNESAdvance Nintendo SNES Loopy, FluBBa Feb 2005
SMSAdvance SEGA Master System / Game Gear / SG-1000 FluBBa Jul 2005
Cologne ColecoVision FluBBa Jan 2006
Goomba Color Nintendo Gameboy / Gameboy Color FluBBa, Dwedit Jan 2006
MSXAdvance MSX-1 (version 0.2 is most compatible) FluBBa Mar 2006
Snezziboy Nintendo SNES bubble2k May 2006
NGPGBA SNK Neo Geo Pocket / Pocket Color Flubba Jul 2008
Jagoomba An enhanced Goomba Color fork FluBBa, Dwedit, Jaga + various Nov 2021

Purpose

The scripts combine the emulator binary with the game ROMs and their required metadata into a .gba executable for Gameboy Advance. Since the scripts are written in Python 3 they will run on most present-day platforms, helping to preserve these technical marvels.

Usage

git clone https://github.com/patters-syno/gba-emu-compilation-builders

You can drag and drop multiple file selections onto the shell window in which you are preparing the command line. Most options are not needed since they have sensible defaults. This makes these scripts well suited for building large compilations very easily. Usually the shell will alphabetically sort multiple file selections.

Each script has help information accessible via the -h command line option. For example:

usage: pocketnes_compile.py [-h] [-s SPLASHSCREEN] [-e EMUBINARY]
                            [-db DATABASE] [-dbn] [-m] [-c] [-o OUTPUTFILE]
                            [-sav] [-pat]
                            romfile [romfile ...]

This script will assemble the PocketNES emulator and NES ROMs into a Gameboy
Advance ROM image. It is recommended to type the script name, then drag and
drop multiple ROM files onto the shell window, then add any additional
arguments as needed.

positional arguments:
  romfile          .nes ROM image to add to compilation. Drag and drop
                   multiple files onto your shell window.

optional arguments:
  -h, --help       show this help message and exit
  -s SPLASHSCREEN  76800 byte raw 240x160 15bit splashscreen image
  -e EMUBINARY     PocketNES binary, defaults to pocketnes.gba
  -db DATABASE     PocketNES Menu Maker Database file which stores optimal
                   flags and sprite follow settings for many games, defaults
                   to pnesmmw.mdb
  -dbn             use game titles from PocketNES Menu Maker database
  -m               mark small ROMs suitable for link transfer
  -c               clean brackets from ROM titles
  -o OUTPUTFILE    compilation output filename, defaults to pocketnes-
                   compilation.gba
  -sav             for EZ-Flash IV firmware 1.x - create a blank 64KB .sav
                   file for the compilation, store in the SAVER folder, not
                   needed for firmware 2.x which creates its own blank saves
  -pat             for EZ-Flash IV firmware 2.x - create a .pat file for the
                   compilation to force 64KB SRAM saves, store in the PATCH
                   folder

coded by patters in 2022

Features

Automation

With a simple FOR loop the scripts can also create a standalone executable for each game in a folder.

Bash:

for file in *.pce *.iso ; do ./pceadvance_compile.py "${file}" -o "${file%.*}.gba" ; done

Windows:

for %f in (*.pce *.iso) do @pceadvance_compile.py "%f" -o "%~nf.gba"

If you own an EZ-Flash IV flashcart my curated collection of exit-patched emulator binaries will be of interest.


Emulator Tips

Cologne