Tuesday, February 26, 2008

Useless Hacks Update

I have managed to isolate most of the code that takes up the password entry, testing and stats loading for the NES game Willow. I've also identified where stats are saved in memory, how Willow's map and screen position is stored, and the all-important events and inventory flags.

Coding a replacement function that will load data from SRAM should be pretty easy, and free up a lot of ROM space in the process.

I have yet to figure out how the screens are loaded, so I can load my own custom save game screen, but that's not really part of the Proof of Concept hack.

Just to make things interesting I'll change the PASS WORD text into LOAD GAME.

That's the easy part.

Saving for my PoC requires me to tap into the main game joystick routine and save everything to RAM once a combinaion (SELECT+B) is pressed. However in a real hack it'd be nice to have save points.

Adding code to a NES ROM is a bit more problematic because of it's memory restrictions and the memory mappers designed to handle this.

You can't just add code to another bank if the original bank doesn't have any space to give up. Since only one bank is mapped at any time, you'd have to push some registers or save in RAM and switch banks to run code from another bank.

I hope to do the loading code tomorrow, that is, if Patapon doesn't distract me long enough.

No comments: