[Vita] AIR [Prototype Ltd. pak files?]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
zander1995
Posts: 20
Joined: Tue Oct 11, 2016 7:26 am

[Vita] AIR [Prototype Ltd. pak files?]

Post by zander1995 »

I've been messing around with a recent PSVita game from Prototype but despite my best efforts, I've been unable to figure out how to unpack their .pak archives.

Each .PAK file comes with an included .TBL file, which I'm pretty sure includes some if not all of the needed information about the file sizes and locations in the relevant .PAK file. Problem is, I'm not able to figure out how to actually extract the .PAK files (let alone attempt to repack them.)

Here's the headers for one pair of files.

psvsys.tbl
Image

psvsys.pkg
Image

Download for two pairs of files.
http://www.mediafire.com/file/7cu8t12zr ... G00940.rar

Includes:
1. psvscr.tbl/pak (Game scripts)
2. psvsys.tbl/pak (System files)

PCSG00940
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by aluigi »

I suspect that tbl uses some sort of (unknown) compression, no idea.
zander1995
Posts: 20
Joined: Tue Oct 11, 2016 7:26 am

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by zander1995 »

Thanks for looking anyway.
RikuKH3
Posts: 5
Joined: Mon Sep 04, 2017 8:42 am

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by RikuKH3 »

I made unpacker for this type of archives:
https://github.com/RikuKH3/prot_tblpak/releases
Tested with a few Vita, PS3 and Android games, works fine.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by aluigi »

@RikuKH3
Am I wrong or that complicated code is nothing else than a sequential reading of bitfields?
0x1c, 4, 0x14 and 0x19
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by aluigi »

RikuKH3
Posts: 5
Joined: Mon Sep 04, 2017 8:42 am

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by RikuKH3 »

.
I got lazy and just used PowerPC instructions I had left from initial reversing. It's ugly but doesn't really affect any performance.

Also entries in TBL are sorted by ID and you don't want to extract files in this order. It's not just a matter of consequent reading and random seeking. For example: when extracting pak with voices in it you'll get a horrible mess... actors lines will be scattered all over the place and practically will be useless (comparing to sorting by offset inside pak, this way all voice files will be in the same order as they appear during gameplay). Same with scenario, scripts, etc. It makes sense since devs used dir structure with filenames during packing.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by aluigi »

Thanks for the tip, added offset sorting to the new version of the script
Shadow_Galecross
Posts: 9
Joined: Fri Sep 06, 2019 8:58 am

Re: [Vita] AIR [Prototype Ltd. pak files?]

Post by Shadow_Galecross »

I´m very sorry for the necroposting , but I´m trying to translate Rewrite for ps vita. Maybe you know if vn script is inside this ".dat" files?