Mortal Kombat X sound format

Codecs, formats, encoding/decoding of game audio, video and music
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Mortal Kombat X sound format

Post by AlphaTwentyThree »

id-daemon2 wrote:
AlphaTwentyThree wrote:What exactly does your tool do? Doesn't it read the offsets and sizes of the ogg containers and sends them through the dll to decode?


No. It passes the whole FSB file to the dll.

Ok, I didn't know that... Seems like I'll have to give it a try after all... ;)
brendan19
Posts: 144
Joined: Fri Aug 08, 2014 11:25 am

Re: Mortal Kombat X sound format

Post by brendan19 »

id-daemon2 wrote:This may mean there's no names inside the FSB. Can you send me an example file?


Sure, here's an example file. It doesn't have the filename inside the FSB so maybe you could add that to your program? If no string ID is found for a name then it uses the basename of the FSB file adding a _1, _2 etc or something if there is more than one file :)

Sample File
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Mortal Kombat X sound format

Post by AlphaTwentyThree »

Else... could you upload the source code somwhere? Maybe somebody is able to write an according QuickBMS script which eventually can be rewritten to split FSB5 containers?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

AlphaTwentyThree wrote:Else... could you upload the source code somwhere? Maybe somebody is able to write an according QuickBMS script which eventually can be rewritten to split FSB5 containers?


Sure, here it is. But it will not help a bit to write any scripts:

Code: Select all

result = sound->getNumSubSounds(&numsubsounds);
result = sound->getFormat(&stype,&sformat,&s_channels,&s_bits);

for (i=0;i<numsubsounds;i++)
{
   sound->getSubSound(i, &sound_to_play);
   sound_to_play->seekData(0);
   result = sound_to_play->getDefaults(&s_freq,&s_bits);
   result = sound_to_play->getFormat(&stype,&sformat,&s_chan_this,&s_bits);
   result = sound_to_play->getLength(&bs, FMOD_TIMEUNIT_PCM);
   result = sound_to_play->getName(fnn,nl);
   buffer = (char*)malloc(bs*s_channels*s_bits/8);
   result = sound_to_play->readData(buffer,bs*s_channels*s_bits/8,&br);
   FILE *file = NULL;
   file = fopen(strcat(fnn,".wav"), "wb");
   WriteWaveHeader(file,(unsigned long)s_freq,s_bits,s_channels,br);
   fwrite (buffer, br,1,file);
   fclose(file);
}
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

Here's a new version that will output numbered filenames if there are none inside of FSB. Also some basic error handling added, so if you give it a wrong file, it won't crash, but give you proper error message.
brendan19
Posts: 144
Joined: Fri Aug 08, 2014 11:25 am

Re: Mortal Kombat X sound format

Post by brendan19 »

Fantastic, thank you for the update :)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

You're welcome. Maybe in case of only 1 file it's better not to add that _0 ?
brendan19
Posts: 144
Joined: Fri Aug 08, 2014 11:25 am

Re: Mortal Kombat X sound format

Post by brendan19 »

Yeah probably not if there's only a single FSB.

Files that have more than one FSB in them should add the numbers like _1, _2, _3 etc at the end :)
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Mortal Kombat X sound format

Post by AlphaTwentyThree »

I encountered a file in "DeadCore" that throws an error message: http://*USE_ANOTHER_FILEHOSTING*/dd125ee ... amBank.fsb
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

probably out of memory error, because i never released any memory :)

I never expected it to be used on files that large. What is the error message?
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Mortal Kombat X sound format

Post by AlphaTwentyThree »

id-daemon2 wrote:probably out of memory error, because i never released any memory :)

I never expected it to be used on files that large. What is the error message?

Something like "Wrong parameter given"...
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

ok it was from out of memory. Fixed.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Mortal Kombat X sound format

Post by AlphaTwentyThree »

Cool thanks! :D
Wilbo22
Posts: 1
Joined: Fri Jul 03, 2015 12:36 pm

Re: Mortal Kombat X sound format

Post by Wilbo22 »

Works flawlessly on SND_*.xxx files (such as speech files). Has anybody found the characters' combat sounds yet? Like attack and hit sounds etc.?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Mortal Kombat X sound format

Post by id-daemon »

Wilbo22 wrote:Has anybody found the characters' combat sounds yet? Like attack and hit sounds etc.?


Yes, they were all extracted. Read this thread. I don't remember now where it was written.
Sparktank
Posts: 2
Joined: Sat Aug 01, 2015 4:28 am

Re: Mortal Kombat X sound format

Post by Sparktank »

id-daemon2 wrote:ok it was from out of memory. Fixed.


Thanks a lot for this tool!
I was able to use it on another game: The Forest (unity v5).
Couldn't find anything decent to properly handle FSB archives, especially where duplicate names existed (GUI's terminate early with no options).

This solved all my problems! :)
Kerem123
Posts: 27
Joined: Fri Dec 01, 2017 5:42 pm

Mortal Kombat X .XXX File

Post by Kerem123 »

I'm making a vocalization for this game. Any tool for extract and repack .xxx files?