+  RHDN Forum Archive
|-+  Romhacking
| |-+  General Romhacking
| | |-+  Multi-Jump Code and 120 Life Start for SMB2J
Pages: [1]
Author Topic: Multi-Jump Code and 120 Life Start for SMB2J  (Read 1 times)
SMB2J-2Q
Guest
« on: February 24, 2008, 05:31:52 am »

Hi,

Does anyone know which address to edit (when I use the hex editor to look at it) so I can enable multi-jumping for Super Mario Bros. 2 (Japan)??

I know on the USA NES SMB1 ROM, to enable that the ROM address is $B493 with value $00.

I know thus far I was able to enable the following into SMB2J:
Mostly no music (same result as the Game Genie code GGAOAP for SMB1):
44-AD-43-07-F0-02-A0-04
(replaced the 07 at value 0x00000F58 with 44)

Swim without water (same result as Game Genie code PIGOAP for SMB1):
51-00-8C-5B-07-AD-4E-07
(replaced the A0 at value 0x00000F98 with 51)

BONUS: What ROM address do I search and then replace the value at to obtain 120 lives (non infinite) for SMB2J (result would be the same as GG code YYTOZA for SMB1)Huh The replacement value would be 77, of course.

Thank you,



Ben
frantik
Guest
« Reply #1 on: February 24, 2008, 11:06:53 am »

for the lives, find out which memory address holds the lives counter, then once you know that look for where it's initialized when you start a new game
UglyJoe
Guest
« Reply #2 on: February 24, 2008, 01:00:42 pm »

For the double jump code, try this:

Open up the smb1 rom in a hex editor and lookup the address that you change to get the double jump code working.  Write down the 2 values that come before it, the value itself, and the 2 values that come after it.

Now open up the smb2j rom in a hex editor and do a hex search for those 5 bytes you wrote down.  If you find them, then changing that 3rd byte will probably enable your double jump.

If you don't find it, try searching for just the first three bytes or just the last three bytes. 

This will only work if smb1 and smb2j share some common code base (which, while they are similar games, may not be the case).
frantik
Guest
« Reply #3 on: February 24, 2008, 03:37:44 pm »

they do share much of the same code base but all of the memory addresses are different so you can't just search for the exact code.  for the unlimited jump it loads up mario's current state and checks if he's standing.. if so, you can jump.  otherwise you cannot.  this is why you can jump in midair sometimes after you get a power up.. while you're getting the powerup the game state things mario is standing
SMB2J-2Q
Guest
« Reply #4 on: February 24, 2008, 04:52:29 pm »

Quote from: UglyJoe on February 24, 2008, 01:00:42 pm
For the double jump code, try this:

Open up the smb1 rom in a hex editor and lookup the address that you change to get the double jump code working.  Write down the 2 values that come before it, the value itself, and the 2 values that come after it.
That would be in address 0x000034A0: 04-07-F0-F4-AD-82-07-D0 (replace F4 with 00)

Quote
Now open up the smb2j rom in a hex editor and do a hex search for those 5 bytes you wrote down.  If you find them, then changing that 3rd byte will probably enable your double jump.

If you don't find it, try searching for just the first three bytes or just the last three bytes. 

This will only work if smb1 and smb2j share some common code base (which, while they are similar games, may not be the case).
UglyJoe
Guest
« Reply #5 on: February 24, 2008, 07:20:57 pm »

I'm looking at an SMB2 (Lost Levels) rom, which is an unlicensed cart version of the FDS SMB2, and you can find the code for the double jump at offset E00F.  The code is a little different.  You'll be searching for 07-F0-F4-AD-FC instead (still changing the F4).

Quote from: frantik on February 24, 2008, 03:37:44 pm
they do share much of the same code base but all of the memory addresses are different so you can't just search for the exact code.

True, but it doesn't actually apply in this situation.  The code that gets modified is:

Code:
$7FFB:AD 04 07  LDA $0704 = #$00
$7FFE:F0 F4     BEQ $7FF4

and that is actually the same in both games.  Also, $0704 is the "swimming" flag, so the code is tricking the game into thinking we're always in a water level (although I figured it was an "always standing" trick as well until I looked up what $0704 was).
« Last Edit: February 24, 2008, 07:53:38 pm by UglyJoe »
frantik
Guest
« Reply #6 on: February 24, 2008, 10:09:27 pm »

Quote
I figured it was an "always standing" trick as well until I looked up what $0704 was).

yeah i guess it depends on how you implement it cause when i added it to a game I just changed some code right above it, though it would require two game genie codes i suppose

Code:
$7FF7:A5 1D     LDA $001D = #$00
$7FF9:F0 11     BEQ $800C
$7FFB:AD 04 07  LDA $0704 = #$00
$7FFE:F0 F4     BEQ $7FF4

$7FF7:A5 1D   -----> A9 00 will always make the game thing you are standing on the ground when you press the jump button.


and i thought all the memory addresses were different but i guess maybe it's just some of them
SMB2J-2Q
Guest
« Reply #7 on: February 25, 2008, 10:42:23 pm »

I suppose the last resort we could be doing now is trying to (at least) re-program the SMB2J ROM image for it to be 100% compatible with the Game Genie codes (when using them by way of such emulators like FCEU or NEStopia).

The GG accessory recognizes all NES CPU ROM addresses between $8000-$FFFF (add $8000 to something like $1107 to get $9107 for the GG). Basically we must add $2000 to the standard 6502 ROM addresses of SMB2J for Game Genie compatibility.

Once this is all finished, to get water music all the time, what was $6F47:8C in the original FDS ROM will become $8F47:8C (Game Genie code would be KAKANN in SMB2J just as KAEPYO represents SMB1).

SMB2J (reprogrammed) Game Genie code list (sampler):

STGAVN - Music stops immediately (like STAPTO in SMB1)
KAKANN - Water music all the time (like KAEPYO in SMB1)
PTKANY - Dungeon music all the time (like PTEPYP in SMB1)
YYGANN - Koopa Castle music all the time (like YYAPYO in SMB1)
TPKANN - Star Man music all the time (like TPEPYO in SMB1)
TZKANN - Low background music (like TZEPYO in SMB1)
GGGEEY - There is usually no music (like GGAOAP in SMB1)
XTGEEN - Repeating overworld music all the time (like XTAOAO in SMB1)
SZGEEN - Alternate water music all the time (like SZAOAO in SMB1)
PSAEEY - Swim without water (always swimming) (like PIGOAP in SMB1)
AEYONY - Multi-jump (like AEPLLG in SMB1)
SXPGGS - After being powered up to Super or Fiery Mario, you shrink to Small size when hit by an enemy but will keep your Fiery power. When hit again, you'll come out Super sized again. You will die, however, if you fall into a pit or run out of time. (Like SZLIVO in SMB1)

What do you think?
« Last Edit: February 27, 2008, 02:52:40 am by SMB2J-2Q »
UglyJoe
Guest
« Reply #8 on: February 25, 2008, 10:54:05 pm »

I just got the image in my head of someone trying to use Game Genie with an FDS.

Famicom -> FC to NES pin adapter -> Game Genie -> NES to FC pin adapter -> FDS  Cheesy
Karatorian
Guest
« Reply #9 on: February 26, 2008, 08:50:29 pm »

Quote from: UglyJoe on February 25, 2008, 10:54:05 pm
Famicom -> FC to NES pin adapter -> Game Genie -> NES to FC pin adapter -> FDS  Cheesy

Ha ha. That's a funny image. Someone with all that hardware should set it up and take a pic, just for grins.
KingMike
Guest
« Reply #10 on: February 26, 2008, 10:03:28 pm »

I actually have all that stuff (actually, I have an official US NES and a Famiclone).
But I don't have a working camera.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC