Final Fantasy X/X-2 .vbf Switch

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
masagrator
Posts: 82
Joined: Sat Dec 22, 2018 10:03 am

Final Fantasy X/X-2 .vbf Switch

Post by masagrator »

No tool and quickbms script could unpack this.

I don't know if configs are necessary, but they have file structure inside, so I uploaded it just in case.
Header is SRYK like in PC.

So in archive are:
first and last 16 MiB of FFX_Data.vbf
FFX_sharedconfig.ini
first and last 16 MiB of FFX2_Data.vbf
FFX2_sharedconfig.ini

https://drive.google.com/file/d/1COMT1G ... sp=sharing

BMS script probably reads SIZE wrong as it crashes at

Code: Select all

log MEMORY_FILE2 TMP SIZE


with error

Code: Select all

- error in src\extra\xalloc.c line 618: xdbg_malloc()

Error: memory allocation problem
*Not enough space to execute this* (it was in Polish, so I have translated this)


Even if SIZE is small enough, next is an issue with OFFSET.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Final Fantasy X/X-2 .vbf Switch

Post by aluigi »

What script are you using?

There is no TOC (table with file information) which makes me think it's encrypted.

All the files can be extracted with offzip since they are zlib compressed:

Code: Select all

offzip -a -Q FFX_Data_End.vbf output_folder
masagrator
Posts: 82
Joined: Sat Dec 22, 2018 10:03 am

Re: Final Fantasy X/X-2 .vbf Switch

Post by masagrator »

offzip can extract, but only as chunks.

File has some issues comparing to PC.
f.e. it has doubled hash. After adding next hash it extracted four files and shows offset error.

I'm using ffxhd.bms
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Final Fantasy X/X-2 .vbf Switch

Post by aluigi »

Oh, I didn't notice the chunks.
Add the -c option:

Code: Select all

offzip -a -Q -c 0x10000 FFX_Data_End.vbf OUTPUT_FOLDER
masagrator
Posts: 82
Joined: Sat Dec 22, 2018 10:03 am

Re: Final Fantasy X/X-2 .vbf Switch

Post by masagrator »

Now better, but it loses where files ends. For example one cpp file extracted correctly, but next one has 10 MB, when most of file is something binary.

@ffgriever made a tool. More here:
https://gbatemp.net/threads/final-fanta ... er.535721/
Mysticus
Posts: 182
Joined: Sat Mar 02, 2019 3:24 pm

Re: Final Fantasy X/X-2 .vbf Switch

Post by Mysticus »

@ffgriever
Does this tool works for the PC version too?

EDIT: I tried to extract the .vbf files from the PC version of this game but it doesn't work.
swuforce
Posts: 233
Joined: Thu Oct 16, 2014 4:39 pm

Re: Final Fantasy X/X-2 .vbf Switch

Post by swuforce »