Z-machine: Difference between revisions

From IFWiki

(Add GLUZMA and ZORKMID. Remove Berzio.)
(Adding the content from the Z-code page in anticipation of turning it into a redirect page)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
This article is licensed under the [http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License]. It uses material from the [http://en.wikipedia.org/wiki/Z-machine Wikipedia article "Z-machine"].
{{Architecture
----
|What=Storyfile format
|Author=Joel Berez, Marc Blank
|Home page=https://www.inform-fiction.org/zmachine/
|Development website=https://github.com/iftechfoundation/Z-Machine-Standard
|Formally specified=Yes
|Version=1.1
|Date=2014/02/24
|File extension=.z3, .z4, .z5, .z6, .z8, .zblorb, .zlb
|MIME type=application/x-zmachine
}}
This [[virtual machine]] was developed in 1979 by [[Infocom]]. Games were written in [[ZIL]] (Zork Implementation Language, [[Zork I]] being Infocom's first game). They were then compiled using [[Zilch]] to "story files" which contained Z-machine instructions. Z-code is the byte code and data file format used by the Z-machine, so the story files are often called "Z-code files". These files could be run on any platform for which a Z-machine/Z-code interpreter existed. Zilch was never released but documentation for ZIL does exist.


==History==
Infocom produced six [[Z-machine versions]], with later versions having greater capabilities. The release of the [[Inform]] authoring system by [[Graham Nelson]] in May 1993 led to many more games being in Z-code format, and also led to the specification of two further Z-machine versions. The file extensions used now are .z1, .z2, .z3, .z4, .z5, .z6, .z7 and .z8. The demands of larger Inform games eventually led to the [[Glulx]] virtual machine being designed.
 
The '''Z-machine''' is a [[virtual machine]] that was developed by [[Joel Berez]] and [[Marc Blank]] in 1979 and used by [[Infocom]] for its [[interactive fiction|text adventure games]]. Infocom compiled game code to files containing Z-machine instructions (called story files, or '''Z-code''' files), and could therefore port all 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.
 
The [[compiler]] (called [[Zilch]]) which Infocom used to produce its story files has never been released, although documentation of the language used (called [[ZIL]], for Zork Implementation Language) is still in existence.
 
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 (and occasionally .dat), where the number is the [[Z-machine versions|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.
 
Infocom produced six [[Z-machine versions|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. The later versions had more capabilities, culminating in some graphic support in version 6.
 
==Inform==
 
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 since become very popular in the [[interactive fiction]] community and, as a consequence, a large proportion of the interactive fiction now produced is in the form of Z-machine story files. Demand for the ability to create larger game files led [[Graham Nelson]] to specify versions 7 and 8 of the Z-machine, though version 7 is very 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 very elaborate games made with [[Inform 6]]. [[Inform 7]], however, has larger demands: only very small games written in pre-6G60 versions of I7 will fit in a .z5, and moderately large games may exceed the capacities of .z8, especially those compiled in recent versions of I7 or utilizing images or sounds. This has contributed to a more widespread adoption of [[Glulx]], which has much greater capacity.


==Assorted Z-machine interpreters==
==Assorted Z-machine interpreters==
Line 36: Line 32:
* [[Jzip]] (UNIX/DOS)
* [[Jzip]] (UNIX/DOS)
* [[Leaflet]] (Flash, proprietary)
* [[Leaflet]] (Flash, proprietary)
* [[M4ZVM]] (Trs-80)
* [[MaxZip]] (OS9)
* [[MaxZip]] (OS9)
* [[Muttonate]] (Javascript)
* [[Muttonate]] (Javascript)
Line 42: Line 39:
* [[Parchment]] (HTML, includes [[Gnusto]])
* [[Parchment]] (HTML, includes [[Gnusto]])
* [[Rezrov]] (Perl)
* [[Rezrov]] (Perl)
* [[Vezza]] (CP/M)
* [[XZip]] (*nix/X-Windows)
* [[XZip]] (*nix/X-Windows)
* [[Zax]] (Java/application only)
* [[Zax]] (Java/application only)
Line 59: Line 57:
* [[Zilch]]
* [[Zilch]]
* [[ZILF]]/[[ZAPF]]
* [[ZILF]]/[[ZAPF]]
* [[dialogc]]


==See also==
==See also==
* [[Z-machine versions]]
* [[Z-machine versions]]
* For works of interactive fiction using Z-code, see [[Z-code works]].


==Links==
==Links==
 
*[https://en.wikipedia.org/wiki/Z-machine Wikipedia: Z-machine]
*[http://www.gnelson.demon.co.uk/zspec/ Graham Nelson's Z-Machine standards document]
*[https://web.archive.org/web/20131204205854/http://www.gnelson.demon.co.uk/zspec/ Graham Nelson's Z-Machine standards document]
*[http://hansprestige.com/inform/zmachine_versions.html Summary of Z-machine version differences]
*[http://hansprestige.com/inform/zmachine_versions.html Summary of Z-machine version differences]
*[http://www.mv.com/ipusers/xlisper/zil.pdf ZIL manual]
*[http://www.mv.com/ipusers/xlisper/zil.pdf ZIL manual]
Line 72: Line 72:




[[Category:Infocom]] [[Category:Inform]] [[Category:Interpreter]] [[Category:Glossary]] [[Category:Z-machine]]
[[Category:Infocom]] [[Category:Inform]] [[Category:Glossary]] [[Category:Z-machine| ]]
[[Category:Old interpreter lists]]

Latest revision as of 23:30, 3 March 2025

Z-machine
Storyfile format
Author Joel Berez, Marc Blank
Home page https://www.inform-fiction.org/zmac...
Development website https://github.com/iftechfoundation...
Formally specified Yes
Version 1.1
Date 2014/02/24
File extension .z3, .z4, .z5, .z6, .z8, .zblorb, .zlb
MIME type application/x-zmachine
Browse the architecture database
Edit this infobox


This virtual machine was developed in 1979 by Infocom. Games were written in ZIL (Zork Implementation Language, Zork I being Infocom's first game). They were then compiled using Zilch to "story files" which contained Z-machine instructions. Z-code is the byte code and data file format used by the Z-machine, so the story files are often called "Z-code files". These files could be run on any platform for which a Z-machine/Z-code interpreter existed. Zilch was never released but documentation for ZIL does exist.

Infocom produced six Z-machine versions, with later versions having greater capabilities. The release of the Inform authoring system by Graham Nelson in May 1993 led to many more games being in Z-code format, and also led to the specification of two further Z-machine versions. The file extensions used now are .z1, .z2, .z3, .z4, .z5, .z6, .z7 and .z8. The demands of larger Inform games eventually led to the Glulx virtual machine being designed.

Assorted Z-machine interpreters

Interpreters for Z-code files are available on a wide variety of platforms. In fact, since interpreters are available for a wide range of platforms - for example, on various old machines (such as the Apple II, TRS-80 and Sinclair), portable machines (such as Palm OS devices and the Nintendo Game Boy) and most modern platforms - it can be claimed that Z-code is one of the most portable computer languages ever invented.

The following is a list of various Z-Machine interpreters, but not all of these should be recommended for use now. For recommendations, see the FAQ.

Compilers targeting the Z-machine

See also

Links