How to play audio from a Nintendo DS game

Codecs, formats, encoding/decoding of game audio, video and music
amgb
Posts: 44
Joined: Tue Jun 22, 2021 8:38 pm

How to play audio from a Nintendo DS game

Post by amgb »

Hello everyone.

I have found on the Internet a nds file of the game I was looking for, Star Wars - The Clone Wars - Jedi Alliance. I have been able to extract allt the files with the NDSHeader tool. Howerver, when I open the sound folder, there is a file named "French.voicepack" (https://we.tl/t-RM56QUnk2r). I don't know if the extension "voicepack" even exists, but does someone know how I could read these files if this where they are ?

Thanks in advance for your help. :D
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: How to play audio from a Nintendo DS game

Post by BloodRaynare »

Here's the BMS script to extract your file (Bit hacky on the filecount calculation).

swcwja_voicepack.bms

Code: Select all

get FILES long
math FILES - 2
goto 0x10
for i = 0 < FILES
	get OFFSET long
	get SIZE long
	string NAME p "%04d.strm" i
	log NAME OFFSET SIZE
next i
However, vgmstream were unable to play the extracted STRM files due to the number of audio samples indicated on the header are 0 which means no sample/audio data. I had to write this TXTH supplementary file to make sure they were playable but I don't know if the regular IMA codec will sound correctly since I assumed Nintendo used their own implementation of it.

Save the TXTH script below as ".strm.txth"

Code: Select all

codec = IMA
channels = @0x1a$1
sample_rate = @0x1c$2
start_offset = @0x28
data_size = @0x64
num_samples = data_size
Also one more thing, there are 0-byte file inside there which means no data at all so they were unplayable. Just skip them.
amgb
Posts: 44
Joined: Tue Jun 22, 2021 8:38 pm

Re: How to play audio from a Nintendo DS game

Post by amgb »

You are amazing ! Thanks for the files !