Interactive fiction decompilers

This page contains my decompilers for several interactive fiction VMs. They are in various stages of (in)completion. All are written in Haskell.

Reform

Reform (release 6, serial 040226) is a decompiler for Z-machine story files. It produces Inform source code (or something which looks a lot like it).

Reform has more bells and whistles than my other decompilers. It has a lot of heuristics to choose good names for things and guess their types, and you can feed it a "symbol file" to override its choices. If you spend enough time tuning the symbol file, Reform can determine the type of virtually every constant, and there's some hope that it might someday be able to produce recompilable source files.

It supports all Z-machine versions, and most grammar table formats (Infocom V6 being the notable exception). It can find story files inside of Blorb files. It does a pretty good job of generating inline assembly for things it can't figure out how to decompile. It doesn't recognize any looping constructs; they will show up as ifs and jumps instead.

Old versions:

Note that if you have any release of an Infocom game, you can convert it into any other release by using the patch files at if-archive/infocom/patches.

Revision history:

Mrifk

Mrifk (release 2, serial 050524) is a decompiler for Glulx story files. It's far less sophisticated than Reform, but it does successfully locate and decompile the grammar table, all objects, and all routines and strings. It does not yet support symbol files.

Revision history:

Scads 2

Scads 2 (release 1, serial 040131) is a decompiler for TADS 2 .gam files. Based on my limited testing it seems to be reversible, in the sense that its output can be recompiled into a new .gam file which is functionally equivalent to the original. It does not yet support symbol files. Daniel Schepler's detads.pl and t2disasm.pl were a great help in writing this.

Scads 3

Scads 3 (release 1, serial 040131) is a decompiler for TADS 3 .t3 files. It could in principle become reversible, but it's far from that goal at present. It does not yet support symbol files.

Victor

Victor is a decompiler for Hugo .hex files. It's not really in a usable state right now, but I'm providing source code for anyone who wants to hack on it.

About

You can contact the author (Ben Rudiak-Gould) at benrg at darkweb.com.

I promise to read all the mail I receive, but I don't promise to respond, or to fix problems right away. As much as I'd love to devote lots of time to hobby projects like this, I simply have too many other things to think about. That doesn't mean I won't fix bugs or release new versions, just that it won't be happening at predictable intervals.

If you send me new Reform symbol files or improvements on existing ones, I will definitely add them to the symbol file collections above.

Have you tried...