Shiny Quagsire
I'm Still Alive, Elsewhere
- 697
- Posts
- 15
- Years
- Age 27
- Hoenn Safari Zone
- Seen Aug 8, 2020
Greets all,
So for the last few days I noticed a significant number of new hacks coming up which were based on iimarckus's Pokemon Red disassembly. After a bit of discussion on #GoGo, Touched, Pia, and I decided to create the first Gen III disassembly for use with new ROM Hacks.
What is a Disassembly?
A disassembly, for those who are unaware, is a full in-assembly source file which can be compiled into a ROM of choice. In the case of iimarckus's disassembly, it's a full split disassembly which, when compiled, results in a Pokemon Red ROM. Disassemblies are useful in that they can assist in making ASM hacking and the addition of more resources easier, without having to worry about free space.
Why a Disassembly?
As I already mentioned, having the full source (in ASM) of the entire game in one file can make it incredibly easy to do various ASM hacking. However, once all the resources are properly split and stripped of their static offsets, all the advantages of a split disassembly start to pour in. Free from the original restrictions of offsets, you can easily add and remove code from the original engine and have all the resources reallocate around it. Freespace is managed by the compiler, as opposed to manual fragmented freespace management. Resources can be changed and manipulated as files instead of offsets, and in the case of iimarckus's disassembly, tools can even take editable PNGs and automatically manage and insert them throughout the ROM.
Pros and Cons of a Disassembly
As with most ASM hacks and fun things, there's always some key things to know. The advantages I outlined above make managing and creating hacks easier than ever. However, by breaking the resources of their offset-based bounds, compatibility with all tools is broken. Yes, all tools. This can be a huge dealbreaker for many, especially in terms of scripting, map making, or even music inserting. The solution to this, however, is for tool makers to adapt to the split disassembly method, and with that, the entire community. However, some tools are eliminated in some cases, like freespace finders or sprite editors, which can be done at compile time instead.
Where can I get this "Disassembly"?
As of today, there is one out of the 3 main Gen III engines disassembled, and none which are completely split (meaning it's pretty much worse than a ROM at this point). The Fire Red disassembly, based on knizz's IDB, can be found on my GitHub here. As of now it compiles to an exact ROM of Fire Red, but it requires large binary blobs from an original ROM to work. However, now that there is a source file to go off of, people can assist in breaking down all the resources of Fire Red into separate files, and slowly but surely, removing the need for binary blobs altogether. A split disassembly of Emerald is planned next, and after that perhaps a split disassembly of Ruby (or German Debug Ruby) of someone feels so inclined to do so.
How can I Help?
At the moment, with the disassembly successfully compiling into a proper Fire Red ROM, the main task is to start separating resources into separate files. A full list of offsets for the Fire Red split disassembly can be found in newsyms.sym (the file which links binary offsets to the source ASM), as well as in knizz's split disassembly. A lot of resources may have pointers which are not contained in the actual code (ie pointers in the resources to other resources) so frequent testing is key to maintaining the ROM and keeping the ROM from changing. Cleanup would help as well, especially in the 0x1E0000ish region where the Nintendo inbuilt library resides, which uses a lot of ARM code which doesn't usually play friendly with IDA Pro.
Questions, comments, concerns? Feel free to talk about this below. A split disassembly is definitely a step forward in my mind, but I'd definitely like to hear your take on it.
GitHub Link: DisFire, DisEmerald (coming soon), DisRuby (maybe but probably not coming soon)
So for the last few days I noticed a significant number of new hacks coming up which were based on iimarckus's Pokemon Red disassembly. After a bit of discussion on #GoGo, Touched, Pia, and I decided to create the first Gen III disassembly for use with new ROM Hacks.
What is a Disassembly?
A disassembly, for those who are unaware, is a full in-assembly source file which can be compiled into a ROM of choice. In the case of iimarckus's disassembly, it's a full split disassembly which, when compiled, results in a Pokemon Red ROM. Disassemblies are useful in that they can assist in making ASM hacking and the addition of more resources easier, without having to worry about free space.
Why a Disassembly?
As I already mentioned, having the full source (in ASM) of the entire game in one file can make it incredibly easy to do various ASM hacking. However, once all the resources are properly split and stripped of their static offsets, all the advantages of a split disassembly start to pour in. Free from the original restrictions of offsets, you can easily add and remove code from the original engine and have all the resources reallocate around it. Freespace is managed by the compiler, as opposed to manual fragmented freespace management. Resources can be changed and manipulated as files instead of offsets, and in the case of iimarckus's disassembly, tools can even take editable PNGs and automatically manage and insert them throughout the ROM.
Pros and Cons of a Disassembly
As with most ASM hacks and fun things, there's always some key things to know. The advantages I outlined above make managing and creating hacks easier than ever. However, by breaking the resources of their offset-based bounds, compatibility with all tools is broken. Yes, all tools. This can be a huge dealbreaker for many, especially in terms of scripting, map making, or even music inserting. The solution to this, however, is for tool makers to adapt to the split disassembly method, and with that, the entire community. However, some tools are eliminated in some cases, like freespace finders or sprite editors, which can be done at compile time instead.
Where can I get this "Disassembly"?
As of today, there is one out of the 3 main Gen III engines disassembled, and none which are completely split (meaning it's pretty much worse than a ROM at this point). The Fire Red disassembly, based on knizz's IDB, can be found on my GitHub here. As of now it compiles to an exact ROM of Fire Red, but it requires large binary blobs from an original ROM to work. However, now that there is a source file to go off of, people can assist in breaking down all the resources of Fire Red into separate files, and slowly but surely, removing the need for binary blobs altogether. A split disassembly of Emerald is planned next, and after that perhaps a split disassembly of Ruby (or German Debug Ruby) of someone feels so inclined to do so.
How can I Help?
At the moment, with the disassembly successfully compiling into a proper Fire Red ROM, the main task is to start separating resources into separate files. A full list of offsets for the Fire Red split disassembly can be found in newsyms.sym (the file which links binary offsets to the source ASM), as well as in knizz's split disassembly. A lot of resources may have pointers which are not contained in the actual code (ie pointers in the resources to other resources) so frequent testing is key to maintaining the ROM and keeping the ROM from changing. Cleanup would help as well, especially in the 0x1E0000ish region where the Nintendo inbuilt library resides, which uses a lot of ARM code which doesn't usually play friendly with IDA Pro.
Questions, comments, concerns? Feel free to talk about this below. A split disassembly is definitely a step forward in my mind, but I'd definitely like to hear your take on it.
GitHub Link: DisFire, DisEmerald (coming soon), DisRuby (maybe but probably not coming soon)