Hi! I need help automatically adding the corresponding DSP ADPCM header and the original filename to each headerless (*.raw) audio files.
In the game files, there's a "sound" folder containing all the *.RAW audio files (headerless) with dialogs, sound effects and music.
Each audio file finds his header and his proper filename inside the *.HNK files which can be found in the "hunkfiles" folder.
For instance, headers list start at offset 0xB7FA20 in the "global.hnk" files.
I must say "global.hnk" isn't the only one that stores the header. There are a lot of other HNK files. This one seems to contain what I need: music headers.
The first one is for "4acda574.raw". We can see its original filename "MUS_slower_loop_01.mus" and just before, the header with coefficients. Without these coefficients, I can't create a GENH header in order to play those because it is unsupported DSP. Plus, each file has a different header.
Music specs:
- 32kHz sample rate
- 2 channels
So my question is: is it possible to add the proper header for each RAW files and to rename them into their original name?
GLOBAL.HNK/GLOBAL.FILES: https://mega.nz/#!29dBCa7Q!hX7TAgvL-iM- ... juO8OWmivs
4ACDA574.RAW: https://mega.nz/#!vkEzQYCL!l1p-W7gjHpHC ... VQP3A4s9oo
Thanks!
The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
-
- Posts: 140
- Joined: Mon Feb 05, 2018 5:45 pm
-
- Posts: 48
- Joined: Wed Oct 12, 2016 12:22 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
This managed to extract the headers under the right names, havn't had any luck getting a usable media file however, likely because im unfamilar with audio formats
viewtopic.php?t=173
viewtopic.php?t=173
-
- Posts: 140
- Joined: Mon Feb 05, 2018 5:45 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
Thank you! The script correctly extracted the header part. The problem is that I'll have to manually add the header to the original file, which will take hours since I have to do it for 8000+ files.
-
- Posts: 48
- Joined: Wed Oct 12, 2016 12:22 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
Warthog1336 wrote:Thank you! The script correctly extracted the header part. The problem is that I'll have to manually add the header to the original file, which will take hours since I have to do it for 8000+ files.
I tryed to add the header it extracted to the file but it wouldn't play, what should play this?
-
- Posts: 140
- Joined: Mon Feb 05, 2018 5:45 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
I created a GENH header with VGMToolbox with these settings
Codec: Nintendo GC DSP 4-bit ADPCM
Header skip: 0x9E
Frequency: 32000 Hz
Raw Data Size: 1
Channels: 2 (Stereo)
Interleave: 0x8000 (it's not the right interleave, I can't find it)
Loop: No Loops
Then I play the resulting GENH with vgmstream.
Codec: Nintendo GC DSP 4-bit ADPCM
Header skip: 0x9E
Frequency: 32000 Hz
Raw Data Size: 1
Channels: 2 (Stereo)
Interleave: 0x8000 (it's not the right interleave, I can't find it)
Loop: No Loops
Then I play the resulting GENH with vgmstream.
-
- Posts: 48
- Joined: Wed Oct 12, 2016 12:22 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
Yes but you are not giving me enough info here,
Where in the header are the coefficients etc that you are using to make the header.
Where in the header are the coefficients etc that you are using to make the header.
-
- Posts: 140
- Joined: Mon Feb 05, 2018 5:45 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
The left channel coeff is at offset 0x40
Right channel 0x70
Coef type: Normal (Big Endian)
Right channel 0x70
Coef type: Normal (Big Endian)
-
- Posts: 140
- Joined: Mon Feb 05, 2018 5:45 pm
Re: The Croods Prehistoric Party [Wii U] HNK/FILES/RAW
I found the block size which is 0xA000.
I added the headers manually for each file. Hope there will be a solution for the other games.
I added the headers manually for each file. Hope there will be a solution for the other games.