How to play "Z-code" games
                      --------------------------


1. What format are .z3 and .z5 files in?
----------------------------------------

The adventure games in this directory are in the "Z-code" format (a
computer-independent abstract machine code), which was designed by
Infocom and used for all their adventure games from "Zork I" (the "Z" in
"Z-code" stands for "Zork") to "Shogun".  Infocom used 6 versions of the
format, but the most popular were "Standard" (version 3) and "Advanced"
(version 5), and these are the only formats in which you're likely to
find shareware or freeware games.

The extensions .z3 and .z5 mean that a file is a "Z-code" adventure game
in version 3 or version 5.  These files are not compressed, but are
ordinary binary files, and should be downloaded by FTP in 'binary' mode.

To play the games you will need a "Z-code interpreter program",
sometimes known as a "ZIP".  Do not confuse a "ZIP" with any of the
archiving and compression programs that have "zip" in their name, for
example "zip", "gzip" and "pkzip".

Another confusion to be avoided is that between Graham Nelson's game
"Curses" and the Unix screen-handling library "curses"!


2. Where do I go to get a Z-code interpreter program?
-----------------------------------------------------

These are ports of Mark Howell's "ZIP" interpreter and the
InfoTaskForce's "ITF" interpreter.  All are free of charge.

* Acorn Archimedes
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/itf/acorn7c.ddc

* Amiga
  Workbench 2:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/itf/itf401-160-amiga.lha

  Workbench 1.3:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/zip.lha

* Apple II GS
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/zipgs1.0a1.sea

* Apple Macintosh
  MaxZip can be used to build stand-alone applications:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/MaxZip-121.hqx

  The MacZeX interpreter can be used together with Inform to build
  Z-code games with fonts, centred titles, etc:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/
  macZeX.1.1.binary.sea.hqx

* Atari
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/atarizip.zoo

* IBM PC-compatibles running DOS
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/zip203.zip

  JZIP accepts version 8 files:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/jzpc201e.zip

* IBM PC-compatibles running OS/2
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/zip2.zip

* IBM PC-compatibles running Windows
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/winf_05.zip

* Psion 3
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/itf/psion7c.zip

* Other (Unix, VMS, etc)
  If you have a C compiler and a Unix-like interface to the screen
  (such as the 'termcap' library), then you can compile an interpreter
  from these portable sources:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/zip.sh.Z

  XZIP runs under the X Window System:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/xzip130.tar.Z

  JZIP accepts version 8 files, and its saved games are portable
  between machines:
  ftp://ftp.gmd.de/if-archive/infocom/interpreters/zip/jzip201e.zip


3. What if there's no interpreter for my machine?
-------------------------------------------------

All is not lost.  It may be that Infocom released their games for your
computer (their games were released for the TRS-80, the Apricot, the
Kaypro, the Texas Instruments TI 99/4a and many other old machines), so
if you can buy a second-hand copy of a game in version 3 or version 5,
then it will come with an interpreter for that version.  See the file
<ftp://ftp.gmd.de/if-archive/infocom/info/fact-sheet.txt> to find out
which games were in which versions.

The interpreter shipped with an Infocom game typically comes with the
name of its story file hard-wired into the interpreter; you will have to
change this to the name of the story file you want to play; for example,
if you have bought a copy of "Sherlock" (a version 5 game) and want to
play "Curses", edit the interpreter using a binary editor, search for
the string "SHERLOCK.DAT" (or whatever the story file is called on your
machine), and replace it with "CURSES.Z5\0XX" (the "\0" is meant to be a
zero byte to terminate the string, and the "X"s pad out the new string
to the same length as the previous string).

Alternatively, you could try porting one of the existing portable
interpreters to your machine, or writing a new one from scratch.  If you
attempt the latter, you'll need to read the "Z-code" Specification:
<ftp://ftp.gmd.de/if-archive/infocom/interpreters/Specification.tex>.


4. What do I do if I can't get these programs to work?
------------------------------------------------------

Try e-mailing the author of the program, or asking for help on the
Usenet newsgroup rec.games.int-fiction.


5. How do I write Z-code games?
-------------------------------

You need Graham Nelson's "Inform" compiler (Infocom's "ZILCH" compiler
was never made available to the public), which may be found in the
directory <ftp://ftp.gmd.de/if-archive/infocom/compilers/inform/>.


6. Is the Z-code format proprietary?
------------------------------------

No proprietary code is used in the portable interpreters, or in Graham
Nelson's "Inform" compiler; the format was decoded by painstaking
examination of Infocom's story files and interpreters.  The format
itself is not patented, so there should be no problems in using these
programs according to the terms of their licences.


7. What about .z7 and .z8 files?
--------------------------------

Versions 7 and 8 of the Z-machine are recent innovations (proposed by
Graham Nelson in June 1995).  Version 8 is the preferred one; it is
essentially the same as version 5 except that games can be twice as big
(up to 512k, instead of being restricted to 256k).  As of the time of
writing, no games use the format, and few interpreters support it.
Graham writes:

 At present versions 7 and 8 are not interpreted by the interpreters in
 public circulation.  This is, however, very easily fixed.  For
 instance, only one line needs to be added to Mark Howell's "Zip"
 interpreter to get V8 working.  Insert

     if (h_type == 8) { h_type=V5; story_scaler = 8; }

 into the configure() routine, immediately before the check to see
 whether or not h_type is in the legal range.

 Support for these new versions should percolate through the public
 domain in due course, since it's so easily coded.

If you find a version 8 game, and you can't play it with any interpreter
for your machine, try asking for advice on rec.games.int-fiction.


--
Gareth Rees, [email protected], October 1995

Thanks to Dorinda Hartman, Jeremy Lakatos and everyone else who's sent
me mail about interpreters on different systems.  If anything in the
above is incorrect or out of date, let me know.