Sweet! Thanks a bunch!
So can I only have one track for each stage? Or can I put the code in more then once
Eg. Could I do this:
28708ceb 00000040
4A000000 90180F06
14000076 FF0027F0
E0000000 80008000
28708ceb 00000040
4A000000 90180F06
14000076 FF0027F1
E0000000 80008000
I feel like if I tried this it would only load one song, as I wouldn't be able to adjust the appearance rate in the 'My Music' menu, so it would only ever load the first song. I could be completely wrong though.
Contrary to what's been said, yes, it is possible to have an entire tracklist for your custom stage. There are some restrictions, but other than that, it works. You need to use the
Tracklist Modifier Code for that. To explain, let's take the code and disect the important parts.
[This part just sets up a different reading location for the tracklist]
0610F9BC 00000014
60000000 60000000
3C80811A 7C601B78
608447E7 00000000
4A000000 81000000
301A46F8 6D755072
1417DF44 7CE03B78
1417DF4C 7C0400AE
[This line defines how many bytes are written for the tracklist]
161A47E8 000000LL
LL is the amount of bytes (the amount of lines multiplied by eight, minus the amount of 00 at the end that aren't used, in hexadecimal)
For example, if there are eight lines of data, then the amount of bytes written is 8 * 8 = 64 bytes, which is 40 in hexadecimal.
[This is the tracklist data that's being written]
00000102 03040607
08090A0B 0C0D0E0E
0E0E0E0F 10111213
14151515 16171819
1A1B1C1D 1E1F2D2D
2D202122 23242526
2728290A 2D2D2D2D
2D2D2D2D 2D2D2D2D
X1X2X3X4 X5X6X7X8
-------- --------
In this case, we're going to add one stage, and give it the tracklist of Temple. So, we'll delete the last two lines (the X1X2... and --- line) and replace it with:
20000000 00000000
This would make the tracklist be nine lines high, which means 8 * 9 = 72 bytes. However, since we padded it at the end with 00 and aren't going to use Battlefield for these non-existent stages, we can simply substract seven from the amount of bytes, making it 65 bytes, or 41, thus LL becomes 41.
[The end of the code]
E0000000 80008000
[Full code]
0610F9BC 00000014
60000000 60000000
3C80811A 7C601B78
608447E7 00000000
4A000000 81000000
301A46F8 6D755072
1417DF44 7CE03B78
1417DF4C 7C0400AE
161A47E8 00000041
00000102 03040607
08090A0B 0C0D0E0E
0E0E0E0F 10111213
14151515 16171819
1A1B1C1D 1E1F2D2D
2D202122 23242526
2728290A 2D2D2D2D
2D2D2D2D 2D2D2D2D
20000000 00000000
E0000000 80008000
Next, we'll need to set the song to be replaced per song. Let's say we took the tracklist of the example, Temple, which has two songs, Great Temple / Temple (2735) and Temple (Melee) (2816). What we now want to do is replace each song with a different one, let's say, 286C and 286D, which I assume are IDs that aren't used, and can be used with the Custom Sound Engine.
Anyway, let's pick the original code, and make some changes:
[This checks if it's on a certain stage]
28708ceb 00000040
[If that's the case, let's go to a certain location for the music]
4A000000 90180F06
What we're going to do now is make a conditional check for each song. If it's a certain song ID, replace it with another.
38000078 00002735
16000078 0000286C
E2000000 00000000
38000078 00002816
16000078 0000286D
E2000000 00000000
[Ends the code]
E0000000 80008000
[Full code]
4A000000 90180F06
38000078 00002735
16000078 0000286C
E2000000 00000000
38000078 00002816
16000078 0000286D
E2000000 00000000
E0000000 80008000
By the way, a more elegant code would be this:
[Full code]
4A000000 90180F06
38000078 00002735
16000078 0000286C
38000079 00002816
16000078 0000286D
E2000000 00000000
E0000000 80008000
Here we can see we skipped the E2000000 00000000. This part basically is an endif part, it ends a conditional branch. We then added one to the 78 of the following line. This basically is an elseif, meaning, it closes the previoius conditional branch and adds a new one.
So yeah, that's how you can make an entire tracklist with new songs. The only downside is that the tracklist will be tied to the original stage that holds said tracklist, meaning all My Music settings will apply on other stages using this tracklist.