Hello. I'm interested in translating and possibly patching Corpse Party: Sachiko's Game of Love ♥ Hysteric Birthday 2U (or just Corpse Party 2U). I have translated from Japanese to English before, and consider myself intermediate in the language. Unfortunately, I don't think anyone has managed to access the game's script or assets yet, so I took it upon myself to figure out how. I have little background in computer science and haven't done romhacking before, so... this will be an adventure.
First thing I did was find a tool to extract the files inside the .iso. This took a while - as far as I can tell, there's no real alternative to UMDGen on OSX except Prometeus. Prometeus itself, well...
dyld: Library not loaded: /usr/local/lib/libusb-0.1.4.dylib
Referenced from: /Users/rebecca/Downloads/Prometeus_v0.9.8B/Prometeus.app/Contents/MacOS/Prometeus
Reason: no suitable image found. Did find:
/usr/local/lib/libusb-0.1.4.dylib: mach-o, but wrong architecture
/usr/local/lib/libusb-0.1.4.dylib: mach-o, but wrong architecture
Trace/BPT trap: 5
It doesn't like libusb-1.0 and refuses to use it, and even then something in the architecture has changed so that not even libusb-0.1.4 works. Down goes that idea. I finally give up and just try and make a
Wineskin out of UMDGen - and it works!

Hallelujah. Right off the bat I notice something interesting: KANDICT.BIN. This is relevant to my interests - after speaking with DarkHamsterlord, the main issue with unpacking the DATA0.CPK file is something about "not a @UTF table at 16". Could the difficulty in unpacking the CPK be related to its encoding, and could we use KANDICT to fix that? Or am I on the wrong track?
Let me know if I'm doing anything wrong re: this topic.
November 20, 2013, 07:45:23 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Well, I've got another problem. I need a tool to open CPK files, but QuickBMS doesn't play well with WINE. I lack tools to unpack CPK files, but even then...there's the "not a @UTF table at 16" issue. Looking at others with the same issue, it has something to do with encryption. Apparently, there is a tool called
"cpk_unpack", but it's in .exe format. Luckily, there's source code and a Makefile, so I managed to build a binary of it anyway. Trying to run it gives me...
Retros-MacBook-Pro:USRDIR retro$ /Users/retro/Downloads/utf_tab07b3/cpk_unpack DATA0.CPK
cpk_unpack 0.7 beta 3
utf_tab.c:461:query_utf_nofail: didn't find valid @UTF table where one was expected
...nothing. It looks like the same issue as "not a @UTF table at 16".
What is "16" referring to in this case? Is it some sort of memory address? I can open it up in a hex editor,
here's what it looks like (url for looooooong). How do I figure out what the @UTF table is? Once I figure out what it is, how do I use it? What am I even doing I am so lost?
Anyway, is there a good CPK unpacker tool for OSX/Linux? Preferably something I can build on Mavericks without it screaming about a missing .h file or something.
UPDATE: Apparently there's a "special" version of utf_tab. Running it on DATA0.CPK gives me...
Retros-MacBook-Pro:USRDIR retro$ /Users/retro/Downloads/utf_tab07b5_special/cpk_crypt DATA0.CPK
cpk_crypt 0.7 beta 5 for over.cpk
s=5f m=15
I assume this is some sort of decryption key? Looking at the code for cpk_crypt suggests that this line doesn't get returned unless it's actually encrypted. s is "xor_bytes", m is "(unsigned int)mult".
Maybe if I unpack it now...
Retros-MacBook-Pro:USRDIR retro$ /Users/retro/Downloads/utf_tab07b5_special/cpk_unpack DATA0.cpk
cpk_unpack 0.7 beta 5 for over.cpk
/BGL00.CPK 0x4ab800 72220148
/BGS00.CPK 0x2d76c000 8378856
/CHL00.CPK 0x498b800 45722352
/CHS00.CPK 0x2df6a000 11448372
/CONFIG.CPK 0x2000 36880
/DATA0.CLS 0x1800 163
/FONTS.CPK 0xb800 1212708
/ICON.CPK 0x134000 235863
/OBJAB.CPK 0x2d6b3800 753908
/OBJSY.CPK 0x16e000 2797712
/SCENE00.CPK 0x419800 596094
/SE00.CPK 0x2114d000 53618688
/SE01.CPK 0x2446f800 153370624
/VO00.CPK 0x7526800 207794350
/VO01.CPK 0x13b52000 224374039
We have liftoff!

I got
somewhere, at least. That said I have a bunch more CPKs now...I'm willing to bet that SE and VO are SFX and voice-overs, respectively, but some of the rest are a mystery.
Anyway, unpacking everything gives me a shitload of binaries. Only one set is immediately obvious - ICON.CPK's .bins look like this:


Yep, they're good ol' PNGs. Got the right header information and everything. These look like the system menu logos for the game or something.
Some of the other bins are TIM2 files. Using Game Graphic Studio, I can open them up and see them (but I don't know how to batch convert them all

). The SFX and VOs are .ADX, I think, and I think I'll skip over those for now.
Now, the
really important part is SCENE00.CPK. Its BINs should contain the script for the game! (i.e., the text.) Unfortunately, it's garbled nonsense when I open it up in the hex editor. I don't see anything that looks remotely like text here.
I assume I'm supposed to extract text from these bins, but
how? Anybody know?