Page 1 of 1
Game Genie NSF patching
Posted: Sat Feb 27, 2010 9:24 am
by NotTheCommonDose
I have successfully applied game Genie codes to all NSFs that I wanted except for Super Mario Bros and Super Mario Bros. 3. Is there an extra step for these games that needs to be taken?
Posted: Sat Feb 27, 2010 2:34 pm
by ccovell
Those games don't have their sound screwed up by the real Game Genie, do they? If you deliberately want to screw up the music, you could, but... why?
Posted: Sat Feb 27, 2010 3:19 pm
by NotTheCommonDose
Yes they do. Codes like PPPPPP don't work on the Super Mario Bros. 1 nsf and for Super Mario Bros. 3 ZKIPEE, SKIPEA, EAGVIT, KLOTOE don't work when patched.
OKEATS does not work when patched into Super Mario Bros. 2 but all other codes I've tried work like they do on hardware.
I've also ran into yet another problem... when a value for the Game Genie code is higher then the nsf permits due to the smaller initial size of the nsf, I have no idea on what to do. Do I subtract the value to the offset of the missing PRG data and if so, I would have to basically rip the nsf to find where the music code is, right?
Posted: Sun Feb 28, 2010 10:59 am
by ugetab
I just checked PPPPPP for SMB 1. The reason it won't work is because that's in the song init routine, and the song init routine is now custom coding in a new location.
SMB 2 OKEATS:
40 AD 09 06 > 40 AD C9 06
SMB 3 ZKIPEE, SKIPEA:
Both of these hack the same byte of the music init routine. NSF hacks the value to be whatever the user chooses it to be. Useless to apply.
SMB 3 EAGVIT:
AE F8 07 > AE F8 80
SMB 3 KLOTOE:
F2 07 A5 6E > F2 07 A5 BC
To apply these, I just decoded the GG code, put read and execute on a range of address-3 to address in the debugger, and found the likely or only bytes being affected. Once I could see the spot in question, I recorded the bytes, and added more searchable bytes before and after the changed spot until searching for it in the file resulted in only 1 matching address.
Posted: Sun Feb 28, 2010 11:42 am
by NotTheCommonDose
With OKEATS patched into Super Mario Bros. 2, I got that same result the first time around; The nsf should have been locked into sample mode but instead, it's locked into hard drum mode.
The Super Mario Bros. 3 codes worked.
Thanks!

Posted: Sun Feb 28, 2010 4:21 pm
by ugetab
SMB2 relies on some graphics data, I think. Here's a mod that does the same thing(not having tested it much)
SMB 2 OKEATS Alternate:
40 AD 09 06 > 40 A9 EE EA
Posted: Mon Mar 01, 2010 10:11 am
by NotTheCommonDose
Cool, thanks, again.