Post subject: Some help please?
Former player
Joined: 6/25/2004
Posts: 607
Location: Maine
I'm gonna be making a YouTube video using the Game Genie code "AOSUZI" (For the PRG1 ROM of SMB3) that allows you to pull ice blocks out of the scenery, which in turn allows you to destroy backgrounds and dig through walls. The problem however, is that on levels with lifts in them (Such as 1-4 and 1-6), the game crashes and freezes. I once had an eight-letter code that took care of this bug, but it's long gone. So my question is, could someone convert "AOSUZI" from a six-letter code to an eight-letter code for me? I don't have the proper tools or knowledge to do this myself, and I'd be very appreciative of the help. (And this can be locked once my help has arrived) Thank you in advance! --- (If this topic is duplicated, then I apologize. I made this earlier and it didn't show up on the topics list for me for whatever reason.)
Active player (283)
Joined: 3/4/2006
Posts: 341
The code converted to 8 letters is AOSUZSSI. However, that code seems to be a slightly unusual way to accomplish that, especially when compared to something like AESUTIIZ.
Former player
Joined: 6/25/2004
Posts: 607
Location: Maine
Why would you say it's slightly unusual, just outta curiousity?
Active player (283)
Joined: 3/4/2006
Posts: 341
Since you asked, I'll explain the codes, but it's impossible to do so without getting into assembly code. This is the relevant part of the unmodified ROM:
B5D8: A9 32    LDA #$32
B5DA: DD 03 06 CMP $0603,X
B5DD: D0 25    BNE $B604
Based on what happens when this is modified, I would assume that the game checks to see if a certain tile is a brick you can carry. If so, it continues on to B5DF, and otherwise it branches to B604. Both Game Genie codes work by ensuring that the game never branches to B604 from this point. The code you mentioned uses the conveniently placed 03 to convert the comparison to a branch which gets you to the right place.
B5D8: A9 32    LDA #$32
B5DA: 10 03    BPL $B5DF (this always branches, because 0x32 is positive)
B5DC: 06 D0 25   (these bytes are skipped over)
The usual way to bypass a conditional (and what I did in the other code I mentioned) is to make the branch null:
B5D8: A9 32    LDA #$32
B5DA: DD 03 06 CMP $0603,X
B5DD: D0 00    BNE $B5DF
With either method, the code will always continue to B5DF from here, which seems to fool the game into thinking you can pick up a brick.
Former player
Joined: 6/25/2004
Posts: 607
Location: Maine
Oh, OK. I think I got it now. Thanks again, Nitrodon! I'll make sure to credit you in the video.