[Concept]Patching ROM On-The-Fly using ACE
Posted by: Parzival
Date: 2017-05-20 17:33:23
Now, this sounds fucking impossible, because of things like "ROM is read-only" and "you sound fucking insane, what the hell is SmashStack and why is this post nowhere near properly worded?", but hear me out.
There's some homebrew that most people use with SmashStack, and it's called Riivolution. When the disc is accessed to load data, Riivolution intercepts this call, loads the data to unused RAM, patches it, then puts the modified data where it needs to be. We could do this with Pokemon Yellow. In GBc mode, the game does fucking nothing half the time because it only needs 4Mhz, and the double speed of the GBC fucks with it. This solves multiple problems we'd face, namely "this would slow the game down" and "we can't easily interrupt the game's path of execution and throw data everywhere without fucking shit up". BECAUSE the game's doing nothing, it doesn't matter what we do, as long as we're back in the game's normal operation when it comes time to actually do something. Of course, with ACE, we can influence what "normal" is, which means we could copy the next bits of code needed from ROM to RAM, patch it, then run it, effectively being able to bend the game to our will by copying and patching more code after running the previous batch. We could merely allocate a certain amount of space in, say, SRAM, write code to the allocated space, then put the loop that writes and patches the next batch right after it. Of course, jumps, interrupts and the like will screw with it, but I'll bet my soul that there's a way around that.
Thanks for listening to me shout my insanity at you for like 20 minutes. Do you think this is possible? We've done some amazing shit, but if we can pull this off we can all ascend into godhood, so it's worth a shot, right?