ZenHAX

Free Game Research Forum ... Official QuickBMS support ... Twitter @zenhax ... SSL HTTPS://zenhax.com
It is currently Thu Feb 23, 2017 6:40 pm

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 14, 2015 1:31 pm 

Joined: Tue Apr 14, 2015 1:12 pm
Posts: 1
Welcome Zenhax. I tried your QuickBMS software to extract CPK files, and it succeed, but sadly, when I want to extract .pak files from PS3 game j-stars vs+ by Bandai Namco. And It failed, I've tried :

A.I.M Racing .pak script - Failed ( 0 files found in 0 seconds )
Another world .pak script - Failed ( 0 files found in 0 seconds )
Artogon Games .pak script - Failed ( ( 0 files found in 0 seconds )
Battleforge .pak script - Failed ( 0 files found in 0 seconds )
Bus Simulator .pak script - Failed ( 0 files found in 0 seconds )
Blur .pak script - Failed ( 0 files found in 0 seconds )
C4 .pak script - Failed ( 0 files found in 0 seconds )
Cakemania .pak script - Failed ( 0 files found in 0 seconds )
Citiesxl.pak script - Failed ( 0 files found in 0 seconds )

There are more pak files, but i don't feel like if anyone of them will work... So please help. There's a sample pak files below the post. Please take a look.


Attachments:
sample pak.zip [3.25 MiB]
Downloaded 73 times
Top
   
PostPosted: Tue Apr 14, 2015 9:16 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5519
Basically it's a STPK archive compressed as STPZ in chunks ($CL0) of max 0x3c00 bytes.
The only problem at the moment is the compression algorithm used for compressing these chunks because, after a scanning, the only algorithm similar to the original one is 230 (COMPRLIB_RLE3) but it's not the correct one.

The following is a work-in-progress just for study, the final uncompressed size doesn't match because the algorithm is wrong:
Code:
# WORK-IN-PROGRESS
# DO NOT USE IT

comtype COMPRLIB_RLE3

endian big
idstring "STPZ"
get DUMMY long
get CHUNKS long
get OFFSET long
idstring "$CMP"
get ZSIZE long
get ZERO long
get ZERO long
get SIZE long
get ZSIZE long
get ZERO long
get DUMMY long

putvarchr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
append
for MEM_SIZE = 0 < SIZE
    #idstring "$CL0"
    getdstring SIGN 4
    if SIGN != "$CL0"
        break
    endif
    get CHUNK_SIZE long
    get CHUNK_ZSIZE long
    get ZERO long
    savepos CHUNK_OFFSET
    math CHUNK_ZSIZE - 0x10
    clog MEMORY_FILE CHUNK_OFFSET CHUNK_ZSIZE CHUNK_SIZE
    math CHUNK_OFFSET + CHUNK_ZSIZE
    goto CHUNK_OFFSET
    get MEM_SIZE asize MEMORY_FILE
next i
append

get NAME basename
string NAME + ".stpk"
log NAME 0 MEM_SIZE MEMORY_FILE


Top
   
PostPosted: Thu Dec 22, 2016 10:48 am 

Joined: Thu Aug 07, 2014 10:28 pm
Posts: 111
Here is a compressed and decompressed file to look at for these file types.


Attachments:
character_000.npk.scz.7z [164.63 KiB]
Downloaded 34 times
character_000.7z [103.41 KiB]
Downloaded 42 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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