Page 1 of 2
Corpse Party PSP image.bin file
Posted: Tue Nov 29, 2011 3:18 am
by Toren
First off, I'm sorry if this is completely simple and I should feel bad for asking this, but I was curious if anyone knew how to extract the contents of the image.bin file from Corpse Party on the PSP. I have the English version, but I assume the Japanese one would be virtually the same.
I opened up the file with a hex editor and here is the beginning. It seems that it lists all the files it contains in plain text, but I'm not sure if that makes any difference. So, if anyone can help with this file, it would be greatly appreciated. Thank you.

Re: Corpse Party PSP image.bin file
Posted: Tue Nov 29, 2011 9:36 pm
by cozy
im just looking aswell,i know theres 8091 Files .vag files,2 pmfs,some .at3...........hope theres a tool to extract and rebuild
you can extract these files using this tool
viewtopic.php?f=13&t=6572

Re: Corpse Party PSP image.bin file
Posted: Tue Nov 29, 2011 10:57 pm
by Toren
Yes, this works well. Thanks. However, it looks like there are many more .gim files in the file than it extracted. There are also .bmp.ata and .dat files. Is there a way to get at those as well?
Re: Corpse Party PSP image.bin file
Posted: Tue Nov 29, 2011 11:05 pm
by 0xFAIL
Please upload the first 10 MB of the file (use the filecutter (
http://www.xentax.com/downloads/tools/filecutter.zip) or pretty much any hex editor)
It seems fairly simple. (if the data itself isn't compressed)
Re: Corpse Party PSP image.bin file
Posted: Wed Nov 30, 2011 12:00 am
by Toren
The contents of this post was deleted because of possible forum rules violation.
Re: Corpse Party PSP image.bin file
Posted: Wed Nov 30, 2011 11:12 am
by 0xFAIL
A LZSS compression is used (don't know if they use a standard implementation (will look at it in the evening))
Will post all I have found tomorrow.
Re: Corpse Party PSP image.bin file
Posted: Thu Dec 01, 2011 12:19 am
by 0xFAIL
How big is the file? (in bytes)
Is there a smaller one of the same filetype (the first 4 bytes are PACK) that you can upload completly? (don't bother if your connection is slow or the file is bigger than around 20 MB)
What I have found so far:
PSP -> LITTLE ENDIAN
HEADER (12 bytes)
4 bytes, string 'PACK'
4 bytes nOfEntries
4 bytes maybe filesize?
METADATA (144 bytes)
16 bytes stuff
128 bytes path + filename
DATA
See metadata for info
Compression used:
LZSS
Metadata entries: 1551888 bytes / 144 = 0x2A19 matches nOfEntries
First file starts at 0x17 b0 00 / 2048 (see below) = 0x2f6
Has a compressed length of probably 4586 = 11EA or 4588 = 11EC
Blocksize: 2048 bytes (offset should be a multiple of this)
LZSS:
0xFF = keep the next 8 bytes intact
Re: Corpse Party PSP image.bin file
Posted: Thu Dec 01, 2011 1:08 am
by Toren
Thank you for looking at the file. The file is 665,439,151 bytes, and there are no other files with the same file type. The game itself is about 742 MB, so the majority of the game's data is contained in this 634 MB file.
Re: Corpse Party PSP image.bin file
Posted: Thu Dec 01, 2011 12:20 pm
by brainfog
Hi there. I'm noobish to quickbms and stuff, but this game intrigued me, so I made a bms script while ago. It's really lame, but seems working. At least it should give you a hint
Code: Select all
endian little
comtype lzss "12 4 2 0 0"
goto 0x00000004
get FCOUNT long
goto 0x00000014
for i = 0 < FCOUNT
savepos CPOS
get OFFSET long
get SIZE long
get NAME string
goto OFFSET
getdstring IDSTR 4
if IDSTR == "LZSS"
get FSIZE long
math OFFSET += 8
math SIZE -= 8
clog NAME OFFSET SIZE FSIZE
else
log NAME OFFSET SIZE
endif
math CPOS += 144
goto CPOS
next i
Re: Corpse Party PSP image.bin file
Posted: Thu Dec 01, 2011 5:33 pm
by cozy
@ Brainfog seems to extract ok,but when i use qbm to repack some of the files are bigger than the original...so it wont repack

at least we are getting some where..
thanx

Re: Corpse Party PSP image.bin file
Posted: Fri Dec 02, 2011 7:08 am
by brainfog
The contents of this post was deleted because of possible forum rules violation.
Re: Corpse Party PSP image.bin file
Posted: Fri Dec 02, 2011 8:26 pm
by SkyBladeCloud
Decompression algorithm by me:
Code: Select all
private static void Decode()
{
int i, j, k, r, c, flags;
for (i = 0; i < N - F; i++) text_buf[i] = 0x00;
r = N - F; flags = 0;
for (; ; )
{
if (((flags >>= 1) & 256) == 0)
{
if (infile.Position == infile.Length) break;
c = infile.ReadByte();
flags = c | 0xff00;
}
if ((flags & 1) != 0)
{
if (infile.Position == infile.Length) break;
c = infile.ReadByte();
outfile.WriteByte((byte)(c)); text_buf[r++] = (byte)(c); r &= (N - 1);
}
else
{
if (infile.Position == infile.Length) break;
i = infile.ReadByte();
if (infile.Position == infile.Length) break;
j = infile.ReadByte();
i |= ((j & 0xf0) << 4); j = (j & 0x0f) + THRESHOLD;
i -= 2;
for (k = 0; k <= j; k++)
{
c = text_buf[(i + k) & (N - 1)];
outfile.WriteByte((byte)(c)); text_buf[r++] = (byte)(c); r &= (N - 1);
}
}
}
}
Kepp in mid that this is only for the raw data chunk (offset 0x08 on).
Regards:
~Sky
PD: Also, I have built a tool for both unpacking and repacking, it just needs to be buffered a little up!
EDIT: Recompression seems to work OK too.
Re: Corpse Party PSP image.bin file
Posted: Sat Dec 03, 2011 9:12 am
by cozy
Re: Corpse Party PSP image.bin file
Posted: Sat Dec 03, 2011 11:20 am
by brainfog
SkyBladeCloud wrote:PD: Also, I have built a tool for both unpacking and repacking, it just needs to be buffered a little up!
EDIT: Recompression seems to work OK too.
nice

, can you share it with us? will be much helpful
Re: Corpse Party PSP image.bin file
Posted: Sat Dec 03, 2011 2:46 pm
by SkyBladeCloud
The contents of this post was deleted because of possible forum rules violation.