Dec 4, 2009 at 8:00 PM
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
wedge of cheese said:Well I don't think it's that simple. There's probably some list in the CS engine where it says like "song 0000 = XXXX, song 0001 = WANPAKU" etc (except not in plain english like that obviously). You would also have to modify that list, but as far as I know no one on the forums has ever found it.
That's because they never looked!
Code:
0048C838 58 58 58 58 00 00 00 00 57 41 4E 50 41 4B 55 00 XXXX....WANPAKU.
0048C848 41 4E 5A 45 4E 00 00 00 47 41 4D 45 4F 56 45 52 ANZEN...GAMEOVER
0048C858 00 00 00 00 47 52 41 56 49 54 59 00 57 45 45 44 ....GRAVITY.WEED
0048C868 00 00 00 00 4D 44 4F 57 4E 32 00 00 46 49 52 45 ....MDOWN2..FIRE
0048C878 45 59 45 00 56 49 56 49 00 00 00 00 4D 55 52 41 EYE.VIVI....MURA
0048C888 00 00 00 00 46 41 4E 46 41 4C 45 31 00 00 00 00 ....FANFALE1....
0048C898 47 49 4E 53 55 4B 45 00 43 45 4D 45 54 45 52 59 GINSUKE.CEMETERY
0048C8A8 00 00 00 00 50 4C 41 4E 54 00 00 00 4B 4F 44 4F ....PLANT...KODO
0048C8B8 55 00 00 00 46 41 4E 46 41 4C 45 33 00 00 00 00 U...FANFALE3....
0048C8C8 46 41 4E 46 41 4C 45 32 00 00 00 00 44 52 00 00 FANFALE2....DR..
0048C8D8 45 53 43 41 50 45 00 00 4A 45 4E 4B 41 00 00 00 ESCAPE..JENKA...
0048C8E8 4D 41 5A 45 00 00 00 00 41 43 43 45 53 53 00 00 MAZE....ACCESS..
0048C8F8 49 52 4F 4E 48 00 00 00 47 52 41 4E 44 00 00 00 IRONH...GRAND...
0048C908 43 75 72 6C 79 00 00 00 4F 53 49 44 45 00 00 00 Curly...OSIDE...
0048C918 52 45 51 55 49 45 4D 00 57 41 4E 50 41 4B 32 00 REQUIEM.WANPAK2.
0048C928 51 55 49 45 54 00 00 00 4C 41 53 54 43 41 56 45 QUIET...LASTCAVE
0048C938 00 00 00 00 42 41 4C 43 4F 4E 59 00 4C 41 53 54 ....BALCONY.LAST
0048C948 42 54 4C 00 4C 41 53 54 42 54 33 00 45 4E 44 49 BTL.LASTBT3.ENDI
0048C958 4E 47 00 00 5A 4F 4E 42 49 45 00 00 42 44 4F 57 NG..ZONBIE..BDOW
0048C968 4E 00 00 00 48 45 4C 4C 00 00 00 00 4A 45 4E 4B N...HELL....JENK
0048C978 41 32 00 00 4D 41 52 49 4E 45 00 00 42 41 4C 4C A2..MARINE..BALL
0048C988 4F 53 00 00 54 4F 52 4F 4B 4F 00 00 57 48 49 54 OS..TOROKO..WHIT
0048C998 45 00 00 00 E...
That's where the names of the resources are stored.
Code:
00420F14 |. 8B0495 E881490>MOV EAX,DWORD PTR DS:[EDX*4+4981E8]
00420F1B |. 50 PUSH EAX ; /Arg1
00420F1C |. E8 CFB7FFFF CALL CS_ORG_e.0041C6F0 ; \CS_ORG_e.0041C6F0
This is the line that tells which song to pick. EDX is the number from the TSC for the song ID. 4981E8 - 49828(C?) is a list of addresses that points to the various names. 41C6F0 finds and loads the resource ORG of name EAX.
There's enough room past 4981E8 for a 42 and 43 (You'd have to find some empty space somewhere else to put the name of the resource). If you wanted, say, a hundred new songs, you'd have to find a larger empty space than there is room for at 4981E8, because at 498238 there's stuff, and I don't know what it does.
After all that, you use your resource hacker to add the ORG and give it the appropriate name. The machine will find it for you, if you did things the normal way then it will be song 42. (probably)
Um, does that make sense?
EDIT: On a side note, I don't know what effects actually ADDING the resources (ORGS) themselves will have, or if it's anything more than just inflating the .exe Also, if you wanted to play with this stuff, the U for <CMU is at 00424313, the second call is the one you're interested in.
EDIT2: some other interesting tidbits I discovered: [4A4B00] is your position in the current song (measured in beats I would imagine?) and [4A57F8] seems to be the position in the last song played (stored for <RMU, like how [004a57fc] is last song ID)