Next Page

How to find coefficients of DSP ADPCM by Mygoshi at 3:35 PM EDT on June 1, 2016
All is in the title. I have a lot of problems to decode audio files from Wii/GC versions of games, because they use Nintendo GameCube DSP 4-bit ADPCM codec. I have all the infos about the file (Header skip, interleave, channel, frequency, etc) but I don't know how to find coefficients. How to find them?? Thanks
by Nisto at 3:59 PM EDT on June 1, 2016
They are typically 16*2 bytes (depending on DSPADPCM variant). If there's only coefficients for one channel, it may be harder, but one thing you can do otherwise is to look for similarities between two 16-byte blocks.

by Mygoshi at 4:32 PM EDT on June 1, 2016
I don't see any similarities in your photo (I'm probably blind...)
Here's the link of the file if you can help me? What I know is it's a stereo file, with 0x8800 for interleave and it's Nintendo GC 4-bit ADPCM.
Download
by Nisto at 4:42 PM EDT on June 1, 2016
I think this is just the ADPCM data. The coefficients may be in a separate file.
by Mygoshi at 4:45 PM EDT on June 1, 2016
I have a cert.bin, opening.bnr, align-files.txt file, tmd.bin, ticket.bin, setup.sh, setup.txt, setup.bin, h3.bin,

The align-files.txt say " 0x8 = files/*.BNR
0x8000 = files/packfile/*.dat
0x20 = files/sound/*.RAW
" I don't think that helps me
by hcs at 6:06 PM EDT on June 1, 2016
I agree it looks like DSP, but I agree with Nisto that the headers aren't in this file. It's not impossible that it could be another similar ADPCM fix a fixed filter coef table, but seems unlikely.

Usually what you see with coefs is a positive, negative pattern, like 0x2D4-0x2F4 in Nisto's example:
0B 6C FB 47 0F 5F F8 2F 0E 33 F9 60 0F 4D F8 9B 0D CD F9 5F 0F A9 F8 28 0D E5 F9 E7 0F 1D F8 DC

0x0B6C is positive, 0xFB47 is negative
0x0F5F is positive, 0xF82F is negative

(2's complement)

You can see the pattern clearly if you line them up like this:

0B 6C FB 47
0F 5F F8 2F
0E 33 F9 60
0F 4D F8 9B
0D CD F9 5F
0F A9 F8 28
0D E5 F9 E7
0F 1D F8 DC


And they're similar in magnitude, usually the positive is around twice the negative: 0x0B6C is 2924, 0xFB47 is -1209 ; 0x0F5F is 3935, 0xF82F is -2001.

The first channel in Nisto's example (0x2AC-0x2CC) is odd in that there isn't a negative, but you can see that it mostly fits:

03 55 00 5F
0E CB F8 C9
05 39 02 76
0F CB F8 1A
04 13 02 6A
0E 9E F9 3D
08 FA FE D9
0F 80 F8 79

edited 6:11 PM EDT June 1, 2016
by Mygoshi at 6:27 PM EDT on June 1, 2016
Oh yes I see now. It's a little bit difficult to understand you, but I understood in general. I have to find an another file for the coeffs? because I have a lot of other files but I don't think they can help to get the coeffs.
by Nisto at 6:50 PM EDT on June 1, 2016
Can you dump a list of the game files? (on Windows, you can do that by Windows-key+R -> cmd -> dir /B /S "path to game directory" > "path to a file to write list to" (e.g. dir /B /S "C:\game" > "C:\list.txt").
by Mygoshi at 12:59 AM EDT on June 2, 2016
Here's the dump file : Download
by snakemeat at 9:41 AM EDT on June 2, 2016
Thanks for the explanation, hcs. Very helpful. I've always found finding the coefficients challenging as well.

With this info it seems like a scanner for possible coefficients could be developed.

Next Page
Go to Page 0 1

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source