News: 11 March 2016 - Forum Rules

Author Topic: In need of assistance, Super Mario Bros 3 and hex editing.  (Read 5209 times)


  • Jr. Member
  • **
  • Posts: 5
  • I'm Aubrey. I'm still a beginner hah.
    • View Profile
In need of assistance, Super Mario Bros 3 and hex editing.
« on: April 16, 2011, 06:16:44 pm »
I'm using FCEU's  hex editor to edit the music on Super Mario Bros 3 for each world map.

I'm having a hard time understanding exactly what to change. I understand a little about hex addresses but that's pretty much it.

I understand that these are the addresses for world maps

0x3C424-0x3C42C (0x9) - Music for world maps.

However I don't know how many bytes (0x9) are or how to change them because whenever I go to try to change them the sound on the world map doesnt change. It's irritating a bit. Is there anyone who could explain this to me. I'd be greatful.

I'm not even sure if I'm even editing the right hexes.
Thank you.
That's not very Chanel of you. :|


  • Jr. Member
  • **
  • Posts: 19
  • Bestower Of Blue Bombs, Emissary Of Enigma
    • View Profile
Re: In need of assistance, Super Mario Bros 3 and hex editing.
« Reply #1 on: April 16, 2011, 07:59:22 pm »
I have never personally dealt with editing Super Mario 3, but I have dealt with your level of frustration, and still do to this day.  :banghead: ROMhacking, I have discovered, is a never-ending learning process. I've been plugging away at it in one form or another for the past six-and-a-half years and even now I still feel like a beginner at it in many respects. Despite all this, let's see if we can help you out a bit and get you pointed in the right direction...

First, you're going to need to get yourself some useful tools, as editing things in FCEU, as useful as it can be, can only take you so far. I would recommend a a good hex editor so that you can deal with the ROM directly. I have three I keep lying around which I use for various purposes...Hexecute, which I keep around for easy-as-pie copying and pasting, XV132 which also has some useful editing functions my other ones don't have, and HexCmp which has proven extremely useful to me as it can load two ROMS at once and highlight the differences between the two. You'll probably have to fork out a little dough for HexCmp, but the others, as far as I can tell, are free.

Another good tool you can use for finding data in a ROM is a file corrupter. I have personally found Corrupster to be the most easy and straightforward to use. It will basically let you corrupt a byte in a ROM, or a range of bytes, with either random values or a specific range of values so that you can play the ROM and see what changed, and if what got fudged up is what you're looking for, you're on the right track. It will be up to you from that point on to figure out the format in that range of bytes in order to manipulate the ROM to do what you want. A ROM corrupter may not tell you how to change what you want to change but it's definitely useful in telling you where to look. As far as Super Mario Bros. 3 goes, I'm not sure if you are trying to change the actual music data itself or change what music gets played in what stage, (in which case you will have to deal with pointers,) but Corrupster should get you well on your way.

I sincerely hope that helps, given my limited experience with what you're trying to do. Good luck to you. :)

Cheers and thumbs up.  :thumbsup:
I do things in the manner in which I do them because doing so makes perfect sense to me. Whether or not this makes sense to others or follows the status quo is completely irrelevant. My own personal perceptions, therefore, do and shall always represent the colorful reality in which I believe I live.


  • Jr. Member
  • **
  • Posts: 5
  • I'm Aubrey. I'm still a beginner hah.
    • View Profile
Re: In need of assistance, Super Mario Bros 3 and hex editing.
« Reply #2 on: April 16, 2011, 08:03:23 pm »
I'm not trying to change the music itself, just what plays on which world map.

Basically, what I'm trying to do is Make the World 5 map music play on World 3 and World map 4 music play on world 8... etc

Thank you. very much I will give this a try.

April 16, 2011, 10:06:22 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Well I tried using the hex editors you provided but I'm a bit lost. The one wouldn't load. I really don't know what to do now. Thank you for your help
If anyone knows how to change the world music around in Super Mario bros 3. I'd be really greatful If you could tell me how to do it.

Thank you.
« Last Edit: April 16, 2011, 10:06:22 pm by esmekalicreeyahh »
That's not very Chanel of you. :|


  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 595
    • View Profile
    • snarfblam
Re: In need of assistance, Super Mario Bros 3 and hex editing.
« Reply #3 on: April 18, 2011, 05:58:37 pm »
I had no issue with this. Make sure you are looking at the ROM data in FCEU. It's also possible that the offset is different if you have a different version of the ROM. Mine is labeled 'PRG0'.

The original data should be:
Code: [Select]
01 02 03 04 05 06 07 08
Also understand that the music currently playing won't change as you edit these values. This list is only accessed once each time the over-world is shown. The value is read, and stored in memory. The change doesn't take effect until the next time the over-world screen is loaded.
Code: [Select]
0F:8685:BC 14 84  LDY $8414,X  ; Level number is stored in X. Song number is loaded to Y.
0F:8688:E0 04     CPX #$04
0F:868A:D0 0C     BNE $8698
0F:868C:AE 26 07  LDX $0726
0F:868F:B5 77     LDA $77,X
0F:8691:F0 05     BEQ $8698
0F:8693:A0 09     LDY #$09
0F:8695:4C 9F 86  JMP $869F
0F:8698:AD 53 7F  LDA $7F53
0F:869B:F0 02     BEQ $869F
0F:869D:A0 0C     LDY #$0C
0F:869F:8C F5 04  STY $04F5    ; Store song number in RAM (at $04F5)
0F:86A2:A9 00     LDA #$00
0F:86A4:8D F2 05  STA $05F2
0F:86A7:A9 EF     LDA #$EF
0F:86A9:85 FC     STA $00FC
0F:86AB:A9 C0     LDA #$C0
0F:86AD:8D 00 01  STA $0100
0F:86B0:A9 0B     LDA #$0B

If you change the value in RAM at $04F5 then the music will suddenly change.