Music Modifier [Phantom Wings]
4A000000 9017EBCC
1400XXXX 0000YYYY
E0000000 80008000
XXXX = Stage Offset + (Song # - 1) * 8
YYYY = Song to Replace with
So, if you wanted to change the eleventh song
on the Halberd to another song, then you
would just make:
Stage offset for the Halberd
\
XXXX = 268 + (B - 1) * 8
^B = 11 in Hex
XXXX = 268 + A * 8
XXXX = 268 + 50
XXXX = 318
So your code would be:
4A000000 9017EBCC
14000318 0000YYYY<-- Insert New song here.
E0000000 80008000
I am having trouble hacking my music, and the main reason is cause I don't understand the forumula for the stage/song number.
XXXX = 268 + (B - 1) * 8
^B = 11 in Hex
XXXX = 268 + A * 8
XXXX = 268 + 50
XXXX = 318
268 + B (11) - 1 * 8 should = 348
But 318 is the result
SOME PLEASE TELL ME WHAT THE HECK THE A IS!
I don't get how it comes up with 318, if someone can explain the A, I would greatly appreciate it.
How does the A = 50?!
All of the numbers are in Hex. Decimal goes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, then starts a new column of numbers. By comparison, Hex goes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F before starting a new column.
A number in decimal (say, 243) can be written as 3*1 + 4*10 + 2*10² (100)
A number in hex (243 again) can be written as 3*1 + 4*16 + 2*16² (256)
268 in hex is equivalent to 8*1 + 6*16 + 2*16² 256) = 616 in decimal
A in hex is equivalent to 10 in decimal (it comes after 9!).
8 times 10 in decimal is 80. 80 in hex is 50 (it is 5 lots of 16 and 0 lots of 1)
That said, I think an error must have been made at the end of that thing, because 268+50 is 2B8. It might also be my lack of experience with the code.
Nvm, I got it to work, thanks anyway