Copy Link
Add to Bookmark
Report

Where *doesn't* the Z-Machine run?

Remember Issue #5

eZine's profile picture
Published in 
remember
 · 21 Jan 2024

I hope you're doing well! Here's the fifth installment of this newsletter, with once again a massive article! I can't help it sometimes: the topic seems interesting, so I'll spend way more time than I thought on it! Lucky you 😀

My news

I am done translating the text of Tristam Island into French! And... it doesn't fit the memory requirements, of course 😀 But no worries! Not by much, and I noticed while translating that parts of the code could be a little more efficient. It should work! After that, I have to translate the PunyInform libraries... I hope that translation will be done by summer!

Oh, and I just learned this morning that "Tristam Island" has ZZAP!64's "Sizzler" award in its latest edition! The whole review was really nice, calling the game "one of the best modern text adventures in recent years" - I'm very happy and proud 😊

I also had a client this month for whom I did some consulting on making a game for retro platforms! He wanted to try out a few tools and is currently working on making a kinetic novel (the Japanese term for "a computer novel with no branching and with pictures") for C64 (his platform of choice) and other platforms. I set him up with Trizbort, DAAD and Multipaint, and showed him how everything worked and what the workflow is like; next is Inform 6, because he wants to expand to other platforms! Very fun 😀

Community news

The retro text adventure community has been busy again this month!

  • Mathbrush, author of many great Inform 7 games, wrote a game called Swigian a few years ago, and hacked the software to be able to display the great pictures drawn by Marco Innocenti. Now he's redone his game using Adventuron, which is a much more natural fit. Give it a try here!
  • I had missed this adventure game, "The Darkness of Raven Wood", but it popped on my radar today. Looks like BBC Micro and Acorn Electron users can order their physical copy now! It looks beautiful, and the box seems packed with goodies!
  • The makers of the awesome Inform 6 library PunyInform have started a game jam, PunyJam #1, which is now underway. For anyone wanting to know this tool, there are great tutorials written by Fredrik Ramsberg!
  • ParserComp 2021 is also starting soon, and running until the end of June! Any platform can be used, it's a great comp to join if you have any ideas you've been playing with!
  • The Text Adventure Literacy Jam has just closed with 10 submissions in English and 7 in Spanish! You can now play the games and vote for them; you have a little over three weeks to do so.
  • CAAD, the magazine on interactive fiction in Spanish, has released their issue #53 - over 120 pages! It includes a primer on French interactive fiction written by yours truly, a discussion on the origin of the term "aventuras conversacionales", and an article by Chris Ainsley on Adventuron! (And more! DAAD charset editing, a new Spectrum game inspired by Edgar Allan Poe, a note that The Curse of Rabinstein is currently being translated into Spanish, etc! It's a really good read!)

This month's article

This month, I took a deep dive into the world of Z-Machine interpreters - that is, software that can run most Infocom story files, Tristam Island, and sometimes larger games such as "z5", "z6", and "z8" formats. And when I say "a deep dive", I mean it: I have compiled a list of 72 platforms, old and new, that can run a Z-Machine interpreter! I have tried to include details when I knew more about the interpreters (which is better, how do you use them, etc), and up-to-date links (including some from the Wayback Machine!). This should be the most comprehensive resource on the Internet on this particular topic! So, enjoy! And I'll see you next month 🙂

Issue #5 : Z-Machine interpreters

In the 1980s, Infocom published about three dozen of text adventures on most platforms of the era, from the TRS-80 to the Atari ST. Their method to spend minimal time on portability was to create a virtual machine, the Z-Machine, and compile their games into bytecode that could be read by the Z-Machine. All was needed was some software that could read this bytecode and execute it on a target machine: an interpreter.

To ensure that all interpreters behaved coherently, Infocom actually wrote specifications for the Z-Machine (version 3, 4, and 5 for text-only, and 6 for graphical adventures), which specified how the interpreter should behave; this was to make sure that the people tasked with writing a new interpreter would follow the same rules as the other ones. This specification was then reverse-engineered by amateurs as early as the end of the 1980s (Barry Boone on the TI-99/4A, the InfoTaskForce in Australia, etc.). In the 1990s, people added some features and fixed a few inconsistencies, and created version 8, which was basically the same as version 5 but allowed larger file sizes. This gave the Z-Machine standards, which are available online:

http://inform-fiction.org/zmachine/standards/z1point1/index.html

This means that if you’d like to implement a Z-Machine interpreter, all you need to do is follow this specification. Over the years, literally hundreds of Z-Machine interpreters have been written, for sometimes very exotic platforms. They sometimes have their own quirks, can fall out of fashion, or get forgotten; I cannot begin to retrace all the Z-Machine interpreters that have been written. However, this month, I would like to give you a taste of all the different platforms that a Z-Machine game can be played on; I hope this will give you some ideas and make you want to experiment.

In order to prepare this article, I scoured the Internet, Github, Sourceforge, the IF- Archive, etc. to find as many interpreters as possible. I’d be remiss if I didn’t mention Stefan Vogt’s help for the retro interpreters; Stefan spent countless hours finding the best interpreters on 1980s machines, then very generously gave all that information to me and helped me set them up for Tristam Island. The information on interpreters for 1980s machines is, thanks to him, of great quality!

A word of warning

Usually, running a game in an interpreter is straightforward, but not always. The procedure can be complicated; the interpreter is not necessarily open source, or can be hard to find; there can be a few bugs left, etc. I will attempt to describe some of the procedures that are required, to the best of my knowledge, to run the games, but writing full tutorials would take too much time. Do not hesitate to reach out if you have a question; having released Tristam Island on 36 of these platforms, I definitely know some of the finer details for these, at the very least!

All interpreters here run v3 games, and most run v5 games or more; I will attempt to mention this whenever possible.

And lastly, at the end of this document, I will mention a few open problems – as in, platforms that really could have a Z-Machine interpreter, but don’t. If anyone wants to help, or knows about something I don’t, please get in touch!

8-bit 1980s era

  • Amstrad CPC & PCW: the Infocom interpreter is written in z80 assembly and works for both Amstrad CPC and PCW, and (I believe) supports the Z-Machine v3 and v5. Another possibility is the interpreter ZXZVM, written by John Elliott: he wrote a version that works for Amstrad PCW, available on his website, and it was recently ported on the Amstrad CPC by Kevin Thacker:
    http://www.seasip.info/ZX/zxzvm.html
    https://www.cpc-power.com/index.php?page=detail&num=16439
    Be warned, however, that its performance isn’t as good as Infocom’s interpreter.
  • Apple II: Infocom published interpreters for v3 and v5, with the former fitting with a v3 game on one side of an Apple II disk; a very detailed writeup was published at KansasFest 2017, but be warned that Inform 6.34 (the newest compiler) should be used as the ability to compile to z3 has been restored since this article was published:
    https://www.kansasfest.org/wp-content/uploads/apple_ii_inform_paper.pdf
  • Atari 8-bit: Infocom’s interpreter runs on Atari 400, 800, XE and XL, and supports v3 only; since Atari 400/800 disks are 130kb (and a v3 file can be as large as 128kb), some versions of the interpreter (e.g. Plundered Hearts) load the interpreter in memory, then make you flip the disk to play.
  • BBC Micro (B, B+, and Master) and Acorn Electron users have a choice between two interpreters: an older one by Jon Welch (“BBC Micro Z-Machine v1.1”, GPL licensed) and a port of Ozmoo by Steve Flintham. The latter is the better one, and development is still active on Github; you’ll find in the repository everything you need, including the Python script that generates the disk image. Supports splash screens and v5 games.
    https://zornslemma.github.io/ozmoo.html
  • Commodore PET and VIC-20: Edilbert Kirk (BitShifter) wrote a very nice 6502-assembly interpreter which works on the PET, the VIC-20, the Plus/4, the C64 and the C128. It can run v5 files and has accented character support. I’m not sure it’s publicly available, but you can ask him (he is in various C64- related forums). Infocom disk downloads are at:
    http://petsd.net/petfood.php?lang=en
  • Commodore Plus/4, Commodore 64, Commodore 128: on top of the aforementioned interpreter by Edilbert Kirk, there is Ozmoo, created by Johan Berntsson and Fredrik Ramsberg, which is a great interpreter; it is optimized for speed (with options for pre-loading data in memory), can use different fonts, supports a splash screen in C64 mode, and can read v3, v5, and z8 files. It can also generate tape files if your game is small enough (e.g. Mini-Zork II).
    https://github.com/johanberntsson/ozmoo
    And I almost forgot to mention Zeugma, by Linus Akesson, which requires a RAM expansion unit but also supports v3, v5 and v8 files:
    http://www.linusakesson.net/software/zeugma/index.php

  • CP/M systems such as the Osborne 1, DEC Rainbow, Kaypro, Intertec Superbrain, etc. can use the Infocom interpreter; however, some customization might be needed so the interpreter behaves well on the target machine. Richard Loxley has documented the process for his Osborne 1 computer:
    https://www.richardloxley.com/2018/04/28/osborne-restoration-part-17-text- adventure-games/
  • Famicom: since the Famicom system had an official keyboard accessory in Japan, user Zzo38 has started (but not completed, I don’t think) a Z-Machine interpreter for the Famicom. The code is available here:
    http://wiki.nesdev.com/w/index.php/User:Zzo38/Famicom_Z-machine
  • IBM PC: Infocom’s games were released on the IBM PC line, which means that, much like other platforms, the interpreter can be recovered and the data file switched to play any game; v3 is a given, but I’m not sure about v5.
  • MSX 1 & 2: some confusion exists about whether Infocom actually produced a MSX interpreter (some say they did after the Activition acquisition, but there is no trace of it). It might have been an adaptation of their CP/M interpreter. In any case, SLotman, a well-known Brazilian MSX hacker, has an interpreter for MSX 1 and MSX 2 on his website:
    http://www.icongames.com.br/msxfiles/our-en.htm
  • Oric Atmos: Chema Enguita and Fabrice Frances, two highly regarded Oric programmers, adapted the pinfocom interpreter for the Oric, giving Pinforic, available at the IF-Archive.
    https://www.ifarchive.org/indexes/if-archiveXinfocomXinterpretersXoldXpinfocom.html

    The interpreter comes on one disk, and the game file (v3 only) should be put on another disc (which is a special format for the Oric – use a tool to create a DOS disk image, then run it through the raw2mfm tool). They’ve actually done a little bit more work on it recently to make a version with everything on just one disc (and some magic to make this compatible with the Telestrat); they’re talking about open-sourcing the latest version in a proper repository soon!

  • Spectrum +3: there are two interpreters available here. The first one is ZXZVM, which we’ve talked about in the “Amstrad CPC & PCW” section; the second one is an interpreter by George Beckett and Stefan Vogt, which, from my understanding, they made from an Infocom article published around the time of Deadline about their CP/M interpreter. The latter interpreter isn’t public yet (ask Stefan!), and requires a CP/M+ & Mallard BASIC disk image to work, which you can purchase at https://locoscript-software.square.site/product/zx-spectrum-3-cp-m-plus-mallard-basic-dsk-image-/11
  • TI-99/4A: the interpreter that is in use in the community is seemingly Barry Boone’s interpreter, which descended from Infocom’s by way of heavy hacking and reverse-engineering. It requires a custom format, for which I have written a conversion script:
    https://github.com/hlabrand/retro-scripts
    Work on the interpreter is still under way, with the latest developments chronicled in an AtariAge thread below. The interpreter now supports native z3 format (z5 is just impossible on this machine), accented letter support, and even a splash screen! If you’re interested, ask InsaneMultitasker:
    https://atariage.com/forums/topic/310898-ti-99-infocom-interpreter-dev

16- and 32-bit era

  • Acorn Archimedes: the Archimedes had Z-Machine ports starting very early (it was when the InfoTaskForce interpreter was made available on that platform that Graham Nelson started playing around with it, which gave birth to Inform). The ITF interpreter is available on the IF-Archive, as well as a later interpreter (ZIP2000):
    https://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXoldXitf.html https://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXzip2000.html
  • Amiga: there are a few interpreters on Amiga, including AmigaZIP (a port of Zip by Werther Pirani that requires Workbench 1.2 or later) and Frotz (version 2.43, requires Workbench 2.0 or later). Both support v3, v5 and v8, and Frotz also supports v6 games.
    https://www.ifarchive.org/indexes/if-archiveXinfocomXinterpretersXzip.html http://aminet.net/package/game/text/frotz.lha
  • Apple IIGS: there are a few interpreters available for the AppleIIGS, including a port of Zip. A more recent interpreter is “On Beyond”, by famed Apple II hacker 4am, which can be found on Github:
    https://inform-fiction.org/zmachine/appleII.html https://github.com/a2-4am/pitch-dark/tree/master/src/onbeyond
  • Atari ST: there seems to be a couple of interpreters on that platform, such as “atarizip”, “zorkmachine”, “itf” (a port of the InfoTaskForce interpreter) and a port of Pinfocom, on top of the Infocom interpreter, of course (which runs v3 and v5). I use a port of JZIP, John Holder’s interpreter, which runs v3 and v5 files; the port to the Atari ST was made by Dancer in 1995. I resurrected this codebase to hack at it and have proper accented character support; you’ll find the binary on the IF-Archive, and the code on my Github:
    https://github.com/hlabrand/jzip-atariST

Handhelds

  • Archos PMA430: Frotz has been ported to this platform, but I don’t have much more information than that:
    http://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • Apple Newton: to the best of my knowledge, the only interpreter seems to be YAZI, written by George Madrid and Sanjay Vakil, and based on the Zip interpreter by Mark Howell. It reads v3 files only, and the only known package is a shareware package with pared-down features (for instance, any save made after 50 turns cannot be restored, unless you pay the 25$ registration fee). Some people online report having been able to contact Sanjay Vakil (even recently) and he generated a registration key for them, but there’s not really an automated method that works yet. You can find the interpreter here:
    https://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXoldXyazi.html
  • Android: there are many interpreter apps on Android, and some are taken down or never updated anymore, etc. A recent and very nice one is Fabularium, which has a clean interface (and even allows you to run I6 code); I’m a big fan of the interface of Text Fiction, and I also like Jfrotz for its hardware keyboard (which takes less space than the regular Android keyboard).
  • Blackberry: it appears like the creator of Jfrotz for Android started out with a project of a Z-Machine interpreter for the Blackberry. I’m really not sure how to make it work at this point, but here is the link anyway:
    https://sites.google.com/site/zaxmidlet/
  • Game Boy and Game Boy Color: just because there is no keyboard doesn’t mean that the Game Boy doesn’t have an interpreter! The interpreter’s name is INFGMB, and was written by Martin Korth (alias noca$h, a prolific writer of emulators and other tools). The latest version is on Martin’s website, and has script that’ll allow you to generate the package from your story file. Be warned: the interpreter only supports v3 and is not exempt of bugs (for instance when you use more than 64 abbreviations). Of course, you usually need a special device (a linker) that emulates a cartridge but has a microSD slot in order to run this interpreter on real hardware.
    https://problemkaputt.de/infgmb.htm

  • Game Boy Advance: I believe the only interpreter is GBAFrotz, a port of Frotz 2.41 by Jonas Minnberg. It runs v3, v5 and v8 files, and a lot of thought and care went into its usability; the buttons are mapped to common verbs, you can still select letters from a virtual keyboard with a combination of buttons, and there is the possibility to grab words from the screen to put them in your input. Minnberg’s old website is down, but still accessible through the Wayback Machine, including a full source download. The executable (and scripts to create a GBA file) are on the IF-Archive; of course, you’ll need a linker to play this on real hardware:
    https://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • GP2X: Frotz has been ported to this Linux-based handheld device: https://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • iPhone: again, quite a few interpreters on the App Store, and I wouldn’t be able to say which is the nicest, but I’ve heard a lot of people like Frotz.
  • Kindle Touch: Kindle Touch / Paperwhite e-Readers have a port of Frotz; I don’t really know how usable it is, but since these devices have a touchscreen, it shouldn’t be too bad:
    http://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • Kobo: these e-Readers also have their own port of Frotz: http://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • Nintendo DS: there are two interpreters available on Nintendo DS, and I believe both are based on Jonas Minnberg’s work for the GBA and the NDS. The first one is an interpreter that was based on Glkpogo, by Jonas Minnberg, which allowed to port Frotz easily; binaries are available here (select the glk_pogo one), and it should work by putting the story files in the right folders:
    http://errabes.free.fr/pogo2/
    The second one is DSFrotz, by PapaFuji, and is actually a full-fledged application that will also display metadata, cover art, organise your collection, etc; it even has stylus support, meaning you can draw each letter to add it to the input. Its core is based on GBAFrotz by Jonas Minnberg; the author has also released some bundles of free games, including the Scott Adams and Infocom games, on that format. The website is still up with the latest version, but an older version (with sources) is also available on the IF-Archive:
    http://gugusse.central.free.fr/papafuji/DSFrotz.html http://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXfrotz.html
  • Nokia Communicator: there seems to be an interpreter descending from the Zip interpreter on these devices:
    https://inform-fiction.org/zmachine/nokia.html
  • Palm OS: you actually have quite a few choices for Palm OS devices! There’s a port of Frotz, but also Frobnitz (which claims to run on devices without expanded memory), and Kronos, which bundles in a Magnetic Scrolls interpreter. All three run all kinds of Z-Machine games except v6 games:
    https://inform-fiction.org/zmachine/palmos.html

Bots for forums, Discord, IRC, etc

Other platforms

  • Dreamcast: a port of Frotz was done by Sam Steele under the name FrotzDC. Various files are available online, but the very latest version (1.1) was, I believe, unpublished until I poked Sam about it. They can be found in the “releases” section of the Github repository:
    https://github.com/c99koder/FrotzDC/
    This interpreter supports v3, v5, and v8 files, and can save to the VMU; it has several color schemes, and the font is a C64 font that can be customised to your needs. I hacked it so latin-1 characters displayed properly, and it is available in that same repository. In order to create a disc file in the proper format, you need a few tools, and to follow the instructions at
    https://dreamcast.wiki/Creating_a_bootable_Dreamcast_disc

  • Embedded hardware: what we think of “small embedded devices” has a lot of processing power, more than most computers of the 1980s. Someone made a v3 interpreter for such devices, and has a cool demonstration of it running in a keyboard – that’s right, the keyboard’s processor runs the interpreters, and fakes keystrokes to display the output in, say, Notepad. Cool stuff!
    https://github.com/daniel5151/embcrusted
  • FPGA / Verilog: yes, there are hardware implementations of the Z-Machine! Should we still call it a virtual machine, or not?
    http://www.ifarchive.org/indexes/if- archiveXinfocomXinterpretersXhardware.html
  • LiveScribe pens: these were “smart pens” that could digitize handwriting, and the video below caused quite a stir when it was published. I prodded the author of the code, and he kindly provided the source code on Github. It is of limited interest, since the “app store” for these has been disabled when the maker stopped producing pens.
    https://www.youtube.com/watch?v=scn3YdcFD60 https://github.com/charcole/LivescribeZork
  • Mega65: Ozmoo, by Johan Berntsson and Fredrik Ramsberg, is also available on Mega65 computers thanks to help from Paul Gardner-Stephen:
    https://github.com/johanberntsson/ozmoo
  • Spectrum Next: the Next actually comes preloaded with the ZXZVM interpreter, thanks to Gary Lancaster, who ported it and fixed a few bugs to make sure it runs very smoothly. The distribution repository (which contains ZXZVM) is at:
    https://gitlab.com/thesmog358/tbblue

Open problems

Here are a few platforms which really could have a Z-Machine interpreter, but for some reason, don’t.

  • Camputer Lynx: it doesn’t look like this 8-bit 1980s computer has an interpreter yet! It’s based on a Z80 processor, which means the source for ZXZVM (for CPC and Spectrum) or ZEMU (for TI-84) could be useful.
  • Dragon 32 & 64: these Welsh computers are supposed to be mostly compatible with the TRS CoCo, but I’ve had no luck running the Infocom interpreter on a Dragon emulator. Anyone wants to try?
  • FM-7 and FM-Towns: these two Japanese systems are respectively a 6809- based computer (which means that the source code for the Infocom TRS CoCo interpreter could be useful) and its successor, a x86/DOS-based computer, for which interpreters exist. If anyone with a fondness for old Japanese computers wants a side-project...
  • Intellivision with ECS: the Intellivision had an extension that made it work like a home computer, and in theory it could run a Z-Machine interpreter. Somebody asked on the AtariAge forum: https://atariage.com/forums/topic/268643-z-machine-wacky-daydream/

  • Matra Alice: this is a rather odd computer, which sold in the early 80s in France; it is based on the 6803 processor, which makes it stand out from others, and only has 32 KB of RAM. I’m not even sure it’s possible!
  • Super Nintendo, Genesis/Megadrive: let’s reignite the console wars of the 1990s! Sure, they don’t have a keyboard, but it doesn’t matter – the GameBoy doesn’t have any either! And there is quite a bit of documentation available for making your own Genesis games...
  • Symbian / Nokia N-Gage: there are a few homebrews for this, and who hasn’t dreamed of playing interactive fiction on a T9 keyboard?
  • PC-88: this platform technically has a Z-Machine interpreter: Infocom’s own CP/M interpreter, which they used to release Zork (1, 2, and 3) on this platform. However, since the PC-88 is not a CP/M-based machine, they also had to reimplement CP/M on the PC-88 and bundle it with their game. I’m really not sure how to pry this out, and I haven’t even been able to run a PC-88 emulator (the Zork disk image can be found on archive.org, however). If anyone has any ideas...
  • Sam Coupé: a rather obscure machine, but a Z80-based machine nonetheless, so there is source code around that could be helpful!
  • Sharp X1: a Z80-based machine for the Japanese market, but I believe it is rather obscure, unfortunately.
  • Sharp X68000: this Japanese 16-bit home computer could easily run a Z- Machine interpreter, but there doesn’t appear to be any so far. I know at least one person on Twitter who is eagerly expecting such a port!
  • Sinclair QL: if it can run The Pawn, it could run Infocom’s games, no?
  • Tape-based Spectrums: this would be necessarily limited, since v3 games can be up to 128kb in size (and you have to add the interpreter on top); you wouldn’t be able to run games that get too close to the limit, such as
    Plundered Hearts. But it might still be worthwhile: lots of games are smaller than 120kb, and might be played on a Spectrum 128K, for instance.
  • Thomson MO / TO series: these were very popular in France, and are 6809- based machines, which means one could take inspiration from the source code of the TRS CoCo interpreter’s source mentioned above. The latter models had disk peripherals, and there’s quite a bit of RAM on a TO7/70 for instance; an interpreter would be feasible.
  • ZX80, ZX81: this is highly speculative, since the memory limitations were tight, but apparently you could go up to 64kb of RAM with the ZX81. For the ZX80, however...

Phew! This was a very big article for “>REMEMBER”! Don’t get used to it, I can’t write 10 pages every month for you ;)

I hope this was interesting, and please report back with any experiments you do on any device! Send me a tweet at @hlabrande with a picture and I’ll gladly retweet it! See you next month!

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT