HOME

TheInfoList



OR:

The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank 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. 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 The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
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 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 ...
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 In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs th ...
(called Zilch) that Infocom used to produce its story files has never been released, although documentation of the language used (, a Lisp-family language similar to MDL) still exists, and an open-source replacement has been written. After Mediagenic 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 Graham A. Nelson (born 1968) is a British mathematician, poet, and the creator of the Inform design system for creating interactive fiction (IF) games. He has authored several IF games, including '' Curses'' (1993) and '' Jigsaw'' (1995). Educa ...
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 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 Interpreting is a translational activity in which one produces a first and final target-language output on the basis of a one-time exposure to an expression in a source language. The most common two modes of interpreting are simultaneous inter ...
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-mol ...
, TRS-80, and , and grouping "Unix" and "Windows" as one each), 10 mobile operating systems (including
Palm OS Palm OS (also known as Garnet OS) was a mobile operating system initially developed by Palm, Inc., for personal digital assistants (PDAs) in 1996. Palm OS was designed for ease of use with a touchscreen-based graphical user interface. It is provi ...
and the
Game Boy The is an 8-bit fourth generation handheld game console developed and manufactured by Nintendo. It was first released in Japan on April 21, 1989, in North America later the same year, and in Europe in late 1990. It was designed by the same tea ...
), 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 An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
, 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 Binary may refer to: Science and technology Mathematics * Binary number, a representation of numbers using only two digits (0 and 1) * Binary function, a function that takes two arguments * Binary operation, a mathematical operation that ta ...
files are available for several different operating systems, 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. Th ...
, 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 iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also includes ...
. 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 In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fr ...
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 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 Lucasfilm Games (known as LucasArts between 1990 and 2021) is an American video game licensor that is part of Lucasfilm. It was founded in May 1982 by George Lucas as a video game development group alongside his film company; as part of a large ...
, a graphical system similar to Z-machine *
TADS Text Adventure Development System (TADS) is a prototype-based domain-specific programming language and set of standard libraries for creating interactive fiction (IF) games. History The original TADS 1 was released by High Energy Software a ...
– 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 Magnetic Scrolls was a British video game developer active between 1984 and 1990. A pioneer of audiovisually elaborate text adventure games, it was one of the two largest and most acclaimed interactive fiction developers of the 1980s. ''Magneti ...
' 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