• Hey, guest user. Hope you're enjoying AlienLayer! Have you considered registering for an account? Come join us and add your take to the daily discourse.

ROM Hack GBAATM-Rebirth (GBA Auto Trainer Maker): A new hope

admin

Chad
Staff member
85%
Joined
Jan 25, 2024
Messages
3,381
Points
38
Age
38
Location
USA
Website
gameparadise.org
Credits
60,742
What is GBAATM:

Basically is a generator or patcher of GBA roms that add a trainer at rom start to enable the cheats. Also add slow motion support and some button combination to reboot the rom and renable cheats.
This is possible because the tool scan the rom to find hooks or memory address unused where inject the new assembly code and generating a new rom file.
Also, the tool support 2+1 cheatcodes type: raw, codebreaker and gameshark (this one is not enabled in some builds).
From a developer point of view the tool is an Ui where the users set various things like the cheats or the background image, cheatcodes converter and generate a new rom.
Why GBAATM-Rebirth (story):

It is a refactoring of the original GBAATM tool by Cracker that is compatible only with Windows.
Also, the purpose is to add support to other platform (I am working on this new project on Linux), create a new UI and add maybe new features.
I have GBA that since a year I am using it (backlit modded, new shell, everdrive the usual things), an original atari 2600 and a PSC modded.

Everything started in this forum where I found around the end of March the thread from the author of tool and found that it was still active. I already did months ago a porting of another tool for rom patching to Linux https://github.com/Mte90/Game-Genie-Good-Guy (short story compared to this one at this link), in Italy in that period there was the quarantine/lockdown (finished today) and I chosen to invest my time on doing something that for me with my work was difficult to achieve. Study reverse engineering and how works assembly, maybe also about GB development (this free book was very helpful https://github.com/ahrnbom/gbapfomgd).
Honestly I prefer the trainer inside the rom or the rom patched for that cheat so with other emulators and so on I can just play.

So I asked with a pm in this forum to Cracker if it was possible to get the original source code and do a new version of the tool, since that day I kept updates about it in the original thread.
Initially I didn't have the source code, so I tried on decompiling/reverse engineering the tool but with my missing experience was very hard. Also because I didn't know assembly and this project was very old.
When Cracker accepted and sent to me the code started everything. The code was written around 2008/2010, convert the project files from Microsoft Developer Studio 6 to Visual Code wasn't working. So I had to get a Windows XP Virtual Machine to compile the code and helping me with migrating and understand what was doing.

Probably I was very spammy on the thread with updates about development also because this was the first real C++ project I worked on. I never developed in C++ also if studied it a bit.
During the quarantine I studied a bit various open source GBA emulators and did some patches, you can find some info about it on my FOSS monthly reports of March and April (I usually do that since few years, I am active in the open source world).

The project wasn't easy initially because I had to integrate a very old codebase with modern C++ compilers, with a new framework (Qt that I already use a lot with Python). At same time I was busy with other open source projects and work but at the end I did it.

Tools used during development/experimenting:

During my experimenting I tried to get the assembly code from a rom but is not easy at all, Ghidra is not very friendly to get that as just txt to study and also radare. So my first thoughts was to get a GBA emulator and use it to generate that code but no one does. Luckyly eggvance gba emulator author was very friendly and did it for me a patched version and was very helpful to see the difference (original/rebirth rom generated instead of a full binary diff) during the debug, this rom to assembly is available at this link. Of course doesn't include the memory address used because is not a real emulator.
Virtualbox for the virtual machine with Microsoft Develop Studio 6, on Linux Qt Creator with visualbindiff, okteta, kompare, this disassembler and a lot of time.
Status:
The tool is not yet finished but right now can add the trainer and the rom generated is 1:1 with the same data of the original Windows version.
I chose to start a new thread because I consider the project as working and official and not just experimenting.

Right now before to consider it complete I need to improve the code quality, some bugfixes from the migration of this old codebase and evaluate new features.

There is also the feature of the slow motion that is not working yet. I was thinking if drop that feature now because all the emulators now support it and probably on a real GBA this is not required anymore.
Anyway when everything will be done I will build a version also for Windows (I have to see for Mac OSX) but I will keep posting updates.
Thanks:

To Cracker for sharing the original source code that is available on GitHub if someone is interested, but for bugs and feature requests I suggest using the GitHub project page.
Also thanks to this project I can study how works C++, knows more assembly and how compiled languages are very a mess (if you have no patience).
Thanks also to you for reading :-D
 

Recent Content

Newest Downloads

Tutorials

Back
Top