| Crates.io | G4Patcher |
| lib.rs | G4Patcher |
| version | 0.16.0 |
| created_at | 2025-06-15 11:44:18.90435+00 |
| updated_at | 2026-01-23 23:46:13.269454+00 |
| description | A code injection patcher tool for Pokémon Gen 4 ROM hacks |
| homepage | |
| repository | https://github.com/KalaayPT/g4patcher |
| max_upload_size | |
| id | 1713202 |
| size | 1,061,917 |
This is a small thing ive written up to easily distribute .asm patches for code injecting things such as EV+IV-checking and Portable PC routines, because i was tired of explaining and writing out every patch separately.
This program is purely cli. It prompts you to select an unpacked ROM folder (such as one generated by DSPRE), then one of the included patches, then checks for:
After checking these things, it adjusts the patch file with the corrected injection address and runs the patch through armips.
An armips binary is bundled into the release, so no need to install anything!
Please credit me (Kalaay) and the people behind the research for the patches if you use them in your own projects. Credits for research can always be found in the patch files themselves, as well as in the wiki
can now be found in the wiki
git clone https://github.com/KalaayPT/G4Patcher.git
cd G4Patcher
cargo build
If you want to contribute your own patches, you can use the included ones as templates as to what yours are supposed to look like.
Make sure that:
INJECT_ADDR equ 0x023C8000
...
.ifdef PATCH
// hook here
.endif
...
.ifdef PREASSEMBLE
.create "temp.bin", 0x023C8000
.elseifdef PATCH
.open "unpacked/synthOverlay/0000", 0x023C8000 // 0000 for hg, 0009 for plat
.endif
.org INJECT_ADDR
so that the script is able to adjust the injection address and preassemble to calculate patch size.