skstylez Posted October 19 Posted October 19 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
skstylez Posted October 20 Author Posted October 20 (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! Edited October 20 by skstylez
skstylez Posted October 20 Author Posted October 20 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.
Engineers Rabatini Posted October 20 Engineers Posted October 20 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.
skstylez Posted October 20 Author Posted October 20 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?
Engineers Rabatini Posted Saturday at 01:27 AM Engineers Posted Saturday at 01:27 AM try this ones. try.7z
skstylez Posted Saturday at 10:54 PM Author Posted Saturday at 10:54 PM 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!
Engineers Solution Rabatini Posted Saturday at 11:21 PM Engineers Solution Posted Saturday at 11:21 PM COCK2COMPRESSION.py Sure, take the cock 2 compression.
Engineers Rabatini Posted Sunday at 11:07 PM Engineers Posted Sunday at 11:07 PM (edited) Nice! So it´s solved! Mark as well, for help the community. Edited Sunday at 11:07 PM by Rabatini
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now