I have .z5 file from a game written in Inform 6.3. I do not have the original source code.
Is there a way to modify any parts of the game?
Is there a way to decompile the game to inform 6 such that I’d be able to recompile it later and have a functionally identical game?
If not, is there at least a way I can manually edit the text strings in the existing .z5 file using a hex editor? I’ve been able to extract the text using txd, but I don’t know how to locate the relevant memory addresses for each string. And when I look at the .z5 file in a hex editor I can’t seem to locate any of the strings either, so I’m guessing they’re not stored in ascii.
Also fwiw, I’ve not been able to decompile the file with reform. It just gives me a “Fail: Grammar table not contiguous” error.
The strings are stored in a five-bit encoding called ZSCII, with three ZSCII characters packed into two bytes and the extra bit marking the end of the string. Some of these strings are grouped together in a special block of memory; others are interspersed with executable code (as in, appearing in between opcodes in a single routine).
You can modify them a bit with a hex editor, but as you might expect, you generally can’t make them longer, only shorter. A disassembler is a better bet, though if Reform doesn’t work, I don’t know what would.
The question is, if disassemblers don’t work, is shortening these strings worth the difficulty of writing your own custom tool to modify them? Because that’s likely what this would entail.
I’ve been able to generate a replacement string, and place it at the right address and it works. So it’s just a question of making a custom tool that’s efficient for my needs here, in order to do this at a larger scale.
Are there any zscii decoders written in languages other than perl? I’m not very familiar with perl, and I’d much prefer something I can use in python or javascript.