Z-machine specification, future revisions?

I’m very slowly writing my own Z-machine interpreter, for fun and so maybe one day I can play Zork on my Remarkable tablet… :grimacing:

I have been following the v1.1 specification for the Z-machine and many-a-time, when I found bits of it that seemed ambiguous or hard to follow, my searches ended up sending me to this forum site.

I notice there has been some discussions in recent years on here on a possible future revision to the standard, maybe a v1.2. I wondered if anyone was still working on that or knew of anyone who was?

As a n00b slowly making his way clumsily through C++ and the spec, I might be able to share with you some of the parts of the current standard that I found to be particular stumbling points.

1 Like

There have been a couple different proposals for 1.2, but I don’t think any of them have been formally adopted by the IFTF.

The main one I remember I can’t find online any more, but mostly extended the V6 specification to do a lot more media stuff. Fancy audio control, font size controls, things like that.

Dannii’s made a much more modest proposal, which changes pretty much nothing: it claims opcode EXT:30 for a “gestalt” system like Glulx has (i.e. a new way to ask the interpreter if it supports specific things without needing to keep adding more flag words to the header).

2 Likes

David Fillmore (@Marvin) has been maintaining the specification source on Github, though it hasn’t been updated for three years. But it’s still a useful place for tracking errors in the spec, which have been filed as issues.

There have been two attempts at expanding the Z-Machine into a version 1.2:

  1. My fairly minimalistic extension to include a gestalt opcode: The Z-Machine Standard 1.2 (draft) | Dannii’s IF Pages
  2. David Fillmore’s larger expansion: Z-Machine 1.2 Proposal (again)

My version has been shipping in Parchment for at least 10 years, and was used by Vorple (though Vorple games were always distributed as stand-alone websites, and Vorple isn’t useable in the standard Parchment on iplayif.com). David Fillmore’s version never reached the stage of being implemented AFAIK.

Despite the gestalt opcode being around for 10 years and giving authors a way of safely extending the Z-Machine even for just a single game, no one has, except for Vorple. I think there really just isn’t actually a desire to do so. Glulx has now taken over the Z-Machine as the current target for Inform or Inform-like development, and the Z-Machine is generally only targeted by modern authors who have to some extent a retro-computing bent. But extending the Z-Machine is anthetical to retro-computing because new features won’t be available on old platforms. That would be my explanation for why there’s almost no desire to extend the Z-Machine anymore.

4 Likes

@saxbophone Are you aware of Folly, a Z-machine interpreter for the reMarkable tablet that allows handwritten commands (some images here, Github repository)?

4 Likes

@billmaya OMG, no I was not aware of Folly! I can’t believe I missed this when doing my initial research into seeing if someone had made one already…

If it supports Remarkable 2 (the model I have), I’ll deffo give it a go at some point, thanks so much for sharing! Remarkable seems to have burned their third-party dev site, so starting out doing homebrew dev for it has gotten a lot more challenging, to say the least…

1 Like

IFTF isn’t really in charge of that. If all the interested people get together and say “This is the 1.2 spec”, I can help post it on the Z-spec web site.

2 Likes

Thanks @Dannii, I didn’t know the spec was on Github. I will surely report any ambiguous or contradictory bits of the spec I find there.

I think when it came to revising the spec, I was thinking more along the lines of a “bugfix” revision of corrections/clarifications as opposed to adding new features —it looks like the community had more of the latter in mind in terms of the v1.2 that was being drafted. Maybe I am thinking more of a “bugfix” v1.1.1 version of the spec :slight_smile: instead. It’s interesting to see what extensions have been considered though…

Yeah the version number of the spec refers to the features it specifies. But the spec can be updated without increasing the version number when it’s just fixing errata. In that case just the date would be changed.

2 Likes

Makes sense, thank you for clearing that up for me.

If it supports Remarkable 2 (the model I have)

It does! The hobbyist community has done a pretty good job keeping things working across both models. The github has installation instructions, but going via https://toltec-dev.org/ is definitely simplest. Feel free to ping me here or on github if you run into issues. (The community discord is also extremely helpful!)

I can’t believe I missed this when doing my initial research into seeing if someone had made one already…

Anywhere particular you were looking? I haven’t done a great job advertising but happy to scatter more links around for future searchers.

1 Like

Google, Github —those were the main ones. Pretty sure I used search terms like “Z-machine Remarkable” and “Zork Remarkable”.

Maybe you could add some topics to your Github repo (found in the “about” menu on the main repo page) and it might improve search engine indexability?

I think I’m deffo gonna try Toltec out…

Very wise; done.

Toltec is definitely worthwhile; makes everything else easier.

FWIW, I strongly suggest setting up a SSH key before you do any serious modification to the tablet; it’ll help make sure you keep access to the tablet even if something else gets messed up.)

1 Like