Mortal Kombat X sound format
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Mortal Kombat X sound format
It's something about FMOD, but i can't see any FSB header, only the FEV file. Can someone take a look and manage how to unpack mkx sounds? Not sure, but fsb's seems to be encrypted.
https://mega.co.nz/#!IsRDABjI!135retu2s ... 43NZvTPgZ4
Update. Fsb files are encrypted. The key is 996164B5FC0F402983F61F220BB51DC6 , but steel need unpacker for .xxx files, cause gildor's extractor doesn't work.
https://mega.co.nz/#!IsRDABjI!135retu2s ... 43NZvTPgZ4
Update. Fsb files are encrypted. The key is 996164B5FC0F402983F61F220BB51DC6 , but steel need unpacker for .xxx files, cause gildor's extractor doesn't work.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Mortal Kombat X sound format
Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.
And now the script
If you are interested just to the sound and music, this is the easiest way.
*EDIT* script updated
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.
And now the script
Code: Select all
get XXX_SIZE asize
findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
goto OFFSET
get SKIP long
findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
if NEXT_OFF == ""
get NEXT_OFF asize
endif
xmath SIZE "NEXT_OFF - OFFSET"
get NAME basename
string NAME p "%s_%d.fsb" NAME i
log NAME OFFSET SIZE
math OFFSET = NEXT_OFF
next i
*EDIT* script updated
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: Mortal Kombat X sound format
Thats not unique fsb file. Lets take a look at SND_MUS_DestroyedCity.xxx. First file offset is 0x00004d21 and size is 0x01302f40. Second file offset is 0x01307c61 and size is 0x001ae3c0. There is TOC with offsets and sizes at the beginning (for first file it starts from 0x00002f50), but i'm not much familiar with unreal packages, so i don't know how to get number of files and universal way to get the start of the TOC.
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: Mortal Kombat X sound format
Also i have a problem with extracted ima adpcm files. With -A or without it i can't get playable sounds. And not even can decode it to PCM with ffmpeg.
http://puu.sh/heKc4/5020d388e5.png
http://puu.sh/heKdF/1ae81aef6c.png
Here is the first fsb from SND_MUS_DestroyedCity.xxx and files extracted with fsbext using -A option.
https://mega.co.nz/#!ow5xTAgR!_Djys9dut ... qHExCnJsks
Upd.
Voices are in fsb ogg format. Aluigi, we need new version of fsbext with ogg support, please. More and more games starts to use it.
http://puu.sh/heKc4/5020d388e5.png
http://puu.sh/heKdF/1ae81aef6c.png
Here is the first fsb from SND_MUS_DestroyedCity.xxx and files extracted with fsbext using -A option.
https://mega.co.nz/#!ow5xTAgR!_Djys9dut ... qHExCnJsks
Upd.
Voices are in fsb ogg format. Aluigi, we need new version of fsbext with ogg support, please. More and more games starts to use it.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Mortal Kombat X sound format
For the ogg files there are some solutions to explore:
- rebuilding the raw data of the fsb file in a normal ogg file
- playing the raw data with fmod (don't know if it's possible with the extracted data)
- creating a decoder
It's not even necessary to have this embedded in fsbext, anyone can try to make something that works on the data dumped by fsbext.
I was looking for the first solution but it's more difficult then what it seems.
Any idea is welcome.
Regarding the ima adpcm files I have no solution.
They should be multichannel but even with xbadpdec (the Xbox and IMA adpcm are similar) the output file given to Audacity is not ok.
I have updated the script in the previous post to extract all the FSB archives inside the XXX archives.
- rebuilding the raw data of the fsb file in a normal ogg file
- playing the raw data with fmod (don't know if it's possible with the extracted data)
- creating a decoder
It's not even necessary to have this embedded in fsbext, anyone can try to make something that works on the data dumped by fsbext.
I was looking for the first solution but it's more difficult then what it seems.
Any idea is welcome.
Regarding the ima adpcm files I have no solution.
They should be multichannel but even with xbadpdec (the Xbox and IMA adpcm are similar) the output file given to Audacity is not ok.
I have updated the script in the previous post to extract all the FSB archives inside the XXX archives.
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: Mortal Kombat X sound format
Fmod can't play extracted raw data, it can play only fsb files with its API, but don't know how to extract them.
As about decoder i don't know nothing about oggs. For example in wav files you can simply add header and change freq,channels, etc that your fsbext shows. It shows this info for oggs as well, but i dont know how to recreate ogg header.
As about ideas, is it possible to make a kind of fsb splitter? For example fsb contains 200 files inside, so if you recreate 200 fsbs with only one file inside its possible to use method i described here.
As about decoder i don't know nothing about oggs. For example in wav files you can simply add header and change freq,channels, etc that your fsbext shows. It shows this info for oggs as well, but i dont know how to recreate ogg header.
As about ideas, is it possible to make a kind of fsb splitter? For example fsb contains 200 files inside, so if you recreate 200 fsbs with only one file inside its possible to use method i described here.
-
- Posts: 157
- Joined: Sun Aug 24, 2014 8:54 am
Re: Mortal Kombat X sound format
aluigi wrote:Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.
And now the scriptIf you are interested just to the sound and music, this is the easiest way.Code: Select all
get XXX_SIZE asize
findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
goto OFFSET
get SKIP long
findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
if NEXT_OFF == ""
get NEXT_OFF asize
endif
xmath SIZE "NEXT_OFF - OFFSET"
get NAME basename
string NAME p "%s_%d.fsb" NAME i
log NAME OFFSET SIZE
math OFFSET = NEXT_OFF
next i
*EDIT* script updated
hi~~aluigi~Can the script support fev file extract?
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: Mortal Kombat X sound format
Its only for fsb files. Btw, why do you need fev files? Normally they are useless.
-
- Posts: 157
- Joined: Sun Aug 24, 2014 8:54 am
Re: Mortal Kombat X sound format
FMOD event player support fev file play fsb file
-
- Posts: 157
- Joined: Sun Aug 24, 2014 8:54 am
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: Mortal Kombat X sound format
You can extract it using ravioli game tools.
Well, it plays files, but can't extract them , so we steel need an extractor.
Well, it plays files, but can't extract them , so we steel need an extractor.
-
- Posts: 1040
- Joined: Sun Mar 22, 2015 7:09 pm
Re: Mortal Kombat X sound format
It was relatively easy to unpack the sounds with fmod using their provided API. Working on the tool now.
-
- Posts: 1040
- Joined: Sun Mar 22, 2015 7:09 pm
Re: Mortal Kombat X sound format
Here you go, a universal FSB extractor for any formats. Needs fmodL.dll from the official fmod package. No error handling, no interface, because I'm lazy. Just give it the .fsb name and it will put all the sounds contained in .WAV format into the same folder.
p.s. tool updated. Please also note that you need the latest fmodL.dll, because it will not work with old versions.
p.s. tool updated. Please also note that you need the latest fmodL.dll, because it will not work with old versions.
-
- Posts: 1040
- Joined: Sun Mar 22, 2015 7:09 pm
Re: Mortal Kombat X sound format
A little mistake found in wav header (data length calculated twice longer). Updated.
-
- Posts: 1040
- Joined: Sun Mar 22, 2015 7:09 pm
Re: Mortal Kombat X sound format
ahem, things got complicated now.
It seems there are 2 kinds of FSB banks in MKX:
1 - big files connected to the end of a package (these can be split with luigi's script)
2 - small files INSIDE of a package
If someone want to get files from there, one needs to unpack .xxx package. It will give many "fmodsourcedata" files, half of them encrypted, half not. He must somehow cut the first 32 bytes of them, decrypt the decrypted ones, and after that, extract FSB with my tool, but it somehow works a little wrong with these small files - some of them are a little cut in the end. I don't know how to fix this yet.
It seems there are 2 kinds of FSB banks in MKX:
1 - big files connected to the end of a package (these can be split with luigi's script)
2 - small files INSIDE of a package
If someone want to get files from there, one needs to unpack .xxx package. It will give many "fmodsourcedata" files, half of them encrypted, half not. He must somehow cut the first 32 bytes of them, decrypt the decrypted ones, and after that, extract FSB with my tool, but it somehow works a little wrong with these small files - some of them are a little cut in the end. I don't know how to fix this yet.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Mortal Kombat X sound format
Maybe the size is aligned?
Or there is a wrong usage of the offset and size, maybe the offset is 32 bytes lower than the real one?
Just trying to give you some possible ideas, I have not checked the files.
Or there is a wrong usage of the offset and size, maybe the offset is 32 bytes lower than the real one?
Just trying to give you some possible ideas, I have not checked the files.
-
- Posts: 1040
- Joined: Sun Mar 22, 2015 7:09 pm
Re: Mortal Kombat X sound format
aluigi wrote:Maybe the size is aligned?
No, these 32 bytes are added by the engine. This is just an information for those who want to extract them.
-
- Posts: 27
- Joined: Tue Apr 21, 2015 2:15 pm
Re: Mortal Kombat X sound format
aluigi wrote:Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.
And now the scriptIf you are interested just to the sound and music, this is the easiest way.Code: Select all
get XXX_SIZE asize
findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
goto OFFSET
get SKIP long
findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
if NEXT_OFF == ""
get NEXT_OFF asize
endif
xmath SIZE "NEXT_OFF - OFFSET"
get NAME basename
string NAME p "%s_%d.fsb" NAME i
log NAME OFFSET SIZE
math OFFSET = NEXT_OFF
next i
*EDIT* script updated
does quick BMS able to decrypt/encrypt fsb?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Mortal Kombat X sound format
No because the algorithm is specific only for the fsb archive and so not worth to be implemented in quickbms.
fsbext is the only to support this encryption and there is even a command-line option to decrypt the archives without extracting them.
fsbext is the only to support this encryption and there is even a command-line option to decrypt the archives without extracting them.
-
- Posts: 27
- Joined: Tue Apr 21, 2015 2:15 pm
Re: Mortal Kombat X sound format
happyend wrote:Can the script support fev file extract?
Extraction of fmod files (.fev and .fsb)
from decompresed MKX packages(SND_.XXX)
Put your SND_ files in "input" folder
Run "extract_SND.bat"
In "FMOD" folder you will find decrypted fev's and fsb's