Thanks to Amphobius pointing me towards the Sonic hacking community and how they hack Sonic, I discovered split disassembly-based hacking, and I'm thinking of applying this technique to SMAS as well.
It's a disassembled ROM (which can be reassembled), but it's split into various meaningful parts. Instead of having one big .asm file (such as all.log for SMW), you'd have the data divided into smaller parts like at least banks. Each bank then would have their tables extracted into binary files. These tables would be meaningful tables such as graphics, level data, tilemap data, and so on. All references are also labeled in the ASM file so that you won't have any hardcoded addresses left, allowing you to insert or remove code without breaking the game.
These files then would be divided into various directories. A directory for graphics, a directory for levels, and so on. Seeing how SMAS is programmed, it's possible to divide all of these under certain games as well. Eventually, by running a simple command such as "asar smas.asm" it would put all of these files back together into a playable ROM.
There is no ASM knowledge required for casual hacking. You download a split disassembly with all necessary ASM hacks installed already (to allow more GFX or levels for example, which the vanilla SMAS ROM can't do). Theoretically speaking, one can write a level editor which loads all these binary files and puts them together so the level is viewable and you can edit it. Then the level editor will save data to the level binary files. It can save palette, map16 edits, etc too. Finally, the hacker runs the assembler to create his ROM. (After that, you could run the ROM through an IPS patcher or something when releasing)
If you do know ASM and would like to edit the ROM on an ASM level, this can be done easily as you're working with the disassembly directly anyway.
It'll allow ASM hackers more control over their ROM while allowing 'casual hackers' to freely hack SMAS without bothering with ASM at all. Furthermore, by putting defines on top of the ASM file which the hacker can edit, you can put a bunch of 'options' which get taken care of at assembly-time. Imagine the following code:
With these definitions you tell the assembler that you only need SMB1 code in the ROM and that it can discard the other games, thus enabling more free space for your SMAS SMB1 ROM hack. (Although in my opinion it's better if you do this manually if you want to avoid depracated code cluttering your ASM files)
Frankly, I have no idea. It's something I'll need to deeply think about. Unless someone has suggestions then feel free to post. The only 'solution' I have is just hack the SMAS ROM as extensively as possible before releasing the split disassembly, but it still doesn't solve the issue of easily allowing '3rd party tools'.
SMW has progressed too far for this technique to be meaningful anymore. If SMW switched to split disassembly-based hacking, it would mean remaking all resources and integrating them into the disassembly. Not to mention that FuSoYa would need to make all the Lunar Magic ASM hacks open source. This goes for other closed-source tools as well. Too much effort for too little. As for SMAS, because it doesn't have any resources yet, it's the perfect time to apply the split disassembly hacking technique.
I told him the idea. He says "it can be done right now" which is pretty promising.
And my question to you (the hackers who are interested (if any))...
My blog. I could post stuff now and then
My Assembly for the SNES tutorial (it's actually finished now!)
What is a split disassembly?
It's a disassembled ROM (which can be reassembled), but it's split into various meaningful parts. Instead of having one big .asm file (such as all.log for SMW), you'd have the data divided into smaller parts like at least banks. Each bank then would have their tables extracted into binary files. These tables would be meaningful tables such as graphics, level data, tilemap data, and so on. All references are also labeled in the ASM file so that you won't have any hardcoded addresses left, allowing you to insert or remove code without breaking the game.
These files then would be divided into various directories. A directory for graphics, a directory for levels, and so on. Seeing how SMAS is programmed, it's possible to divide all of these under certain games as well. Eventually, by running a simple command such as "asar smas.asm" it would put all of these files back together into a playable ROM.
How do you hack a split disassembly?
There is no ASM knowledge required for casual hacking. You download a split disassembly with all necessary ASM hacks installed already (to allow more GFX or levels for example, which the vanilla SMAS ROM can't do). Theoretically speaking, one can write a level editor which loads all these binary files and puts them together so the level is viewable and you can edit it. Then the level editor will save data to the level binary files. It can save palette, map16 edits, etc too. Finally, the hacker runs the assembler to create his ROM. (After that, you could run the ROM through an IPS patcher or something when releasing)
If you do know ASM and would like to edit the ROM on an ASM level, this can be done easily as you're working with the disassembly directly anyway.
Why split disassembly?
It'll allow ASM hackers more control over their ROM while allowing 'casual hackers' to freely hack SMAS without bothering with ASM at all. Furthermore, by putting defines on top of the ASM file which the hacker can edit, you can put a bunch of 'options' which get taken care of at assembly-time. Imagine the following code:
Code
!EnableSMB1 = true !EnableSMB2 = false !EnableSMB3 = false !EnableSMBTLL = false Reset: SEI CLC ...
With these definitions you tell the assembler that you only need SMB1 code in the ROM and that it can discard the other games, thus enabling more free space for your SMAS SMB1 ROM hack. (Although in my opinion it's better if you do this manually if you want to avoid depracated code cluttering your ASM files)
How would one create tools and patches for this method?
Frankly, I have no idea. It's something I'll need to deeply think about. Unless someone has suggestions then feel free to post. The only 'solution' I have is just hack the SMAS ROM as extensively as possible before releasing the split disassembly, but it still doesn't solve the issue of easily allowing '3rd party tools'.
Bonus: Why not apply this for SMW too?
SMW has progressed too far for this technique to be meaningful anymore. If SMW switched to split disassembly-based hacking, it would mean remaking all resources and integrating them into the disassembly. Not to mention that FuSoYa would need to make all the Lunar Magic ASM hacks open source. This goes for other closed-source tools as well. Too much effort for too little. As for SMAS, because it doesn't have any resources yet, it's the perfect time to apply the split disassembly hacking technique.
Will SWR take notice of this?
I told him the idea. He says "it can be done right now" which is pretty promising.
And my question to you (the hackers who are interested (if any))...
Would you like split disassembly-based SMAS hacking? Why (not)?
My blog. I could post stuff now and then
My Assembly for the SNES tutorial (it's actually finished now!)