Page 1 of 1

Sol Trigger for PSP, *.TPK files

Posted: Sat Oct 13, 2012 11:40 pm
by Forte
I'm actually not especially interested in the game, but I did do some digging because I was curious and thought I'd at least have it documented somewhere.

Folder structure is visible in the user folder.
Most TPK files (at least the ones that start with ZZZ0) are compressed with zlib.
First word contains the magic number ZZZ0, the second word is the size of the decompressed file and the third word seems to be always 4. You can use normal zlib inflation from byte 0xC onward to decompress the file.

I haven't played too much with recompression levels, but level 1 seems to work fine.

Text files (in the, well, TEXT folder) are encoded in UTF-8 and are seemingly structured by having a line ID (4 bytes) and the corresponding offset in the file.

Sadly (for potential translations), the font is monospaced and looks pretty unpleasing:
http://imgur.com/NgC0D

Re: Sol Trigger for PSP, *.TPK files

Posted: Fri Feb 01, 2013 3:46 pm
by Romored
Hello there! I'll bump this topic as the subject is very similar.

I found this kind of files in another PSP game: Criminal Girls. Same "ZZZ0" header and same structure. I tried to find an utility to extract their content but I couldn't find absolutely anything. The only thing I know is what Forte said up here, that zlib can be used. The problem is that I've no idea how to do it. I have little experience in file manipulation and C++ programming in general, I don't think I could create an application from scratch. Can someone please help me? I think it could be useful for many people, as the format seems rather standard for most of the latest PSP games.

One of the files I wanted to extract is this one. It should contain sprites and/or textures.

http://www.mediafire.com/?faiqqy18qc8zrfk

Almost all the files of that game are .tpk.

Re: Sol Trigger for PSP, *.TPK files

Posted: Mon Apr 22, 2013 11:49 am
by Dazz
//tpk extraction bms script

idstring "ZZZ0"
get size long
get null long
savepos offset
get zsize asize
math zsize -= offset
get name basename
string name += .UTK
comtype zlib
clog name offset zsize size


This is about as much as I think I can do; I can't for the life of me figure out the palettes for the files that come out of these though. This worked for Criminal Girls, not tried with the others.

Re: Sol Trigger for PSP, *.TPK files

Posted: Sun Aug 13, 2017 4:55 pm
by sprayer
any news?