ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Nov 28, 2020 4:34 pm

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: GTA 1 PSX - *.vsr
PostPosted: Thu Nov 05, 2020 8:36 pm 

Joined: Tue Feb 05, 2019 6:01 am
Posts: 6
Hi there, i wrote my first bms script whohou :D but files after unpack is compress or crypted, pls help.
I try localization this game

Code:
IDstring 3RSV
get FILESIZE long
goto 0x00000B0

for i = 0
get OFFSET long
get SIZE long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
log "" OFFSET SIZE
next i


files: https://filebin.net/kobwodyxfdkgwp33

tnx tnx


Top
   
 Post subject: Re: GTA 1 PSX - *.vsr
PostPosted: Mon Nov 16, 2020 6:14 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11831
There is no download starting at that link.


Top
   
 Post subject: Re: GTA 1 PSX - *.vsr
PostPosted: Thu Nov 19, 2020 11:53 pm 

Joined: Tue Feb 05, 2019 6:01 am
Posts: 6
Hi aluigi :) here are the files. This is slus version and new script in archive.
https://drive.google.com/file/d/11XObi9 ... sp=sharing
you are the best :)


Top
   
 Post subject: Re: GTA 1 PSX - *.vsr
PostPosted: Wed Nov 25, 2020 7:13 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11831
It's a chunked format (like RIFF) and the "DATA" chunk has various "BIN " sub-chunks containing pointers to information, but I don't understand if it's encrypted because doesn't have any sense.


Top
   
 Post subject: Re: GTA 1 PSX - *.vsr
PostPosted: Thu Nov 26, 2020 5:34 am 

Joined: Tue Feb 05, 2019 6:01 am
Posts: 6
thank you for the advice, obviously it will not work without documentation :)


Top
   
 Post subject: Re: GTA 1 PSX - *.vsr
PostPosted: Fri Nov 27, 2020 7:59 pm 

Joined: Fri Nov 27, 2020 7:19 pm
Posts: 1
In short:
probably Huffman coding
https://en.wikipedia.org/wiki/Huffman_coding


If you extract files by your script from 0x000038 than each file with 0 size is directory.
Third dir (0000000f) is named "HUFF_TABLES" (filenames are in MISSION.VSR)
That could be Huffman coding (kind of compression).
Huffman coding compress based on characters counts, usually saved as "char" and its "count".
Files in that folders looks like it stores 2B "character" a 2B "usage count".
Probably then used on matching files with same name (first in this dir for first on others dir).

Guessed file formats:
Code:
BIN HUFF_TABLES FORMAT (total guess):
-------------------------------------

4B  " NIB"
4B  filesize
4B  data size
??? elements
2B  ??? character
2B  ??? count


Code:
VSR format:
-----------

4B  3RSV
4B  data size of block BLOCKSIZE (FILESIZE = BLOCKSIZE + 8B)
4B  data size of dirs/files block CRID
4B  data size of block NRSV
4B  data size of strings block TRTS
4B  data size of data block ATAD
4B  number of files+dirs
4B  number of file names
4B  ??? zeros
4B  offset block SFFO
4B  data size of offset block SFFO

+ data size of offset block SFFO
4B  CRID
4B  data size of dirs/files block CRID

Element of this block 40B:
4B  ??? either first top dir have here 0x1, or it do not belong to element data and at end is not padding/mark 4B
4B  data start offset (0 for dir)
4B  data size
2B  id for this folder (?unique to folder?), ?name of this file/dir, ?equals to string from strings block?
2B  id for all files (?unique to all files/folders?)
2B  file or dir mark (0x16 = dir, 0xE = file)
2B  ??? 0xCCCC
4B  ??? 0xFFFFFFFF
4B  ??? 0x0
4B  number of files/dirs in this dir
4B  ??? 0x0
4B  ??? 0x0

4B  ??? either padding/end mark of block or last part of element (then first 4B is not part of element)

+ size of dirs/files block CRID
4B  NRSV
4B  data size of block NRSV

??? 4B 0x0

+data size of block NRSV
4B  TRTS
4B  data size of strings block TRTS
4B  elements count STR_ECOUNT
STR_ECOUNT * 4B  offsets to strings (from start of data of this block)
XB strings - files/dirs names, ends with 0x00 char

+ data size of strings block TRTS
4B  ATAD
4B  data size of data block ATAD
XB  files data


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

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