Creating Z-Machine games targeting retro machines

As a retro-fan, I wonder if there exists any way to compile Z-Machine games to execute on the existing interpreters for the machines Infocom games were originally developed.

As I can see, Infocom games were released for a broad range of (current)retro machines, but all work towards using the Z-Machine seems to have been done from the perspective of recreating the machine on much more modern computers, pushing the ZM to its limits until the need of a new machine: glulx.

Inform, and to be more precise its standard library, is too big to fit in a V3 Z-Machine.

I wonder if ZIL cound be used for this, or if there has been any work in this line.

Maybe some light library for Inform…

Anyone interested in this? Any bit of info would be greatly useful.

There’s been a fair amount of recent discussion here about building Z-code games to run on the C64.

Inform 5 and early releases of Inform 6 can generate .z3 files. ZIL is also being used for this sort of thing.



I’ve been doing some retro work for the TRS-80. Here’s the scottfree interpreter running on the TRS-80 as Scott19.

It might be possible to compile a z-machine interpreter, but it would have to be simplified. Most of the work involves making sure most variables are 8 bit or 16 bit at the most.

Although, a z-machine interpreter ought to fit in a 48K machine after some hacking.

What retro machines do you have in mind?

Linus Akessons’ Dialog aims for compatibility with old systems, as it uses optimized memory. Maybe this would be worth looking at?

Last time I checked, Dialog still don’t compile v3 story files…

Anyway, the first step should understanding how Infocom’s ZIP/[E|X|Y]ZIP works. a work whose require 8-bit disassembling, an Art not available to ordinary imps.

The holders of “The Drive” can look if there’s 6502/z80/whatever assembler files around inside, in wiev of disclosing also surviving 8-bit *ZIP sources ?
(perhaps grepping for known 6502/Z80 mnemonics can do the trick ?)

Best regards from Italy,
dott. Piergiorgio.

I was under the impression that even these versions, despite generating z3 files, had a library with too much weight for what I am looking for. It’s the general impression I got about Inform library.

The original ones where the interpreters existed back then (though the idea of a Scott interpreter for TRS-80 opens possibilities for one that works in a Dragon 32/64!)

I’m about halfway through applying changes to Frotz that should allow it to work correctly on a PDP10 mainframe.


There is the mInform library, which is a smaller version of the Inform 6 library. Games using mInform can be compiled to z3 format with an older version of the Inform compiler (6.15?)

Stefan Vogt is using a modified version of the mInform library. I don’t know if he intends to share that modified lib with the world.

There are also a bunch of people interested in writing games in ZIL, but few games have been released this far.

We’ve started work on a library for Inform 6 called PunyInform, which is meant for writing games for 8-bit machines. It’s not ready for real-world use yet.

Regarding using the Z-machine for old computers: We wrote a terp for the C64 in 2018: . We made it adhere to Z-machine standard 1.1 (the current one) as far as we reasonably could on that platform. Since it’s written in 6502 assembler, it should certainly be possible to port it to Apple, Atari and other platforms.


Now that I am doing research on all this, I wonder how much Infocom’s parse changed as they released titles. We know that the Z-machine evolved but I can’t find any info about the parser/library (if they used such a concept internally) changed for a given Z-Machine version.

That, and its size relative to the game itself.

They didn’t have the concept of a parser library until late in the era. You’d start by cloning an existing game and stripping out the stuff you didn’t need.

Now that the source code is available, you can do these comparisons yourself.

1 Like

Indeed, this is a luxury we didn’t have until very recently.

That’s why I’m trying to put myself up to speed with ZIL.

I just got a clear answer from Stefan that he and his companions at Puddle will be releasing their pInfocom library and toolchain for public use.


I was about to ask him too. Sounds great!

1 Like

As @fredrik already hinted, we had the desire to release a contemporary Inform 6 distribution, that focuses on targeting classic computer systems, such as the Commodore 64 or the Atari 8-bit on one hand, while on the other hand retains the typical Inform experience. RetroInform had been released yesterday. It consists of a forked version of the Inform 6.15 compiler and Metrocenter '84, a library based on mInform. There is a changelog that keeps track of the path taken since forking mInform. We focused on backporting useful routines and fixing bugs but also added completely new features, such as (optionally) disabling inference or metro_scenery where @fredrik kindly contributed a large chunk of code to it . While the library is still much work in progress (we adapt changes as we need them in the course of developing Hibernated 2), it is usable and stable, so we thought we rather put it out in the wild now and just push new versions as they are created. There are some convenient features, such as a command line wrapper that triggers compiling to Z-code and dumps an Atari 8-bit disk image in addition, so you can instantly test your code on a proper home computer. But it’s necessary to mention that we only worked actively on the library and the demo files, the rest is pretty much a collection of gathered tools and patches that we now brought to a central virtual haven. RetroInform | Metrocenter `84


PS: we also have a set of new Commodore interpreters (C64, C128, VIC-20, Plus/4, PET) but these likely will see release at a later date. Here is Commodore 64.


I’m curious about the choice of A8 as the default test-build platform. Just a matter of personal preference, or is there a specific strategy behind it?

It’s really just personal preference. I notably have a separate build script for other platforms like the C64. It compiles the game, creates a disk image, puts interpreter and the Z3 file on it and then launches the emulator with the disk image attached. With today’s technology it’s trivial which testing target you choose, so in the end it’s all about personal preference :slight_smile:

Ah, okay. The 810 disk format is so much smaller than (say) an A2 .dsk or a C64 .d64, which was the main reason I wondered why you picked it. (Or are you using the 1050 format?)

The output actually is an .ATR disk image (Atari 1050 with 133120 bytes total)