Alexander Nicholi
what do you know about computing?
- 5,500
- Posts
- 15
- Years
- Age 27
- Research Triangle / Jakarta
- Seen Sep 22, 2024
https://github.com/nicholatian/nichruby
You can browse this project's development on GitHub.
Introduction
pret's decompilations of the core series games has made ROM hacking easier than ever. As game source code, however, it leaves a lot to be desired for modders and fanhacking. The constraint of matching the code to the ROM byte-for-byte imposes a hard ceiling on how much can practically be improved.
nichruby is here to change all of that. By abandoning the strict constraint of binary matching and rewriting the codebase from scratch, it will provide a basis for fanhackers far more usable and extensible than what the decomps can offer long before it is complete. File-by-file, I am sifting through all of the sources of pokeruby and attempting to reimplement each module piece-by-piece, with manual consideration for structure and code quality. This will compile with current releases of devkitPro's devkitARM GCC toolchain.
FAQ
Q: What are some of the benefits to this approach?
A: Being able to reorganise the repository from scratch leaves a lot of doors open that the original decomps either decided to or were forced to close. For example, they have needed a whole host of custom tooling to make pieces of data and code appear in the right places. Their INCBIN system inlines data into C source code to this end. Even the original games would not be programmed in such an awkward and brittle way.
Q: Is this just reshuffling the sources around, or is there something more to what you are doing?
A: Every module of C code is being rewritten from scratch. Furthermore, a whole new set of tooling is being created from scratch to deal with the task of compiling assets into the game binary. This is to maximise ease of use from a forward development standpoint rather than a reverse engineering one. For example, most assets will use the mangledeggs symbol mangling regime, allowing a high degree of modularity and scoping in script sources and more.
Q: How far along is this project then? It sounds useful!
A: It's a relatively recent endeavour, and I am currently the only one working on it. However, unlike the decompilations, it will be very usable by the general public long before I finish porting over the entire game! What's more, the pokeruby decompilation serves as the perfect stomping ground to understand how every part of the original game works.
Q: Great! How could I contribute, then?
A: The objective of this project is to write the best C sources we can for a game that is functionally identical to Pokémon Ruby. 'Functionally identical' goes as far as save file compatibility and what you see and hear in-game, to draw a rough but bold line. In order to accomplish this though, guidelines need to be written regarding how this is actually to be done. I don't expect a lot of help until I have those spelled out, but you're welcome to reach out!
Q: How can I keep up with this project?
A: Giving it a star on GitHub will put updates onto your homepage every time you log in to GitHub. You can also join the Fanhacker's Toolkit Discord for more incremental and instantaneous posts from me and others who are interested. I will also post significant updates about the repository and its tooling in this thread.
Last edited: