Register - Login
Views: 96126930
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
12-10-18 12:27:16 PM

Jul - General Game/ROM Hacking - SMB2 hacking questions New poll - New thread - New reply
Next newer thread | Next older thread
Crappy Blue Luigi
Random nobody
Level: 6


Posts: 3/6
EXP: 602
For next: 305

Since: 05-04-14

From: Vera City

Since last post: 4.0 years
Last activity: 1.0 years

Posted on 05-05-14 02:31:36 PM Link | Quote
i'm a real novice when it comes to rom hacking. the most i've done before the past few days was some simple tile editing in super mario world. recently, i decided i wanted to do a hack of mario 2 where i replaced the four main characters with me and my friends, and i'm almost done doing just that!

here's a few links to relevant posts on my tumblr blog. (warning: they're a little gif heavy!)

this project is probably the most i've ever done with hex editing in my life! but i'm still scared to just run around changing hex values and seeing what happens; i'm looking for specific results, and i don't feel confident enough in myself to find them. i've done a lot of searching around for tutorials on general editing, but it's still pretty intimidating... anyway, here are my questions:

1. would there be some way i can change princess peach's animations so that she bobs up and down in her walk like the rest of the characters?

2. how does music hacking even work? would i be able to make my own music in an nsf format in a way that it could be inserted into the game?

if anybody knows what to do, please let me know!
Mattrizzle
140
Level: 28


Posts: 135/149
EXP: 117222
For next: 14116

Since: 07-27-07

From: United States

Since last post: 259 days
Last activity: 4 days

Posted on 05-08-14 10:02:42 PM (last edited by Mattrizzle at 05-08-14 10:06:37 PM) Link | Quote
1. Yes. Here's the relevant code (assuming you're hacking the US version of SMB2):

1F392: LDA $8F //[A5 8F] load character value into accumulator (Possible values: #$00: Mario, #$01: Princess, #$02: Toad, #$03: Luigi)
1F394: CMP #$01 //[C9 01] compare it to value #$01 (Princess)
1F396: BEQ #$0C //[F0 0C] branch to 1F3A4 if there's a match, skipping the code that makes the playable character bob up and down while walking
//...Bobbing code follows...

There are multiple ways you could alter the code to make the Princess walk like the other characters. Here are two:

One way is to change the character value in the compare statement at 1F395 from 01 to something meaningless, like FF. No character uses this value, so none of them will skip the bobbing code.

Alternatively, you could change the value at address 1F397 in the ROM from 0C to 00. This changes the branch length to 0, meaning the bobbing code will always execute.


2. No idea. Sorry...
GuyPerfect
Catgirl
Level: 65


Posts: 954/1094
EXP: 2333219
For next: 2409

Since: 07-23-07


Since last post: 238 days
Last activity: 123 days

Posted on 05-09-14 07:16:02 PM Link | Quote
Byte value 0xEA is NOP, so one could change the F0 0C at 1F396 to EA EA.
Crappy Blue Luigi
Random nobody
Level: 6


Posts: 4/6
EXP: 602
For next: 305

Since: 05-04-14

From: Vera City

Since last post: 4.0 years
Last activity: 1.0 years

Posted on 05-10-14 03:41:05 PM Link | Quote
Originally posted by Mattrizzle
1. Yes. Here's the relevant code (assuming you're hacking the US version of SMB2):

1F392: LDA $8F //[A5 8F] load character value into accumulator (Possible values: #$00: Mario, #$01: Princess, #$02: Toad, #$03: Luigi)
1F394: CMP #$01 //[C9 01] compare it to value #$01 (Princess)
1F396: BEQ #$0C //[F0 0C] branch to 1F3A4 if there's a match, skipping the code that makes the playable character bob up and down while walking
//...Bobbing code follows...

There are multiple ways you could alter the code to make the Princess walk like the other characters. Here are two:

One way is to change the character value in the compare statement at 1F395 from 01 to something meaningless, like FF. No character uses this value, so none of them will skip the bobbing code.

Alternatively, you could change the value at address 1F397 in the ROM from 0C to 00. This changes the branch length to 0, meaning the bobbing code will always execute.

thank you! i tried the second solution and it worked perfectly. as for the music, i'll worry about it another day.

i have one more question: where in the rom can i find the values for the heights that characters hold objects at?
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - SMB2 hacking questions New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 220d144 [2018-11-04]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

27 database queries, 1 query cache hits.
Query execution time: 0.191380 seconds
Script execution time: 0.009880 seconds
Total render time: 0.201260 seconds