Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
Hello everybody! I've been learning and practicing some programming ( Java and a little Swift) and was wondering how to go about making tools. Like how to access the ROM and modify it or whatnot. Is there any tutorials or guidance that could help me? Thanks for any help!
It's nice to see another swift programmer :). I really like swift and I'm making apps for hacking pokemon colosseum and XD. The only issue is that it's less accessible to the general public. Java is pretty universal though.
My advice to you would be to make sure you don't hard code too much. With the amount of hacking knowledge out there, people are doing really fancy things with roms. You want to make sure your tool is compatible with all the potential modifications.
All you need to know to program a ROM hacking tool is how to read/write binary data with the language of your choice. Obviously, some languages are more suited to this than others, but it's usually rather easy to find articles documenting various programming techniques for this. Anything else is just a bonus for potential users.
For Swift, I think you should look into NSData and NSStream as starting points, if I remember it correctly.
I would recommend using C++, D, JavaScript, Lisp, GTK+, and OpenGL to work with. Try to avoid working with .NET as they're only designed to work on Windows, and the major developers around here are trying to collectively motion for cross-platform capabilities.
Try to use OOP with your code as it's a truly powerful programming paradigm. Simple things would be easiest to implement in Bash or C.
If you use a compiled language (other than VM langs like Java), mind that your code is either totally cross-platform, or at least really easy to port between Windows and Linux. GLib, GIO, GTK+, and other libs like that help ensure that without having to go interpreted or managed.
All you need to know to program a ROM hacking tool is how to read/write binary data with the language of your choice. Obviously, some languages are more suited to this than others, but it's usually rather easy to find articles documenting various programming techniques for this. Anything else is just a bonus for potential users.
For Swift, I think you should look into NSData and NSStream as starting points, if I remember it correctly.
It's really not that hard. Just look at the source of either NSE 2.X or GBA Graphics Editor for their LZ77 compression routines. Other than that it's simply a matter of making sure you have the image data the way you want it.
Basically:
Load image
Create array of indexes to the palette data from the original image (this is how you store images in the GBA)