Jump to content

King of Colosseum 2 TIM2 Compression


Go to solution Solved by Rabatini,

Recommended Posts

Posted

Hey everyone,

I've been trying to get an accurate LZSS compression routine working for King of Colosseum 2, but have not been able to get it to compress to how the original file is. I've been able to get a compression script working, but the texture (file9967_incorrectlycompressed.comp) does not load correctly in the game. It's due to the compression not being accurate, however the decompression script can decompress the TIM2 file correctly. I've replaced another file with an original raw compressed file (file9967_correct.comp) within the KC2FIRE.001 archive and had no issues with the texture loading. I'm trying to get texture replacements working. I know Brienj was working on this a number of years ago, but I don't know how much progress was made.

Hope this makes sense.

I've attached the tm2, compressed files as well as the LZSS decompression script and the Python compression tool that I've created. Hopefully someone is able to help. 

 

 

KoC2.zip

Posted (edited)

Hi,

Thanks for the response. Unfortunately, the output doesn't match the original file. Is there a way to get an accurate byte for byte compression? This is the main issue I have. The output from your tool is in the first screenshot. The original is underneath.

Thanks!

output.png

original.png

Edited by skstylez
Posted

Yes. I've replaced another file with the unmodified comp file from the default game and the one from the tool you provided. The default game version (file9967_correct.comp) works.

correct.png

issue.png

  • Engineers
Posted

I will take a look, lzss compression is trick sometimes.

I made some alterations, and the file was very near to original, maybe you can try with this one.

 

Posted

I'll try it. I don't see any files by the way. Could KoC2 have a unique decompression algorithm? Is there a way to find the assembly routine within the game?

Posted

try2 seems to work. If you have the compression script for that in python, I'd appreciate that. I would like to include it to a file injection tool I'm working on. Credit will be given. Thanks! 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...