Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Mortal Kombat X sound format

Featured Replies

  • Replies 77
  • Views 1
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

spider91, posted Tue Apr 14, 2015 8:59 pm (4522)


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.
  • Author
  • Localization

aluigi, posted Wed Apr 15, 2015 4:57 am (4525)


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 :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET     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
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated
  • Author
  • Localization

spider91, posted Wed Apr 15, 2015 12:14 pm (4531)


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.
  • Author
  • Localization

spider91, posted Wed Apr 15, 2015 12:19 pm (4532)


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.
  • Author
  • Localization

aluigi, posted Wed Apr 15, 2015 8:43 pm (4537)


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.
  • Author
  • Localization

spider91, posted Wed Apr 15, 2015 9:02 pm (4538)


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.
  • Author
  • Localization

happyend, posted Thu Apr 16, 2015 1:36 am (4545)


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 script :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET     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
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated


hi~~aluigi~Can the script support fev file extract?
  • Author
  • Localization

spider91, posted Thu Apr 16, 2015 1:47 am (4546)


Its only for fsb files. Btw, why do you need fev files? Normally they are useless.
  • Author
  • Localization

happyend, posted Thu Apr 16, 2015 2:08 am (4547)


FMOD event player support fev file play fsb file
  • Author
  • Localization

spider91, posted Thu Apr 16, 2015 3:18 am (4549)


You can extract it using ravioli game tools.

Well, it plays files, but can't extract them :|, so we steel need an extractor.
  • Author
  • Localization

id-daemon, posted Thu Apr 16, 2015 9:58 am (4564)


It was relatively easy to unpack the sounds with fmod using their provided API. Working on the tool now.
  • Author
  • Localization

id-daemon, posted Thu Apr 16, 2015 12:08 pm (4569)


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.
  • Author
  • Localization

id-daemon, posted Sat Apr 18, 2015 7:44 am (4606)


A little mistake found in wav header (data length calculated twice longer). Updated.
  • Author
  • Localization

id-daemon, posted Tue Apr 21, 2015 8:26 pm (4722)


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.
  • Author
  • Localization

aluigi, posted Tue Apr 21, 2015 8:48 pm (4725)


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.
  • Author
  • Localization

id-daemon, posted Tue Apr 21, 2015 9:30 pm (4726)


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.
  • Author
  • Localization

n97t7f7b57f, posted Sun Apr 26, 2015 9:05 am (4811)


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 script :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET     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
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated

does quick BMS able to decrypt/encrypt fsb?
  • Author
  • Localization

aluigi, posted Sun Apr 26, 2015 1:10 pm (4812)


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.
  • Author
  • Localization

n97t7f7b57f, posted Sun Apr 26, 2015 10:05 pm (4827)


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

MKX_FMOD_Extractor.zip

  • Author
  • Localization

n97t7f7b57f, posted Sun Apr 26, 2015 10:27 pm (4829)


about SND_*.XXX structure

there are 2(?) types of sound packages:
1. Type 1 - encrypted fsb data stored separately from FSBsize and FSBoffset
XXX header offset 0x65 is offset of FSB1data
Code:
[nametable]
[FEVsize][FEVoffset][FEVdata]
[FSB1size][FSB1offset]
[FSB2size][FSB2offset]
[FSB3size][FSB3offset]
[FSB4size][FSB4offset]
...
[FSB1data]
[FSB2data]
[FSB3data]
[FSB4data]


2. Type 2 - encrypted fsb data stored normaly.
XXX header offset 0x65 is Null
Code:
[nametable]
[FEVsize][FEVoffset][FEVdata]
[FSB1size][FSB1offset][FSB1data]
[FSB2size][FSB2offset][FSB2data]
[FSB3size][FSB3offset][FSB3data]
[FSB4size][FSB4offset][FSB4data]


static location of nametable offset is unknown for me,
so i use some durty code to find it.
SND_uni.bms -
Code:
...
findloc offset string "default"
math offset = 172
...

dont work with SND_MUS_TrainingRoom.xxx and all
foreign language files (i.e. SND_SPEECH_MILEENA_ESP.xxx, SND_SPEECH_SCORPION_GER.xxx etc)

SND_foreign.bms -
Code:
...
findloc SND_ string "SND_"
math SND_ -= 4
goto SND_
get FNsize long
getdstring FNAME FNsize
string FNAME - 4
string FNAME ".fev"
findloc offset string FNAME
...

dont work with SND_MUS_TrainingRoom.xxx and other default(ENG) language
  • Author
  • Localization

happyend, posted Mon Apr 27, 2015 12:01 am (4830)


n97t7f7b57f wrote:
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


GJ~~THX!!!
  • Author
  • Localization

id-daemon, posted Mon Apr 27, 2015 3:12 pm (4852)


n97t7f7b57f wrote:
about SND_*.XXX structure

1. Type 1 - encrypted fsb data stored separately from FSBsize and FSBoffset
2. Type 2 - encrypted fsb data stored normaly.


What about unencrypted fsb data? Why didn't you find it?
  • Author
  • Localization

n97t7f7b57f, posted Mon Apr 27, 2015 3:26 pm (4853)


id-daemon2 wrote:
What about unencrypted fsb data? Why didn't you find it?

I'm talking about SND_ packages.
There is no unencrypted fsb data.
am i wrong?

CHAR_ packages contain encrypted AND unencrypted fmod files...

But first task for us now is to find an accurate way to nametable offset
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.