ROM Hack Question about sound hacking

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
Hi all,

I'm currently in the process of replacing some of the music in Gyakuten Saiban 2 (Phoenix Wright 2) with some of the tunes from the first game. (The first one had much better music, IMO.)

Anyways, I have successfully replaced a few tunes and they work 100% perfectly when the recompiled rom is run on a flash cart. However, the only ones I could replace were the same size in each game, or were smaller in the source game (GS1) and padded with zeros to fill the gap in the sound_data.sdat file. This was all done in a hex editor, of course.

My question is, is there any way to find and change the pointers that indicate where in the sound_data.sdat file the game looks up the music? Reason I ask is that I want to replace some tunes that are smaller in GS2. I can't just put in the entire track from GS1, as it would offset every following track, and the game crashes when trying to look up those tracks and they are not where the game code points to in the sound_data.sdat file.

So, is it even possible to hex edit one of the files to change the pointers? I don't mind doing the work, as I love the music in GS1 and am not at all fond of the remixed music in GS2. The few tracks I have already replaced make a huge difference in enjoyability for me, so I'd like to go to the trouble to doing more. Unfortunately, the ones I have left are all larger in GS1 than GS2, which would cause the above-mentioned offset in the sound data file.

Any advice or ideas? Thanks in advance.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
Wow, don't I feel silly.
tongue.gif
After that long-winded post, I found some pointers near the beginning of the sound_data.sdat file itself. I'm going to play around with this and see if I can get it all working with longer tracks inserted.

Does anybody have any input on this? Will increasing the overall size of the sound_data.dat file cause any issues? Do I have to worry about checksums or anything else like that?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,282
Country
United Kingdom
I was going to start just such a project this evening (it was going to be an example for my GBA/DS rom hacking docs), seeing hacks (especially DS ones and especially sound hacks) is always good though and I wish you the best of luck.

Unfortunately there exists no sound recompiler like NDSTool does for DS roms so you are in for a fun time with your hex editor. Length of soundfiles should not matter for most games (see all the early rom rips during the loadme/ndspatcher days where soundfiles were replaced) and even then I have simply chopped off the end of the file on problem roms (Animal crossing mainly) without issue.

As for checksums the only ones I am aware of are the CRC16 of the header (as well as the usual GBA logo buisness), none of which are going to affect you here.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
Thanks for the feedback.

I replaced a total of about 8 tracks in GS2, and am currently crawling through the sound_data.sdat file updating the pointers. I've spent the last 2.5 hours on it and am about 10% of the way through it. It's very tedious, but it will be worth it when it's done. My only fear is that after all this work, I'll have missed or miscalculated one offset, which would screw up the entire file.
tongue.gif


But yes, it would be nice if a recompliler existed. Since this is something I can do fairly quickly and easily on my own, this would be extremely simple for an .exe file to do. All it would have to do is to put all the files back together in the order specified in the .smap file and just update the address for the beginning of each file in the table at the beginning of the sound_data.sdat file. I wish I knew some programming, I'd make it myself....
 

Harsky

Madmin
Member
Joined
Aug 2, 2004
Messages
5,561
Trophies
1
XP
3,840
Country
United Kingdom
I bid you good luck with this. I like Phoenix Wright 2 but the music doesn't hold the same tension as the first one.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
Looks like it was a success. Over four hours worth of work!
wacko.gif
Would have taken two seconds with a proper compliler though....
mad.gif


I haven't played far enough to get to any parts with the swapped tracks, but the existing tracks still work just fine. I'll post another message in this thread once I've gotten back into court and objected to some testimonies. I'm currently on the third case, pre-trial.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
if you would like another project after your done with that you could rip the music from the children of mana.
Sorry, I'm not really looking for additional work. You can easily do it yourself though, it's pretty simple. Check out some of FAST6191's past posts on the subject and you'll find a link to some tools you can use to extract the music and convert it to midi files.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
If I find out that it's working properly, I will put the sound_data.sdat file up somewhere for download. Probably won't be today though, I'm really pressed for time.
 

Sevael

Well-Known Member
OP
Member
Joined
Feb 16, 2003
Messages
149
Trophies
2
Website
Visit site
XP
801
Country
Canada
It's not NDS, but I will change the music of DBZ Tenkaichi 2 to the japanese version. Much better hearing the anime original music during the game!
I was actually thinking about doing the same thing. Are you going to be updating the US version, or the European one?

If you get it done, please do us the favor of posting a list of instructions as to exactly how you did it once you've got it working. I already have the Japanese version and don't mind it at all, but my buddies don't know any Japanese and don't like the English version of the show/games.
 

Mucuna

Well-Known Member
Member
Joined
Jul 28, 2006
Messages
367
Trophies
1
Age
43
Location
Rio de Janeiro, Brazil
Website
Visit site
XP
329
Country
Brazil
It's not NDS, but I will change the music of DBZ Tenkaichi 2 to the japanese version. Much better hearing the anime original music during the game!

I was actually thinking about doing the same thing. Are you going to be updating the US version, or the European one?

If you get it done, please do us the favor of posting a list of instructions as to exactly how you did it once you've got it working. I already have the Japanese version and don't mind it at all, but my buddies don't know any Japanese and don't like the English version of the show/games.

Sure!

I've the european version. Gonna have the japanese on wednesday, so I start the thing. Hope it will be simple.

The only thing in english that I want in the game is the text. The musics and voices, in japanese.:-)
 

Elrinth

:Master beyond your imagination:
Member
Joined
Nov 6, 2002
Messages
2,976
Trophies
2
Age
39
Website
www.elrinth.com
XP
1,260
Country

Harsky

Madmin
Member
Joined
Aug 2, 2004
Messages
5,561
Trophies
1
XP
3,840
Country
United Kingdom

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Sorry for accidentally bending over