fsbext - Take filenames from TOC

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

fsbext - Take filenames from TOC

Post by Mygoshi »

Hello. I have the game Avatar: The Last Airbender: The Burning Earth (PS2) which has FSB archives for audio but also TOC files which contain the FSB musc filenames. Unfortunately, FSBExt extracts the files without the filenames. Is there any way to take the TOC to apply filenames? Thanks in advance.
Last edited by Mygoshi on Wed Feb 17, 2021 5:56 pm, edited 1 time in total.
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: FSBExt - Take filenames from TOC

Post by Delutto »

Upload some file sample.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: FSBExt - Take filenames from TOC

Post by Mygoshi »

Sorry?
Last edited by Mygoshi on Wed Feb 17, 2021 5:56 pm, edited 2 times in total.
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: FSBExt - Take filenames from TOC

Post by Delutto »

You need be specific with what you want to do and how or everyone will just ignore this thread.
You want get FileName from TOC... OK
Are looking for a BMS statement which do that... ?!?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBExt - Take filenames from TOC

Post by aluigi »

@Mygoshi
eh??? An option for a tool based on a specific format (fsb) for taking filenames from a custom "toc" format used by a specific game?
And without samples too, oh sure :)
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: FSBExt - Take filenames from TOC

Post by Mygoshi »

Last edited by Mygoshi on Sat Mar 24, 2018 7:49 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBExt - Take filenames from TOC

Post by aluigi »

This script parses the toc file and you can redirect the output to a bat file:

Code: Select all

idstring "ctbw"
get NUM long
get NAMESZ byte
getdstring NAME NAMESZ
get FILES long
for i = 0 < FILES
    get NAMESZ byte
    getdstring NAME NAMESZ
    get DUMMY long  # 0 or 1
    get TSTAMP long
    get FREQ long
    string TMP p "move %08x.dat.ss2 %s.ss2" i NAME
    print "%TMP%"
next i
quickbms script.bms c7_level_static_wbsdvd.toc > run.bat
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: FSBExt - Take filenames from TOC

Post by Mygoshi »

Thank you very much!
Last edited by Mygoshi on Wed Feb 17, 2021 5:58 pm, edited 2 times in total.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: FSBExt - Take filenames from TOC

Post by Mygoshi »

How to adapt it for multiple files please?
Last edited by Mygoshi on Wed Feb 17, 2021 6:02 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: FSBExt - Take filenames from TOC

Post by aluigi »

I give you an example that you can personalize as you wish.

Original string:

Code: Select all

string TMP p "move %08x.dat.ss2 %s.ss2" i NAME

New string:

Code: Select all

get TOC_NAME basename
string TMP p "move %s%08x.dat.ss2 %s%s.ss2" TOC_NAME i TOC_NAME NAME
It's just text so it's easy to adapt it to your needs.