• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] Switching music offsets in Emerald

In Sappy 2006 mod 17., Is it possibly to switch the music played in battle or any other miscellaneous in game for Emerald.
For example: The battle music plays the unused FR/LG battle musics also changing the bike and surfing music to something else.
Alt method:Is there a tool or an Hex offset to make that work? ---Thanks
 
While viewing a song in Sappy, there will be a label that says "Table 0x06Bxxxx"
There will be another label that says "Header 0x0XXXXXX"

Keep track of those numbers for the songs you want to replace.

The Table offset will point you to that song's pointer in the song table. Navigate to that offset in a hex editor and replace the song's pointer offset with the Header offset for the song that you want to replace with.

For example, if you want to replace the Littleroot Test song with the GS Route 38 song, copy the GS Route 38 header, which should be 0x0904850, and navigate to the Table offset of Littleroot Test using a hex editor, which should be 0x06B54E0. At that offset, you should see something like "00 07 00 00 78 44 90 08." Those last four bytes should be the offset of the Littleroot Test header, but reversed. Change those last four bytes to the reversed offset of the GS Route 38 header, and now the Route 38 music will be played instead of the Littleroot Test.
 
Last edited:
That literally just replaces the pointer to the song though. What if you still wanted to use that song elsewhere in the game? I think what op was asking is if there is something like, a value that determines which song out of the list of all of them is used for things like battles, evolution, and other "system" functions that you normally don't/can't reassign. I've been wondering this myself, actually D:
 
That literally just replaces the pointer to the song though. What if you still wanted to use that song elsewhere in the game? I think what op was asking is if there is something like, a value that determines which song out of the list of all of them is used for things like battles, evolution, and other "system" functions that you normally don't/can't reassign. I've been wondering this myself, actually D:

You could just swap the pointers between the two songs using a hex editor. However yes, somewhere in the data lies a pointer or byte that tells the game what the default battle theme is, etc. But I do not know where those are. You could try looking for the song's header offset in a hex editor to see if it lies elsewhere besides the song table, but I am unsure if the game uses a pointer or an index to determine what song to play.
 
Aha! Getting warmer. Emerald stores the index number of the current song to be played at 0x03000f48 in memory. If you made a game shark code you could force it to play any song when a battle is entered (or just in general) ... I have to run out so I can't look in to this further just yet, but in theory you could trace whatever is writing to this memory address when a wild battle begins and probably find out where it's pulling the number from (for reference, 0x01DA is the value for the Hoenn Wild Battle, 0x01FE is the Kanto battle theme) Perhaps yourself or someone else could look in to it further while I'm out.
 
Back
Top