Z-machine version 6

Version 6 of the Z-machine is significantly different to all other versions. It adds graphics capabilities, but unfortunately, these are largely incompatible with Glk. As a result, version 6 of the Z-machine is not properly supported.

With that in mind, since the pool of existing V6 games is so small (Zork Zero, Shogun, Journey, and Arthur), it’s possible to special-case a lot of the graphics support for them. This deviates some from the normal operation, which is to treat games as a black box, simply executing their code without knowing or caring what game it is; but the result is playable V6 games which are a decent approximation of how they’re supposed to look and act.

This approach works, generally, because the games do predictable things with graphics in ways that can mostly be implemented in Glk. Instead of following the game’s instructions for graphics drawing, Bocfel will detect when and which graphics are being used, and draw things where it “knows” they’re supposed to be. On the other hand, the game’s input is used in some cases as well, so in the end, it’s a combination of listening to the game where that works, and overriding the game where necessary.

All version 6 Infocom games are generally complete in the sense that they can be played through without major problems.

One notable defect is in menus (e.g. the start of Shogun, or hint menus): these do not display properly although you can muddle through them well enough. In addition, in Journey, the input window gets jumbled up sometimes, and can be fixed with a refresh (F6).

To get graphics in these games, you will need Blorb files. The original Infocom games did not use Blorb, but the graphics have been converted to the Blorb format by Kevin Bracey. Moreover, the special-casing for version 6 games only applies to one version of each game; specifically, the versions of the games which the Blorb files reference. These are:

  • Zork Zero: 393-890714
  • Shogun: 322-890706
  • Journey: 83-890706
  • Arthur: 74-890714

Zork Zero and Arthur have some images which adapt their palette to the colors on the screen. Blorb handles this with its adapative palette chunk. This chunk requires that interpreters modify a PNG file’s palette on the fly, which Glk does not support, as it does not provide direct access to the images. Instead, Bocfel has support for the adaptive palette chunk via modified Blorb files:

These Blorb files are fully backward compatible, so will work with other interpreters, and can be used as drop-in replacements for existing Blorb files.

Finally, most testing has been done with interpreter number 1. Other interpreter numbers might work just as well, or might not. If there are defects with specific interpreter numbers, feel free to leave a bug report.

In addition to Infocom games, Brian Howarth’s Mysterious Adventures games were converted to version 6 Z-code by Colin Davies, and include graphics support. Bocfel also has special-cased support for these games. Aldo Cumani also converted these games to Z-code, with graphics drawn directly by the game instead of through Blorb files. These are unsupported.