• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Clear songtable extending tutorial

Status
Not open for further replies.

xGal

Mhm
241
Posts
12
Years
Hello. In this post, I am going to show you the easiest way possible to extend the songtable of any GBA game.

What we need:
- A ROM
- Sappy
- A Hex Editor (I'll be using HxD but any editor would work)
- A brain

Getting our songtable offset

Code:
FireRed: 4A32CC
LeafGreen: 4A2BA8
Ruby: 45548C
Sapphire: 4554E8
Emerald: 6B49F0
2. Navigating to our songtable

Let's say I am using FireRed.

I am opening my ROM with a hex editor.

I am going to the songtable offset, which is 4A32CC is my case.

Mark every byte there is until the end of the songtable (consecutive 00s). In FireRed, the end of the songtable is exactly at:
Code:
4A3DA8
(In a case you didn't change it)

Now, copy all the bytes you marked and navigate to any free space after:
Code:
800000
I'll be using offset
Code:
960000
Paste the bytes and remember the offset you pasted the bytes to. Now, go to the start of the NEW songtable and search the bytes:
Code:
8C BE 6F 08
. After those bytes, write
Code:
00 00 00 00 8C BE 6F 08
.

Now, Open the sappy.xml file and change the songtable of the free space offset you picked up, make sure you change the songtable to the correct game code.

Now, open up sappy and play song 347. You should hear Teachy TV song. That's good.
If you don't, you probably did something wrong.

Now, close sappy and open up the hex editor. Click CTRL+F and search the bytes: Your songtable in reserve hex. Reserve hex is simple, in my case, the songtable is
Code:
4A32CC
, so this offset in reserve hex is CC 32 4A. If you found the right bytes, there should be CC 32 4A 08. Simply overwrite the CC 32 4A to the NEW songtable in reserve hex.
Code:
960000
in reserve hex is
Code:
 00 00 96
But if you might notice there are MULTIPLE CC 32 4As around there. overwrite ALL OF THEM.

Open up Sappy and navigate to the last song. In FireRed, it's songnumber
Code:
346
Click on the right arrow to navigate to the next song.

Click on assemble song and choose in a random song.

Change the followings:

Code:
Base destination offset: Free space to import the song to.
Voicegroup offset: The voicegroup offset...
MST Offset: It will probably be on 347, but if it's not, change it to 347.
Song groups: ALL to 0
. Assemble it and play song 347. You should hear the new song! Congratulations! But, hey, we didn't finish yet!

Go to advance map and change the map music of any place you want to:
Code:
15A + M
. Where the M variable stands, put the number of the new song you inserted. Example, if it is the first song I added, I will replace M with 1, if second, I will replace M with 2, if 30, I will replace M with 30, etc.

Now, open the hex editor and navigate to the end of the new songtable. After the new song you inserted's pointer, type:
Code:
00 00 00 00
If you won't do that, it won't play ingame!

Now, test that in-game, and if you hear the new song you assembled, congratulations! You extented the songtable!

To make the access to this song easier, open up sappy.xml and navigate to your ROM's songtable. Copy the last song's FULL line and copy it to the next line. If it's teachy TV's line, it should look like that:
Code:
            <song track="0x15A">Teachy TV</song>
.

Simply check out your song's number on sappy (in my case, it's 347), open up Caculator and convert the number 347 from Dec to Hex. You should get 15B. Now, when you got the hex number of the song, simply change the line to:
Code:
             <song track="0x15B">New Song W00T!</song>
.

Let's test!
0j8XDAy.jpg


Yay :<

That's it! Simple, isn't it?

Now, this is for people wants to know how it works:

Spoiler:


I hope it helped you!

- Gal
 
Last edited:

阴魂君

_(:зゝ∠)_ so busy i am…
22
Posts
11
Years
wow..amazing!I just knew changing the song in the past,can i translate it to Chinese and reprint it to a Chinese forum?
 

Flandre Scarlet

Free your mind.
356
Posts
16
Years
But do these new songs play in-game? One major thing you're missing is telling the game itself that you have a new soundtable, and the game will just read the old table and not check the new one. Or does Sappy fix all that behind-the-scenes?

No, you have to repoint all of the pointers to the old soundtable to the new one. Just replace them with a hex-editor, but I'm sure you're experienced enough to figure that out. :)

Also, yes, Team Fail is correct, you are missing a major thing in this tutorial, which is replacing the old pointers with the new one. That way it tells the game to read the new soundtable. If you compile a song in the new soundtable with Sappy, it will just be silent in game until you do this.
 

xGal

Mhm
241
Posts
12
Years
But do these new songs play in-game? One major thing you're missing is telling the game itself that you have a new soundtable, and the game will just read the old table and not check the new one. Or does Sappy fix all that behind-the-scenes?

For me, the music is not freezing, but I almost completely forgot about this, thanks. -I would add this part when I'll be on my computer- Done. Thanks again.
 
Last edited:

xGal

Mhm
241
Posts
12
Years
Hiya guys, sorry about the BUMP, but I found some problems on the tutorial, so I fixed everything. If you already did it, I highly recommend you to re-do this tutorial!

Sorry again.

- Gal
 
Status
Not open for further replies.
Back
Top