Go to file
2023-04-20 12:41:02 +01:00
LICENSE Initial commit 2023-03-13 12:45:40 +00:00
patcher.c Change sector size to 0x40000 (support 369-in-1) 2023-04-16 20:17:37 +01:00
payload_bin.h Initial C commit 2023-04-10 20:14:09 +01:00
payload.c Extend wait time (seems to improve stability on 369-in-1 2023-04-20 12:41:02 +01:00
payload.ld Move table back into asm 2023-04-11 19:12:34 +01:00
README.md Fix thumb mode in payload 2023-04-11 18:16:34 +01:00

Automatic batteryless saving patcher for GBA

This program patches a GBA game for batteryless saving (i.e. saving on a bootleg cartridge containing SRAM but no battery).

The game must be SRAM patched before using this program. GBATA or Flash1M_Repro_SRAM_patcher can be used depending on the game. The patch contains two modes, which can be selected during patching.

In auto mode, the save will automatically be flushed a few seconds after saving. Until the save completes, the graphics will be purposefully corrupted.

In keypad trigger mode, the save can be flushed by pressing L+R+Start+Select at any time. This mode requires less patching, so may be compatible with more games.

Usage

Run with ROM as the only argument, a new ROM will be output

Building

No build script, run the following command and hope it doesn't spit out any errors

$DEVKITARM/bin/arm-none-eabi-gcc -mcpu=arm7tdmi -nostartfiles -nodefaultlibs -mthumb -fPIE -Os -fno-toplevel-reorder payload.c -T payload.ld -o payload.elf; $DEVKITARM/bin/arm-none-eabi-objcopy -O binary payload.elf payload.bin; xxd -i payload.bin > payload_bin.c ; gcc -g patcher.c payload_bin.c

Credits

Written by metroid-maniac

Thanks to