ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Aug 18, 2017 5:08 am

All times are UTC




Post new topic  Reply to topic  [ 40 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Sun Sep 14, 2014 11:29 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
http://aluigi.org/papers.htm#fsbext

Tool for extracting the files from FSB archives, used in the FMOD framework.

It supports:
FSB1, FSB2, FSB3, FSB3.1, FSB4 and FSB5

And it has been tested against a huge number of games and different FSB archives.

I have just released a new version, 0.3.3, that fixes the calculation of channels and frequency for FSB5.
Thanks to brendan19 for pointing me on this error.


Top
   
PostPosted: Fri Mar 04, 2016 12:18 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 222
When i extract this file with -m option and fsbext 0.3.4a i get 0 size output file, with fsbext 0.3.3 everethyng is fine.

http://www114.zippyshare.com/v/Phff1Tx1/file.html


Top
   
PostPosted: Sat Mar 05, 2016 1:58 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 222
Another bug:

Try to simply rebuild file below without changing sound and output .fsb file will differ from original file. In rebuilded file size on offset 0x54 is wrong - http://puu.sh/nvDSf/4bd70974ba.png

http://www86.zippyshare.com/v/RlpIsdj5/file.html


Top
   
PostPosted: Sat Mar 05, 2016 3:48 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
The problem with -m apparently it's just a bug because when mpeg_fix is disabled there are no instructions at all to dump the file.

Anyway for the mp3 files in FSB my suggestion is to use the -M option that dumps all the channels separetely which is a lot better.

The other problem may be related to the rebuilding of multichannel files, I have a note in my TODO about something similar but I don't know if it's the same.

To be honest at the moment the development of fsbext is on-hold mainly because oggs are not supported yet and rebuilding was ok in the past but currently (FSB5) it appears to be useless because the official FMOD tools should do the job.
I have also a note about a certain type32 and the calculation of the number of channels that was encoutered only once.


Top
   
PostPosted: Sun Mar 06, 2016 12:15 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 222
Quote:
The other problem may be related to the rebuilding of multichannel files, I have a note in my TODO about something similar but I don't know if it's the same.

Second file i uploaded is mono, not multichannel, so it seems to be another bug with sizes.

Hope you will fix this bugs someday, cause fsbext is wery usefull tool and it would be nice to have stable version without bugs.


Top
   
PostPosted: Sat Mar 12, 2016 6:48 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
The reason of that different byte in the rebuilt File5817.fsb is simply that fsbext automatically uses padding in the reimported files.
You can find the full details in the source code fsbext.c at line 1131.
So there is nothing to fix.


Top
   
PostPosted: Wed Jun 22, 2016 10:40 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
Do you plan on adding OggS header for fsb files that use the Vorbis format?

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Thu Jun 23, 2016 6:37 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
It will be not supported until a full working source code for "raw ogg chunks" to "ogg vorbis" or another easy solution will be provided.


Top
   
PostPosted: Thu Jul 14, 2016 1:14 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
Hey, check this out:
https://github.com/tmiasko/fsb-vorbis-extractor

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Thu Jul 14, 2016 2:01 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
Eh, I know:
viewtopic.php?p=6582#p6582


Top
   
PostPosted: Thu Jul 14, 2016 2:09 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
Oh, allrighty then...

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Thu Jul 21, 2016 10:33 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
OK, so is there any way to possess all .fsb files at once using a batch mode?

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Fri Jul 22, 2016 12:17 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
http://ss64.com/nt/forfiles.html
http://ss64.com/nt/for2.html

Or cygwin "find": find -iname "*.fsb" -exec fsbext {} ;


Top
   
PostPosted: Fri Jul 22, 2016 2:35 am 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
Huh. Thanks for pointing me that out, it'll sure save me from processing each file at a time.
One question though is how can you find the password contained inside these FSB files?

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Fri Jul 22, 2016 4:23 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
The type of encryption algorithm allows to see the clear-text password in the original zero bytes.
fsbext automatically show the first bytes of the archive if it's protected by password and you may guess some characters.
Usually I just run "fsbext -E 1 file.fsb" and then I check the generated file with a hex editor, looking moreover at the final bytes.
Then it's just a guess and try till the decryption is perfect.

You can also try guessfsb:
https://www.hcs64.com/vgm_ripping.html


Top
   
PostPosted: Fri Jul 22, 2016 4:53 am 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
Heh. I tried that with an .fsb file and nothing really changed between these two generated files.
Here's a sample.

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Fri Jul 22, 2016 5:03 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
That one is not an FSB archive and it's not encrypted.


Top
   
PostPosted: Fri Jul 22, 2016 2:09 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 949
^ Well then it's a mystery that the Speech.fsb file has a .fsb container.

_________________
Expect my username to be everywhere, whether you're using the internet or not.


Top
   
PostPosted: Fri Jul 22, 2016 4:03 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
In fact it doesn't have a FSB container.
What you have there is just a sequence of aligned Gamecube ADPCM streams with a header before each stream (for example 0x5622 is just the frequency 22050)


Top
   
PostPosted: Fri Jul 22, 2016 4:39 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6406
There were some things that reminded me of Rockstar Table Tennis, where you got this archive?

Code:
endian big
for
    savepos OFFSET
    get DUMMY1 long
    get DUMMY2 long # DUMMY6 + 1
    get FREQUENCY long
    get ZERO long
    get CHANNELS long
    get DUMMY6 long # DUMMY2 - 1
    get DUMMY7 long # 2, interleave?
    getdstring COEFF 0x20
    math SIZE = DUMMY6
    math SIZE / 2
    math SIZE + 1
    math OFFSET + 0x60
    set NAME string ""
    callfunction DUMP_GENH
    math OFFSET + SIZE
    math OFFSET x 0x800
    goto OFFSET
next

# requirements: NAME, OFFSET, SIZE, CHANNELS, FREQUENCY, COEFF
startfunction DUMP_GENH
    endian save CURRENT_ENDIAN
    endian little
    math genhsz = 0x80
    log MEMORY_FILE 0 0
    putdstring "GENH" 4 MEMORY_FILE     // 0    magic
    put CHANNELS long MEMORY_FILE       // 4    channel_count
    put 2 long MEMORY_FILE              // 8    interleave
    put FREQUENCY long MEMORY_FILE      // c    sample_rate
    put 0xffffffff long MEMORY_FILE     // 10   loop_start
    xmath loop_end "((SIZE * 14)/8)/CHANNELS"
    put loop_end long MEMORY_FILE       // 14   loop_end
    put 12 long MEMORY_FILE             // 18   codec
    xmath start_off "genhsz + (CHANNELS * 32)"
    put start_off long MEMORY_FILE      // 1c   start_offset
    xmath header_size "genhsz + (CHANNELS * 32)"
    put header_size long MEMORY_FILE    // 20   header_size
    put genhsz long MEMORY_FILE         // 24   coef[0]
    xmath TMP "genhsz + 32"
    put TMP long MEMORY_FILE            // 28   coef[1]
    put 1 long MEMORY_FILE              // 2c   dsp_interleave_type
    put 0 long MEMORY_FILE              // 30   coef_type
    put genhsz long MEMORY_FILE         // 34   coef_splitted[0]
    put TMP long MEMORY_FILE            // 38   coef_splitted[1]
    get i asize MEMORY_FILE
    for i = i < genhsz
        put 0 byte MEMORY_FILE
    next i
    math COEFF_PTR = 0
    for i = 0 < CHANNELS
        for x = 0 < 16
            getvarchr TMP COEFF COEFF_PTR short
            math COEFF_PTR + 2
            put TMP short MEMORY_FILE
        next x
        #math COEFF_PTR + 0xe    # 0x20 + 0xe = 0x2e
    next i
    append
    log MEMORY_FILE OFFSET SIZE
    append
    log NAME 0 SIZE MEMORY_FILE
    endian CURRENT_ENDIAN
endfunction


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 40 posts ]  Go to page 1 2 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited