gemot encubed  

Go Back   gemot encubed > Gemot > Production & Help

Production & Help For discussions regarding production aspects, especially localisation, of visual novels and related games.

Reply
 
Thread Tools Display Modes
  #1  
Old 2009-01-14, 14:01
EsperKnight EsperKnight is offline
Visitor
 
Join Date: Jun 2006
Location: Norfolk, VA
Posts: 3
Send a message via AIM to EsperKnight Send a message via MSN to EsperKnight
Default Comic Party Unpacker Tool

Hello all,
I've been reading the forums for a while trying to learn what I can about reverse engineering file formats and finally took the plunge and went for it. I present to you the fruits of my labor, a tool to unpack the .pak files of Comic Party. I've been wanting to see this translated and saw that no one has really looked at it, I figured I'd give it a shot.

From what I've sample it appears to extract everything fine, except it doesn't turn the .msk files or font files into BMPs just yet. I'm still learning the BMP format and haven't looked to see what the palette is for these (I'll update it later when I find them if they do use it as a BMP, why they may not).

I've also included my code with this (which is hopefully pretty straight forward in showing how there decompression scheme works). I haven't coded a compression scheme to go the reverse though since it appears we'd need a key to do it (it uses a key that's AND'd against to find out if it show do a run and other bytes to set up counts, reset the buffer, etc. etc). The good thing is though, I don't believe we'd need a compression routine to reinsert them since as long as you set the 0th byte to FF and every 9th byte after that to FF it won't trigger a run, instead it'll just build it normally.

If anyone looks at this let me know if you find any bugs or not please. Also later on I'm going to possibly post a walkthrough/tutorial on how I reversed it so it could possibly help anyone else looking at learning this (more of a guide of what to look for possibly).

Also, if anyone would like to help in translating please let me know! Thanks!

EsperKnight
Attached Files
File Type: zip CP_Unpack.zip (11.3 KB, 469 views)
Reply With Quote
  #2  
Old 2009-01-15, 22:47
zalas zalas is offline
 
 
Join Date: Feb 2004
Location: fushigi misuterii
Posts: 1,831
Send a message via ICQ to zalas
Default

In case you haven't realized, it's using a pretty standard implementation of LZSS and the "key" you describe is simply a set of flags (one for each bit in the byte) telling the decompressor what types of token follow, whether they be verbatim byte-copy tokens or window backwards-lookup tokens. That being said, yes you can simply create a byte-stream that's all 'verbatim-copy' tokens, but if you want to learn how to write a real compressor for it, look up LZSS.
__________________
~Yoda is waiting in the air~ | HAVEN
Reply With Quote
  #3  
Old 2009-01-16, 08:54
EsperKnight EsperKnight is offline
Visitor
 
Join Date: Jun 2006
Location: Norfolk, VA
Posts: 3
Send a message via AIM to EsperKnight Send a message via MSN to EsperKnight
Default

I hadn't realize it (and yet, sadly, I was reading up on the LZ compression schemes not to long ago and didn't make the connection) but I'll definitely look into it. Thanks!
Reply With Quote
  #4  
Old 2009-01-26, 08:52
kouryuu
Guest
 
Posts: n/a
Default

O.o I have no clue about the comp scripting side of things, but if you get this up and running, and working completely (as well as maybe figure out how to re-pack after un-packing) ...let me know. You might just give me a looot of motivation to finish up the Tl project I've been working on sooner rather than later.
Reply With Quote
  #5  
Old 2009-02-05, 20:51
Spitze's Avatar
Spitze Spitze is offline
Member
 
Join Date: May 2007
Posts: 19
Default

[This post was converted into something useful by the power of a magical hammer.]

るぅぅぅぅ!\o/

Last edited by Agilis; 2009-02-05 at 22:44. Reason: Take your iso to aG9uZ2ZpcmU=
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comic Party Help!!! Inexperienced Gaijin General Discussion 5 2009-06-30 10:23
Comic Party kouryuu Technical Issues 12 2009-05-29 05:16
Comic Party question Unregistered General Discussion 1 2008-05-07 12:13
Comic Party? Guest General Discussion 8 2007-09-27 23:36
MPI Unpacker/packer YueSD Technical Issues 2 2007-07-19 09:11


All times are GMT -8. The time now is 15:15.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.