Further Examination of CLZ archives, Discovery of MES Reader, and Personal Stuff

At this point I’m just trying to understand the CLZ header.  So far I’ve noticed a trend between the varying files.

I’ll be using mainchapter0.arc.clz for this example

Offset   |   Size   |   Description
0x00   |   4 bytes   |   CLZ file identifier [43 4c 5a 00]
0x04   |   4 bytes   |   unknown variable [00 63 ad 40]
0x08   |   4 bytes   |   zero space [00 00 00 00]
0x0c   |   4 bytes   | unknown variable, repeats that of 0x04 [00 63 ad 40]
0x10   |   1 byte   |   zero space [00]
0x11   |   variable amount   |   First file in clz archive, in this case a U8 arc file [55 aa 38 2d …]

The main differentiator seems to be the section at 0x04/0x0c.  My best guess is this likely references the file size and/or the number of files contained in the clz archive and/or the offset(s) of said files.


In other news, I’ve found a MES Editor Reader (courtesy of Harrison’s seemingly abandoned translation project).

I’ve emailed Harrison to see if he has any additional insights into the mes format (i.e. encoding formats) so that I might be able to manually decode/encode text changes for pronouns, etc.  Here’s hoping that he’s still using the same email 5 years after posting the tool.


Btw if you’re wondering why progress has been a little slow, here’s your reason.

Update: Harrison has replied

Hey Sean! Exciting – I’m assuming you’re working to fix the typos and reversed yes/no options that are throughout the game? That’s what my goal ended up being, but I quickly reached the the limits of my programming knowledge.

Check out main.pas file on GitHub – at the top, I have an array named CharMap that maps out all the characters that are used. Based on this, I think they’re stored as two bytes from 0x8000 to 0x81FF. Near the bottom, within the function “ConvertFromHM”, you’ll see some of the other characters that I found that are used for page breaks, character names, and other inserts.

Let me know how it goes! If you find out any additional special characters let me know, I wouldn’t be averse to playing around with finishing this tool sometime.

With this info, I should have the basic character information to decode/encode basic text for dialogue.

Going through all of the dialogue to find pronouns might take some time though, so if you see anything that should be changed in either game, let me know.

Advertisement