PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
pgw00k
Posts: 22
Joined: Sat Jun 20, 2015 3:38 pm

PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by pgw00k »

Hi,all,i get some files from the game package,but i can't get the real format,so i hope someone can give me some help.
1.First type files are like 0302_UnPack,i think it may be some texture files but i can't sure.They have the head strings PPHD8.

2.And second type files are like 0D02_Pack,i think it may be a compress files,they all have the 00 05 on start.And it have many 38 70 symbols.

There are some simple files.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by aluigi »

The unpack files seem to contain VAG data from about offset 0x400
pgw00k
Posts: 22
Joined: Sat Jun 20, 2015 3:38 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by pgw00k »

aluigi wrote:The unpack files seem to contain VAG data from about offset 0x400

thank you aluigi!It seem to be true,but I also can't do anything about the pphd8 files,would you have some ideas?They should be textures but i can find the size or other useful thing.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by aluigi »

In the files you provided I see only VAG data.
There 4 chunk types at the beginning PPHD, PPPG, PPTN, PPVA that may contain some information about the vag files in the archive.
But I see absolutely nothing about textures.

Try this script:

Code: Select all

goto 0x28
get BASE_OFF long
math BASE_OFF + 0x20
for OFFSET = 0x38 < BASE_OFF
    goto OFFSET
    getdstring TYPE 4
    get SIZE long
    savepos OFFSET
    if TYPE == "PPVA"
        getdstring DUMMY 0x18
        xmath FILES "(SIZE - 0x18) / 0x10"
        for i = 0 < FILES
            get OFFSET long
            get XSIZE long
            get SIZE long
            get DUMMY long
            math OFFSET + BASE_OFF
            log "" OFFSET SIZE
        next i
    else
        log TYPE OFFSET SIZE
    endif
    math OFFSET + SIZE
next
pgw00k
Posts: 22
Joined: Sat Jun 20, 2015 3:38 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by pgw00k »

aluigi wrote:The unpack files seem to contain VAG data from about offset 0x400

Thanks your help.
i use the script but it can't get a right VAG file which can play,it doesn't matter ,i care about the textures more.
This is the whole packhttps://yadi.sk/d/LST9MftJhiARs,
and this can unpack it (forgive me poor bms language)

Code: Select all

for OFFSET = 0x10 < 0x6b00
    goto OFFSET   
    get BASE_OFF long
    get XSIZE long
    get FILES short
    get Z short
    get SIZE long
    math BASE_OFF * 0x800
    goto BASE_OFF
    log BASE_OFF BASE_OFF XSIZE
    math OFFSET + 0x10
next


i guess the FILES is the number of compression contain,and the Z is show it whether compress because it only have 1 or 0.
and the BOOT.BIN have some C code (looks like),and some file name?may be you could find something in it.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by aluigi »

It's more complex than what it looks.
The following is the corrected script (same extracted files so it's not a real correction), I guess that the compressed files are splitted in chunks of 0x4000 bytes.

Code: Select all

goto 0x10
for
    get OFFSET long
    if OFFSET == 0
        break
    endif
    get ZSIZE long
    get CHUNKS short
    get ZIP short
    get SIZE long
    math OFFSET * 0x800
    if ZIP == 0
        log "" OFFSET SIZE
    else
        # unsupported, must handle chunks too
        log "" OFFSET ZSIZE
    endif
next

I don't know what is the compression.
pgw00k
Posts: 22
Joined: Sat Jun 20, 2015 3:38 pm

Re: PSP Game Bleach Soul Catnival2 cfc.dig unpack help

Post by pgw00k »

aluigi wrote:I don't know what is the compression.

Thank you aluigi,i will try some others way about it,thank for your help again!!