Nitfol
   HOME

TheInfoList



OR:

The Z-machine is a virtual machine that was developed by Joel Berez and
Marc Blank Marc Blank is an American game developer and software engineer. He is best known as part of the team that created one of the first commercially successful text adventure computer games, ''Zork''. Career Blank first encountered Don Woods and Will ...
in 1979 and used by
Infocom Infocom was an American software company based in Cambridge, Massachusetts, that produced numerous works of interactive fiction. They also produced a business application, a relational database called ''Cornerstone (software), Cornerstone''. ...
for its
text adventure games '' Interactive fiction, often abbreviated IF, is software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives, either in the f ...
. Infocom compiled game code to files containing Z-machine instructions (called story files or Z-code files) and could therefore port its text adventures to a new platform simply by writing a Z-machine implementation for that platform. With the large number of incompatible home computer systems in use at the time, this was an important advantage over using native code or developing a compiler for each system.


History

The "Z" of Z-machine stands for Zork, Infocom's first adventure game. Z-code files usually have names ending in .z1, .z2, .z3, .z4, .z5, .z6, .z7, or .z8, where the number is the version number of the Z-machine on which the file is intended to be run, as given by the first byte of the story file. This is a modern convention, however. Infocom itself used extensions of .dat (Data) and .zip (ZIP = Z-machine Interpreter Program), but the latter clashed with the widespread use of .zip for PKZIP-compatible archive files starting in the 1990s, after Activision closed Infocom. Infocom produced six versions of the Z-machine. Files using versions 1 and 2 are very rare. Only two version 1 files are known to have been released by Infocom and only two of version 2. Version 3 covers the majority of Infocom's released games. Later versions had more capabilities, culminating in some graphic support in version 6. The compiler (called Zilch) that Infocom used to produce its story files has never been released, although documentation of the language used (, a
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
-family language similar to
MDL MDL may refer to: Computing * Fayyad & Irani's MDL method, a discretization method * MDL (programming language), derived from LISP * The extension for Valve's Source, Source 2 and ID Software's IDTech game engines proprietary model file format * ...
) still exists, and an open-source replacement has been written. After
Mediagenic Activision Publishing, Inc. is an American video game publisher based in Santa Monica, California. It serves as the publishing business for its parent company, Activision Blizzard, and consists of several subsidiary studios. Activision is one o ...
moved Infocom to California in 1989, ''
Computer Gaming World ''Computer Gaming World'' (CGW) was an American computer game magazine published between 1981 and 2006. One of the few magazines of the era to survive the video game crash of 1983, it was sold to Ziff Davis in 1993. It expanded greatly through ...
'' stated that "ZIL ... is functionally dead", and reported rumors of a "completely new parser that may never be used". In May 1993, Graham Nelson released the first version of his Inform compiler, which also generates Z-machine story files as its output, even though the Inform source language is quite different from ZIL. Inform has become popular in the
interactive fiction '' Interactive fiction, often abbreviated IF, is software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives, either in the ...
community. A large proportion of interactive fiction is in the form of Z-machine story files. Demand for the ability to create larger game files led Nelson to specify versions 7 and 8 of the Z-machine, though version 7 is rarely used. Because of the way addresses are handled, a version 3 story file can be up to 128K in length, a version 5 story can be up to 256K in length, and a version 8 story can be up to 512k in length. Though these sizes may seem small by today's computing standards, for text-only adventures, these are large enough for elaborate games. During the 1990s, Nelson drew up a Z-Machine Standard based on detailed studies of the existing Infocom files.


ZIL (Zork Implementation Language)

Here's what the definition of Zork I's brass lantern looks like:


Interpreters

Interpreters for Z-code files are available on a wide variety of platforms. The Inform website lists links to freely available interpreters for 15 desktop operating systems (including 8-bit microcomputers from the 1980s such as the
Apple II The Apple II (stylized as ) is an 8-bit home computer and one of the world's first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak; Jerry Manock developed the design of Apple II's foam-m ...
, TRS-80, and , and grouping "Unix" and "Windows" as one each), 10 mobile operating systems (including Palm OS and the Game Boy), and four interpreter platforms (Emacs, Java, JavaScript, and Scratch). According to Nelson, it is "possibly the most portable virtual machine ever created". Popular interpreters include Nitfol and Frotz. Nitfol makes use of the Glk API, and supports versions 1 through 8 of the Z-machine, including the version 6 graphical Z-machine. Save files are stored in the standard
Quetzal Quetzals () are strikingly colored birds in the trogon family. They are found in forests, especially in humid highlands, with the five species from the genus ''Pharomachrus'' being exclusively Neotropical, while a single species, the eared quet ...
save format. Binary files are available for several different
operating systems An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also inc ...
, including the
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The ...
, Unix-like systems, DOS, and Windows. Frotz was written in C by Stefan Jokisch in 1995 for DOS. Over time it was ported to other platforms, such as Unix-like systems, RISC OS, and iOS. Sound effects and graphics were supported to varying degrees. By 2002, development stalled and the program was picked up by David Griffith. The code base was split between virtual machine and user interface portions in such a way that the virtual machine became independent from any user interface. This allowed more variety in porting Frotz. One of the stranger ports is also one of the simplest: an instant messaging
bot Bot may refer to: Sciences Computing and technology * Chatbot, a computer program that converses in natural language * Internet bot, a software application that runs automated tasks (scripts) over the Internet **a Spambot, an internet bot des ...
is wrapped around a version of Frotz with the minimum I/O functionality creating a bot with which one can play most Z-machine games using an instant messaging client. Another popular client for macOS and other Unix-like systems is Zoom. It supports the same
Quetzal Quetzals () are strikingly colored birds in the trogon family. They are found in forests, especially in humid highlands, with the five species from the genus ''Pharomachrus'' being exclusively Neotropical, while a single species, the eared quet ...
save-format, but the packaging of the file-structure is different.


See also

*
Glulx Glulx is a 32-bit portable virtual machine intended for writing and playing interactive fiction. It was designed by Andrew Plotkin to relieve some of the restrictions in the venerable Z-machine format. For example, the Z-machine provides native ...
– Similar to the Z-machine, but relieves several legacy limitations * Inform – A computer language that can produce Z-machine programs * SCUMM – Script Creation Utility for Maniac Mansion by LucasArts, a graphical system similar to Z-machine * TADS – Like Glulx, made to address some of its limitations *
Motorola 68000 series The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and w ...
– The base architecture used for virtual machines in Magnetic Scrolls' adventure games


References


External links


The Z-Machine standards document
* (PDF) is the Infocom ZIL manual from 1989 * (PDF) the Z-Language Interpreter Program (Infocom Internal Document) from 1989

describes the creation and design of the Z-machine {{Video game engines , state=autocollapse Interactive fiction Virtual machines Text adventure game engines Infocom