• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Audio] [Pokeemerald] How Do You Increase the Track Limit for songs?

I've been trying to figure out how one would go about increasing the track limit for songs in pokeemerald. Currently, you can have a max of 10 tracks in one song, and any tracks beyond those 10 will be completely silent. Increasing this limit would allow for easier transposing of songs into pokeemerald, since you won't have to interweave tracks or delete tracks to be within this limit. According to the following post, there's some way to repoint RAM to increase the track limit to at least 16:
.....By default, Pokemon Firered, as an example, can play 10 tracks at once, but it's possible to repoint the amount of playable tracks to a new RAM area to allow for 16 (or more, but the max amount of tracks I've seen in any GBA game has 16) tracks.

I don't even know where to start looking to make this change. If anyone knows what RAM I would need to repoint and how to go about doing it, or even knew what files I should look into to find what sections of RAM are used for track allocation, I would be incredibly grateful for the information.
 
I figured it out. I just had to go into sound/music_player_table.inc and change the 10 after "gMPlayTrack_BGM" to 16, and then go over to src/m4a_1.s and make this change:
Code:
gMPlayTrack_BGM:
    .space 0x320
↓              ↓
gMPlayTrack_BGM:
    .space 0x500
With that, you have full access to the sixteen tracks that the software is capable of using.

Update
If you're using a more recent version of pokeemerald (or pokefirered), you'll instead just go into sound/music_player_table.inc and make this change:
Code:
.equiv NUM_TRACKS_BGM, 10
                       ↓↓
.equiv NUM_TRACKS_BGM, 16
 
Last edited:
I figured it out. I just had to go into sound/music_player_table.inc and change the 10 after "gMPlayTrack_BGM" to 16, and then go over to src/m4a_1.s and make this change:
Code:
gMPlayTrack_BGM:
    .space 0x320
↓              ↓
gMPlayTrack_BGM:
    .space 0x500
With that, you have full access to the sixteen tracks that the software is capable of using.

What do those space values mean?
 
What do those space values mean?

From what I can gather and guess, that ".space" command is allocating space for gMPlayTrack_BGM. Since I'm wanting to add in more tracks, I need to give the background music player more memory to store said tracks. If I don't, these tracks will use memory found in the sound effect player's space, which will cause problems.
 
How would you do this in FireRed?

If you're using the most updated version of pokefirered or pokeemerald, the process of doing this is a little different now. Still go to sound/music_player_table.inc, but now just make this change:
Code:
.equiv NUM_TRACKS_BGM, 10
                       ↓↓
.equiv NUM_TRACKS_BGM, 16
That's all you have to do now. You don't have to do anything in src/m4a_1.s anymore. That will increase the track limit to 16 and also allocate the extra space necessary to handle the additional tracks.
 
Back
Top