I'm currently working on a mod for Harvest Moon: A Wonderful Life.
However, a lot of the game files I'm looking for seem to be compressed into CLZ files.
What I currently know about these files:
- They all start with a file header of 43 4C 5A 00 at offset 0x00000000
- They use big endian encoding
- They only contain one file (e.g. commonall.arc.clz would be a compressed version of commonall.arc)
- They then state the size of the decompressed file in hex (e.g. 00 53 54 90 or 5.46MB) twice at offsets 0x00000004 and 0x0000000c
- Compressed data seemingly starts at offset 0x00000011
- They seem to be using some unknown form of LZ (Lempel–Ziv) compression
I've tried testing file decompression using comtype_scan2, but have thus far been unsuccessful in finding a suitable match.
It seems that the game must decompress and read these files on the fly when loading the game, so I was wondering if anyone has any experience in using Dolphin's debug mode.
Ideally, I'm wanting to find what point the game reads these files, and then analyze that code to create a decompression tool.
I've tried analyzing the game's main executable (dol file) and found that the loading of certain clz files seems to be linked to a SceneInit function.
I've also managed to decompile the executable into human-readable (sort of) python format.
Any help would be greatly appreciated.