Z-code

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m (Sample Files)
m (Change telparia.com samples link to template)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Description ==
+
{{FormatInfo
 +
|formattype=electronic
 +
|subcat=Interactive Fiction
 +
|extensions={{ext|z1}} {{ext|z2}} {{ext|z3}} {{ext|z4}} {{ext|z5}} {{ext|z6}} {{ext|z7}} {{ext|z8}} {{ext|dat}} {{ext|zip}}
 +
}}
 +
'''Z-code''' is an [[Interactive Fiction]] (IF) file format. A Z-code file contains a series of instructions for the Z-machine, a virtual machine designed by Infocom. A Z-code file typically contains an IF game which can be played using a Z-code interpreter. It is sometimes referred to as Infocom format. There are eight versions of Z-code. The first six were created by Infocom, while versions 7 and 8 were created by Graham Nelson, the author of [[Inform]]. Version 6 supports sound and images.
  
Z-code is an [[Interactive Fiction]] (IF) file format. A Z-code file contains a series of instructions for the Z-machine, a virtual machine designed by Infocom. A Z-code file typically contains an IF game which can be played using a Z-code interpreter. It is sometimes referred to as Infocom format. There are eight versions of Z-code. The first six were created by Infocom, while versions 7 and 8 were created by Graham Nelson, the author of [[Inform]]. Version 6 supports sound a images.
+
Infocom games were developed in the higher-level language [[ZIL]], which was compiled into Z-code using a compiler that's apparently lost now.
 +
 
 +
Text within a Z-code file is represented using the specialized character encoding [[ZSCII]], a variant of [[ASCII]] that is encoded for compactness and a bit of obscurity (nothing resembling normal ASCII strings is visible in a raw dump of a file, making it harder to cheat in games by seeing descriptions this way).
  
 
Z-code files can be packaged in [[Blorb]] container files along with other resources needed for the game, such as images and sounds.
 
Z-code files can be packaged in [[Blorb]] container files along with other resources needed for the game, such as images and sounds.
Line 17: Line 24:
 
** [https://itunes.apple.com/au/app/frotz/id287653015?mt=8 iPhone version]
 
** [https://itunes.apple.com/au/app/frotz/id287653015?mt=8 iPhone version]
 
* Gargoyle (cross-platform, open source, [http://ccxvii.net/gargoyle/ website]): can interpret multiple IF formats, including Z-code
 
* Gargoyle (cross-platform, open source, [http://ccxvii.net/gargoyle/ website]): can interpret multiple IF formats, including Z-code
* Parchment (web, open source, [https://code.google.com/p/parchment/ website]): browser-based Z-code interpreter.
+
* GLUZMA ([[Glulx]], open source; big-endian ZIP only)
 +
* Parchment (web, open source, [https://github.com/curiousdannii/parchment website]): browser-based Z-code interpreter.
 
* Spatterlight (Mac OS X, open source, [http://ccxvii.net/spatterlight/ website]): can interpret multiple IF formats, including Z-code
 
* Spatterlight (Mac OS X, open source, [http://ccxvii.net/spatterlight/ website]): can interpret multiple IF formats, including Z-code
* Twisty (Android, open source, [https://code.google.com/p/twisty/ website], [https://play.google.com/store/apps/details?id=com.google.code.twisty Google Play])
+
* Twisty (Android, open source, [https://bitbucket.org/sussman/twisty website], [https://play.google.com/store/apps/details?id=com.google.code.twisty Google Play])
 
* Zoom (Mac OS X and Unix-like, open source, [http://www.logicalshift.co.uk/unix/zoom/ website]) can interpret multiple IF formats, including Z-code.
 
* Zoom (Mac OS X and Unix-like, open source, [http://www.logicalshift.co.uk/unix/zoom/ website]) can interpret multiple IF formats, including Z-code.
 +
* ZORKMID (cross-platform, open source, written in C, include debugging functionality; ZIP only, supports big-endian and small-endan story files)
  
 
The IF Archive contains many other interpreters:
 
The IF Archive contains many other interpreters:
Line 31: Line 40:
 
* [http://ifarchive.org/indexes/if-archiveXinfocomXcompilers.html IF Archive: Z-code compilers]
 
* [http://ifarchive.org/indexes/if-archiveXinfocomXcompilers.html IF Archive: Z-code compilers]
 
* [http://ifarchive.org/indexes/if-archiveXinfocomXtools.html IF Archive: Z-code tools]
 
* [http://ifarchive.org/indexes/if-archiveXinfocomXtools.html IF Archive: Z-code tools]
 +
* [https://github.com/athornton/gnusto-frotz-tops20 Run Z-code games on PDP-10 with TOPS-20]
  
 
== Sample Files ==
 
== Sample Files ==
Line 36: Line 46:
 
* [http://ifarchive.org/if-archive/games/zcode/SoFar.z8 SoFar.z8]: So Far, by Andrew Plotkin
 
* [http://ifarchive.org/if-archive/games/zcode/SoFar.z8 SoFar.z8]: So Far, by Andrew Plotkin
 
* [http://mirror.ifarchive.org/if-archive/games/zcode/zdungeon.z5 zdungeon.z5]: Zork, by Infocom
 
* [http://mirror.ifarchive.org/if-archive/games/zcode/zdungeon.z5 zdungeon.z5]: Zork, by Infocom
 +
* {{DexvertSamples|document/zcode}}
  
 
== Information ==
 
== Information ==
 +
* [http://www.ifwiki.org/index.php/Z-machine IFwiki: Z-machine]
 
* [http://www.inform-fiction.org/zmachine/standards/z1point0/index.html The Z-Machine Standards Document (version 1)], by Graham Nelson
 
* [http://www.inform-fiction.org/zmachine/standards/z1point0/index.html The Z-Machine Standards Document (version 1)], by Graham Nelson
 
** [http://ifarchive.org/if-archive/infocom/interpreters/specification/ZMachineSpec-1.0.zip PDF version, zipped]
 
** [http://ifarchive.org/if-archive/infocom/interpreters/specification/ZMachineSpec-1.0.zip PDF version, zipped]
 +
 +
Infocom documentation:
 +
* [http://zzo38computer.org/backup/zspec/zip_old.txt ZIP]
 +
* [http://zzo38computer.org/backup/zspec/zip.txt EZIP/XZIP]
 +
* [https://web.archive.org/web/20120309172205/http://xlisp.org/zip.pdf YZIP]
 +
 +
[[Category:Executables]]
 +
[[Category:Programming Languages]]
 +
[[Category:Infocom]]

Latest revision as of 04:07, 28 December 2023

File Format
Name Z-code
Ontology
Extension(s) .z1 .z2 .z3 .z4 .z5 .z6 .z7 .z8 .dat .zip

Z-code is an Interactive Fiction (IF) file format. A Z-code file contains a series of instructions for the Z-machine, a virtual machine designed by Infocom. A Z-code file typically contains an IF game which can be played using a Z-code interpreter. It is sometimes referred to as Infocom format. There are eight versions of Z-code. The first six were created by Infocom, while versions 7 and 8 were created by Graham Nelson, the author of Inform. Version 6 supports sound and images.

Infocom games were developed in the higher-level language ZIL, which was compiled into Z-code using a compiler that's apparently lost now.

Text within a Z-code file is represented using the specialized character encoding ZSCII, a variant of ASCII that is encoded for compactness and a bit of obscurity (nothing resembling normal ASCII strings is visible in a raw dump of a file, making it harder to cheat in games by seeing descriptions this way).

Z-code files can be packaged in Blorb container files along with other resources needed for the game, such as images and sounds.

Contents

[edit] Extensions

  • .z1 - .z8 (current convention, depending on what Z-code version the file is)
  • .DAT (used by Infocom for most of their commercial releases)
  • .ZIP (rarely seen, conflicts with the common extension used for ZIP compression)

[edit] Interpreters

A z-code game can be played on any platform that has an appropriate interpreter. Most interpreters can handle any Z-code version, although version 6 is not as widely supported as the other versions.

  • Frotz (cross-platform, open source, website)
  • Gargoyle (cross-platform, open source, website): can interpret multiple IF formats, including Z-code
  • GLUZMA (Glulx, open source; big-endian ZIP only)
  • Parchment (web, open source, website): browser-based Z-code interpreter.
  • Spatterlight (Mac OS X, open source, website): can interpret multiple IF formats, including Z-code
  • Twisty (Android, open source, website, Google Play)
  • Zoom (Mac OS X and Unix-like, open source, website) can interpret multiple IF formats, including Z-code.
  • ZORKMID (cross-platform, open source, written in C, include debugging functionality; ZIP only, supports big-endian and small-endan story files)

The IF Archive contains many other interpreters:

[edit] Other Tools

[edit] Sample Files

[edit] Information

Infocom documentation:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox