ROM Hack .wave sound files?

Tokopimv

Well-Known Member
OP
Newcomer
Joined
Jun 1, 2012
Messages
64
Trophies
0
Age
28
XP
158
Country
Netherlands
So, i liked some of the music in Adventure Time: Hey iceking why'd you steal our garbage? but when i record the sound from a ds or 3ds audio jack the quality is very bad. Atleast in my opinion. so i opened the rom with Tahaxan and i found the music, but it's encrypted to a format called .wave i don't know how to open it, but it's not just a .wav with an extra e. can anyone help please?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
A new audio format you say, consider me interested.

What windows calls a wave file is actually a non trivial format ( https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ ) although we have seen that format in games before (most notable of which being electroplankton). The DS does support various things that might be contained in the format and we have also seen PCM audio in N+, that is getting very off topic though and you can read more about all that sort of thing http://gbatemp.net/threads/the-various-audio-formats-of-the-ds.305167/ (looks like I will have to redo some of the formatting mind you).

Looking at the game (a very interesting selection of formats for others that might want to go through it by the way- tim graphics - it can't be the one playstation formats of the same name can it) I would agree the .waves are probably the sound; I certainly see no SDAT or other known formats unless they are buried in an overlay or the binary.

Knowing straight PCM audio is used on occasion and the DS hardware supports various flavours of PCM and ADPCM I busted out audacity before I even went in for a hex editor. Starting with the biggest (mainly because that is how I roll but also because a long song is easier to pick out from noise induced by importing with the wrong settings) I got a bunch of noise from the import raw setting but I expected as much and heard some music underneath it all.
Were I being sensible I would try to run it is desmume and see what settings the audio channels were at there (they are quite odd on occasion).
Second go I import in a flavour of ADPCM, mono, no endian, 22050 KHz and end up with a chipmunks rendition of what is probably the closing song.

Third go I import on VOX ADPCM, mono, no endian and 11025 KHz (a bit low for a song but phone calls are made at about the same frequency). I sense voxadpcm is not ideal (everything I get seems to be clipped or appear brickwalled although that could just be how it was mastered on the DS) and modern audacity seems to have lost the nicer import raw modes (I could not find them among the older releases when I tried the other month either) so you might instead want to find something like goldwave or whatever else is good there these days.

I only checked a handful of smaller files but they appear to be using similar settings- sometimes sound effects are encoded not in ADPCM for various reasons but seemingly not here.

Naturally I had a look in a hex editor
The magic stamp seems to be
C9FB 0C03 0000 0000 which is absolutely nothing in ASCII and then the byte flipped size at 8 hex as it is for loads of DS formats.
The header almost certainly does not end there (I guess the audio itself starts at 40 hex) and a lot of the rest of the header is 0000 although the rest could be settings. I shall have to check more though but the above should allow you to get some ripping done as I do.
 
  • Like
Reactions: Tokopimv

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,338
Trophies
4
Location
Space
XP
13,916
Country
Norway
The audio quality of streamed audio in DS games is terrible. You'd get better quality from recording audio of the 3DS version as that probably has much higher quality audio.

As for recording from an audio jack, a few things might help:
- Turn down the volume on the DS to about 2/3 or just over half
- Use a high quality cable. I've found this to really matter for this specific purpose.
- Turn down the recording volume on your PC.
- Make sure you're using the Line In port on your PC, not the Mic port, as they're treated differently.
- And last make sure your recording software actually saves recordings in high quality. I like using Audacity.
 
  • Like
Reactions: RodrigoDavy

Tokopimv

Well-Known Member
OP
Newcomer
Joined
Jun 1, 2012
Messages
64
Trophies
0
Age
28
XP
158
Country
Netherlands
A new audio format you say, consider me interested.

What windows calls a wave file is actually a non trivial format ( https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ ) although we have seen that format in games before (most notable electroplankton). The DS does support various things that might be contained in the format and we have also seen PCM audio in N+, that is getting very off topic though and you can read more about all that sort of thing http://gbatemp.net/threads/the-various-audio-formats-of-the-ds.305167/ (looks like I will have to redo some of the formatting mind you).

Looking at the game (a very interesting selection of formats for others that might want to go through it by the way- tim graphics - it can't be the one playstation formats of the same name can it) I would agree the .waves are probably the sound; I certainly see no SDAT or other known formats unless they are buried in an overlay or the binary.

Knowing straight PCM audio is used on occasion and the DS hardware supports various flavours of PCM and ADPCM I busted out audacity before I even went in for a hex editor. Starting with the biggest (mainly because that is how I roll but also because a long song is easier to pick out from noise induced by importing with the wrong settings) I got a bunch of noise from the import raw setting but I expected as much and heard some music underneath it all.
Were it being sensible I would try to run it is desmume and see what settings the audio channels were at there (they are quite odd on occasion).
Second go I import in a flavour of ADPCM, mono, no endian, 22050 KHz and end up with a chipmunks rendition of what is probably the closing song.

Third go I import on VOX ADPCM, mono, no endian and 11025 KHz (a bit low for a song but phone calls are made at about the same frequency). I sense voxadpcm is not ideal (everything I get seems to be clipped or appear brickwalled although that could just be how it was mastered on the DS) and modern audacity seems to have lost the nicer import raw modes (I could not find them among the older releases when I tried the other month either) so you might instead want to find something like goldwave or whatever else is good there these days.

I only checked a handful of smaller files but they appear to be using similar settings- sometimes sound effects are encoded not in ADPCM for various reasons but seemingly not here.

Naturally I had a look in a hex editor
The magic stamp seems to be
C9FB 0C03 0000 0000 which is absolutely nothing in ASCII and then the byte flipped size at 8 hex as it is for loads of DS formats.
The header almost certainly does not end there (I guess the audio itself starts at 40 hex) and a lot of the rest of the header is 0000 although the rest could be settings. I shall have to check more though but the above should allow you to get some ripping done as I do.

Thanks, this really helped, although i think i have better luck with just recording it from the audio jack, since i don't have that much knowledge in this sort of stuff...
by the way it's even lower than 11025KHz, which is kind of strange, but also notable when hearing the music just on the ds, the quality is just sooo bad. thanks for helping anyways. :)
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Yeah I just fired it through desmume and though some of the effects pinged around the 11000 to 13000 range it seemed many of the songs were 8000 or so which would definitely explain the (lack of) quality.

It has a fairly odd sound handler as well- spamming the pause button seems to fill all the channels in fairly short order and some of the samples seem to run long.

Rip by audio cable or loopback on an emulator if you want, now you know what the sound is you can also tweak the game to play the sounds in the wrong order- I just tried it out a basic file replacement (injection via crystaltile2 in my case but tinke is probably a better bet- I certainly trust its filesystem handling more) and got the end credits theme playing as the title theme.
 

Tokopimv

Well-Known Member
OP
Newcomer
Joined
Jun 1, 2012
Messages
64
Trophies
0
Age
28
XP
158
Country
Netherlands
Yeah I just fired it through desmume and though some of the effects pinged around the 11000 to 13000 range it seemed many of the songs were 8000 or so which would definitely explain the (lack of) quality.

It has a fairly odd sound handler as well- spamming the pause button seems to fill all the channels in fairly short order and some of the samples seem to run long.

Rip by audio cable or loopback on an emulator if you want, now you know what the sound is you can also tweak the game to play the sounds in the wrong order- I just tried it out a basic file replacement (injection via crystaltile2 in my case but tinke is probably a better bet- I certainly trust its filesystem handling more) and got the end credits theme playing as the title theme.

Right, i'll try that some other time, thanks for the tip though. i knew what the songs should sound like, and indeed when i first tried the 11025KHz on a song it sounded chipmunk-ish. i also came to the conclusion that around 8000 was the best. as for a designers standpoint for the lack of quality, they probably just want people to buy the 3ds version, and for it a 3ds. i would have done so if they released the game here, but oh well. but it's easy to see, as the songs are just playbacks of the 3ds versions songs, even the graphics are most of the time just scaled down versions. its really a shame though, cause they probably only did this to be able to rush the game before christmas, without having two teams work on the seperate versions of the game.
thanks again for helping me.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: @BakerMan, https://youtu.be/KaMSXIRReOo?si=2hRoijJtiwPUHXk5