I'm curious about how to use the vgmtoolbox.

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
fkcpt456
Posts: 5
Joined: Sat Feb 22, 2020 3:36 pm

I'm curious about how to use the vgmtoolbox.

Post by fkcpt456 »

samurai warriors xtreme legends Linkdata.cns file.

http://naver.me/xwDoVAai

I would like to know how to use 'vgmtoolbox' to extract the SShd/SSbd file.
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: I'm curious about how to use the vgmtoolbox.

Post by BloodRaynare »

From my experience of modding Omega Force's PS2 Warriors games, They never used that format for the ingame BGM, well unless you only wanted the audio track of the FMV cutscenes, which indeed was inside that CNS archive, while the ingame BGM is on the ANS archive file IIRC.

Anyway, as for using VGMToolbox to extract the *NS archive, you can use the "Virtual File System Extractor" section to extract the contents of the archive. The archive file spec goes like this (I'll try make it simple as possible):

Code: Select all

0x00: Archive ID? (4 bytes) 
0x04: File counts (4 bytes)
0x08: Offset multipliers (4 bytes)
0x0c: Unknown (Always zero?) (4 bytes)
File records starts at offset 0x10
For the N of each records:
0x00 - Offset the files (Must be multiplied using the multipliers values from before) (4 bytes)
0x04 - Sizes of the file (4 bytes)


Use the spec info above to fill the necessary field for the extraction.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: I'm curious about how to use the vgmtoolbox.

Post by aluigi »

I didn't check the file, just wrote a script for quickbms based on BloodRaynare's info:

Code: Select all

get ARCHIVE_ID long
get FILES long
get MUL long
get ZERO long
for i = 0 < FILES
    get OFFSET long
    math OFFSET * MUL
    get SIZE long
    log "" OFFSET SIZE
next i
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: I'm curious about how to use the vgmtoolbox.

Post by BloodRaynare »

Umm, so I checked this game just for curiosity, and turns out the header info was hardcoded in the executable, so the archive files contains nothing but sequenced files. And by quick glance in ps2dis, looks like the file spec is different too. However, unless OP provided the SLPM/SLPS/SLUS/SLES files too, nothing can be done.
Still, assuming that this thread is about SW1 and it's variants. SW2 did actually contains header info on every *NS archives.