Skip to content

nullstalgia/gbasend-rs

Repository files navigation

gbasend-rs

GIF Demo

A modern toolset for communicating with and uploading homebrew to an unmodified Game Boy Advance via the Link Port!

Compatible with the Xboo Burst Boot Backdoor, and acts as a modern replacement for the Xboo PC-to-GBA Multiboot Cable!

Repo Contents:

Platform-agnostic (Host):

  • gbasend
    • A library crate to connect to GBAs and upload executables via Multiboot/nootloader/Xboo (Rust 🦀)!
    • no_std, no_alloc, Delay-agnostic, ready-to-run on embedded platforms!

Desktop (Windows/Linux/Mac):

  • gbasend-cli
    • Desktop CLI application that connects to GBAs via Serial <-> SPI Adapter and sends a given payload via gbasend->Multiboot/nootloader (Rust 🦀).

USB Serial <-> SPI Adapter Firmwares:

These COM Serial <-> GBA SPI bridges can be used for more than just uploading Multiboot images! You can create homebrew + PC apps with your own 32-bit communication schemes, utilizing standard serial port libaries in your favorite programming language to connect to the adapter!

  • gbasend-pico
    • RP2040 firmware that acts as a USB Serial <-> SPI Adapter, additionally giving the PC direct control over the slave GBA's SPI clock rate via the standard USB Serial baud rate settings (Rust 🦀).
  • gbasend-esp
    • ESP32-S2 firmware, primarily for the Malkeve Game Boy-compatible Flipper Zero add-on (v2.5 and below!) (Rust 🦀).
  • NOTE: The RP2040 gbasend-pico firmware has been tested and confirmed to work with the legacy (~2012) USB-GBA multiboot project software, and likely possible derivatives! The ESP firmware is likely also compatible, but has not been confirmed.

GBA Binaries:

  • nootloader
    • 2nd stage bootloader (loadable via Multiboot/Xboo), with on-screen progress bar and idle indicator (32-bit ARM ASM ⚙️)!
  • xboo-backdoor
    • An implementation of Martin Korth's Xboo Burst Boot Backdoor, callable from C, Rust, and ASM.
    • Used to upload new payloads from within already-running homebrew games/apps, in effect skipping the time-consuming Game Boy intro during iterative development (32-bit ARM ASM ⚙️)!
  • speed-test-gba
    • A simple GBA Multiboot-able binary that accumulates received words over SPI, transmitting the sum; used to determine the maximum possible link speed by comparing received/expected values as baud rate increases (Rust 🦀).

Hardware:

All that's required to get started is an RP2040 development board, a 1kΩ resistor, and a Game Boy Color Cable!

Future Plans:

  • Extract logic from gbasend and create a shared no-std/no_alloc-compatible GBA Multiboot protocol library crate. Done!
  • Support GBA cables/multiplayer sending, will require crafting a new Pico firmware with a potential need for an actual serial protocol, plus a lot more time and research, but it's absolutely possible!
  • More surprises~!
> gbasend --help
Usage: gbasend [<file>] [-p <port>] [-b <baud>] [-h <handshake-wait>] [-x] [-m] [-n] [-l] [-r] [--speed-test] [--serial-chunk-size <serial-chunk-size>] [--serial-chunk-delay <serial-chunk-delay>]

gbasend v0.0.1, a Serial<->SPI GBA Multiboot Sender by nullstalgia (2025)

Positional Arguments:
  file              binary to send to GBA via Multiboot/nootloader/Xboo.

Options:
  -p, --port        specify a serial/COM port to connect to, otherwise will
                    automatically attempt to find a compatible device.
  -b, --baud        for normal serial devices, specifies the baud rate to
                    connect with. for USB GBA Pico FW, sets the SPI transfer
                    baud rate directly.
  -h, --handshake-wait
                    seconds to wait for initial GBA handshake, set to 0 to wait
                    forever, default is 30 secs.
  -x, --xboo        knock on Xboo Burst Boot Backdoor and try to upload provided
                    binary via nootloader.
  -m, --multiboot   try multiboot exclusively.
  -n, --nootloader  uploads (via Multiboot) or detects nootloader, then uploads
                    provided binary. --skip-nootloader-patch to skip patching
                    entry point to 0x20000C0
  -l, --blind       send binary via nootloader without verifying responses
                    (nootloader only).
  -r, --reset       send HardReset payload to GBA.
  --speed-test      performs a binary search across SPI Clock Speeds to quickly
                    estimate a maximum possible baudrate (gbasend-compatible
                    firmware required).
  --serial-chunk-size
                    num of bytes to send over serial with every transaction.
  --serial-chunk-delay
                    delay after every sent serial chunk in ms.
  -h, --help, help  display usage information

About

USB <-> GBA Multiboot/Xboo Uploader, no_std/no_alloc, in Rust and ARM ASM!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Contributors