Sonic: Lost World - CRI CPK variant

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Sonic: Lost World - CRI CPK variant

Post by AlphaTwentyThree »

Hello, hello!

Once again, I found something that's not working, this time a cpk archive where QuickBMS crashes:
http://www77.zippyshare.com/v/ebkJbpIW/file.html
http://www77.zippyshare.com/v/ecQA906P/file.html
http://www77.zippyshare.com/v/WVIGQrEA/file.html
http://www77.zippyshare.com/v/nQAYCigk/file.html
http://www77.zippyshare.com/v/xbhShx5J/file.html
(sorry for posting the whole file...)
I hope this is nothing too serious and can be updated easily.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Sonic: Lost World - CRI CPK variant

Post by aluigi »

cpk.bms is no longer supported from long time when the format started to act in a senseless way (so any work-around was useless).
I guess there is something called CRI Tools supporting this format.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Sonic: Lost World - CRI CPK variant

Post by AlphaTwentyThree »

Oh... all these years and I didn't even notice!
Thanks for pointing that out.

For anyone wondering, this works: https://github.com/esperknight/CriPakTools
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Sonic: Lost World - CRI CPK variant

Post by aluigi »

AlphaTwentyThree wrote:Oh... all these years and I didn't even notice!

Yeah it has been something "soft", some people reported crashes (caused by decompression on wrong offset) and invalid files, the base offset changed from game to game without any apparent meaning and when the complaints increased too much I decided to abandon the script.
What makes me mad is that the problem is only the base offset, only that.

I have just added a note in the header of the script to say that it's no longer supported.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Sonic: Lost World - CRI CPK variant

Post by AlphaTwentyThree »

Sad but oh so understandable. I'll use the tool from now on. Thanks for your work in the past though.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Sonic: Lost World - CRI CPK variant

Post by aluigi »

Ah keep me update if you find an easy way to calculate the base offset :)
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Sonic: Lost World - CRI CPK variant

Post by AnonBaiter »

I've also found another "tool" that can handle CPK archives. Although this one is more of a general-purpose VGM tool than anything.
https://sourceforge.net/projects/vgmtoolbox/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Sonic: Lost World - CRI CPK variant

Post by aluigi »

Just an update about the cpk format and my cpk.bms script.
As written in another post I didn't really wrote the script but I just converted the C source code of a tool made by hcs to a bms script, 1:1 conversion.

Today, moved by curiosity about CriPakTools, I finally decided to check the source code of this tool and it's completely different than the one on which I based my script, so there is no way to "update" my script. The only alternative is rewriting it from scratch, something that will probably never happen since a working tool (and even open source!) already exists.

I had few cpk samples here and probably I found a possible cause of the wrong base offset issue (the position of the files are shifted causing wrong extracted files and crashes, yeah the reason is just that simple thing) and I decided to add this "possible work-around" to cpk.bms removing any previously implemented lame work-around.
This is probably the last time I will touch cpk.bms, script 0.3.3: http://aluigi.org/bms/cpk.bms

The reason of this update is only for reducing the amount of unsupported archives in case someone doesn't know that the script is unsupported and should use CRIPakTools.