.TH xzip 6
xzip \- X Interface to the Z-code Interpreter
.I options ...
The list of options is described below. The
should be the filename of a Z-code file or a PICKLE archive containing
a Z-code file.
is a clean X Windows interface to games written in Infocom's Z-code
game format. It handles Z-code versions 1 through 5, plus the newer
The interface is heavily (well, completely) based on ATK, an X toolkit
developed at CMU. Really, I would have preferred to actually do this in
ATK...\& except that then you'd need ATK to run it, and that's 50
of source code. (Honest.) So I just did an imitation.
.SH Mouse Commands
In the text window:
to move the dot to the mouse location.
to select a large region.
to extend the selection to the mouse location.
selects a word (or extends the selection one word at
In the scroll bar:
.B Left-click on the arrows
to scroll to the top or bottom.
.B Right-click on the arrows
to scroll up or down one line.
.B Click-and-drag on the elevator
will scroll up and down smoothly.
.B Left-click in the bar (without dragging)
will scroll down by an amount controlled by where in the bar you click. The farther down the bar, the more it scrolls. This is computed so that if you left-click next to a line, that line scrolls to the top of the screen.
.B Right-click in the bar (without dragging)
will scroll up in a similar manner. The top line will scroll down to where you clicked.
.SH Key Commands
The key commands will be familiar to Emacs users.
combinations can be used either by holding down the
key (possibly labelled
or something else) or by pressing
before the desired key.
The commands listed below are the defaults. They can be customized
X resource (see below.) <none> indicates a function which by default
is not bound to any key.
Move dot forward one character.
Move dot backward one character.
Move dot forward one word.
Move dot backward one word.
Move dot to beginning of line.
Move dot to end of line.
.B PageDown, ctrl-v
Scroll down one page.
.B PageUp, meta-v
Scroll up one page.
Delete character before the dot.
Delete character after the dot.
Delete word before the dot.
Delete word after the dot.
Cut selection to cut buffer.
Copy selection to cut buffer.
Copy the cut buffer in at the dot.
Cut from dot to end of line into the cut buffer.
Cut all text typed so far into the cut buffer.
.B UpArrow, meta-=
Move back one line in command history buffer.
.B DownArrow, meta-`
Move back one line in command history buffer.
Insert a macro string at the dot. By default, all macros are undefined at startup, but you can change this with the
The next macro key hit will be redefined to be the selection. If there is no selection, or if the next key hit is not a macro key, an error is displayed.
Redraw text and status windows.
Redraw status window.
Redraw text window.
Expand status window to maximum size (only when the
option is on.)
Shrink status window to minimum size (only when the
option is on.)
Clear any extra text below the status line in the status window.
.B Enter, Return
Accept the text that has been typed.
Set escape mode; next key hit will be taken as a
Cancel escape mode, and anything else that's going on.
.B Help, ctrl-_
Explain the next key hit; this displays the function that the key is bound to, and its argument, if any.
.B All normal keys
Insert whatever key is bound to this at the dot.
Do nothing. Bind a key to this to disable it.
.SH Resources and Options
All the behavior of
is controlled by X resources and command-line options. Any particular behavior can be set with either a resource or an option; options override resources.
Command-line options go on the command line, looking like,
.I xzip \-option value gamefile
Note that even binary options like "justify" must be given a value, "yes" or "no".
Resources are usually placed in your
file, depending on your system setup. They have the format
.I xzip.resourcename: value
These are the resources and options that you can currently set. The default values are in italics.
.IP "\fBgeometry: \fI500x600+100+100\fR"
The geometry of the text window, in the usual X geometry format.
.IP "\fBstatgeometry: \fI80x24+100+50\fR"
The geometry of the status window. Note that the size is given in characters, not in pixels, although the position is still in pixels. This makes it something of a pain to position it in the right or bottom sides of the screen.
.IP "\fBforeground: \fIblack\fR"
The color of the text and other window decorations.
.IP "\fBbackground: \fIwhite\fR"
The color of the window background.
.IP "\fBgreycolor: \fIgrey60\fR"
An intermediate color, used for the scroll bar on color displays.
.IP "\fBjustify: \fIyes\fR"
If "yes", full-justify the text in the text window.
.IP "\fBmarginx: \fI4\fR"
Width (in pixels) of the margin between the left edge of the text and the scroll bar.
.IP "\fBleading: \fI3\fR"
Width (in pixels) of extra space to put between lines of text.
.IP "\fBautoresize: \fIyes\fR"
If "yes", the status window will automatically resize to be just big enough for the game's status line. (But see "Quirks", below.)
.IP "\fBresizeupward: \fIno\fR"
If "no", the status window will resize downward; the top edge will stay in place, and the bottom edge will move. If "yes", it will resize upward. At the moment, this doesn't work very well at all. (See "Known Bugs", below.)
.IP "\fBautoclear: \fIyes\fR"
If "yes", extraneous text in the status window will be cleared after one turn. (See "Quirks", below.)
.IP "\fBhistory: \fI20\fR"
The number of commands to store in the command history.
.IP "\fBbuffer: \fI4000\fR"
The amount of text (in characters) to keep in the scrollback buffer. If this is made too large, the program can become very slow.
.IP "\fBstrictz: \fI1\fR"
The level of reporting of various subtle errors in the game file. 0 means that all errors are silently ignored; 1 (the default) means that each error is reported, but only the first time it occurs; 2 means that each error is reported every time it occurs; 3 means that the interpreter will shut down immediately when an error occurs.
.IP "\fBspec: \fIno\fR"
If "yes", the interpreter will declare itself to be compliant with the Z-machine Specification version 1.0. This is, basically, a lie, since I have not formally reviewed the source for Spec-1.0 compliance. However,
does support every Spec-1.0 feature that I know of, except for the color and Unicode options.
.IP "\fBinputstyle: \fIb\fR"
The style to display your typed input in. This can be
for normal text, or
.I r, b, rb, i,
.I ri, bi, rbi, f,
.I rf, bf, rbf, if,
.I rif, bif, rbif
to specify any combination of Reverse, Bold, Italic, and Fixed. Note that the letters must be in the order shown; you cannot use
to specify italic and bold.
.IP "\fBX-color: \fI (same as foreground)\fR"
X may be any of
.I n, r, b, rb,
.I i, ri, bi, rbi,
.I f, rf, bf, rbf,
.I if, rif, bif, rbif.
This allows you to specify the color of any of the sixteen fonts used by
For non-reversed fonts, this is the color of the text; for reversed fonts, it is the color of the field on which the text is displayed. (The text of reversed fonts is always in the background color.)
.IP "\fBX-font: \fI\fR"
X may be any of
.I n, b, i, bi,
.I f, bf, if, bif.
This allows you to specify the sixteen fonts used by
(Note that you cannot set the reversed fonts; they always use the same font as their non-reversed counterparts.)
The status window always uses the fixed-width fonts; the text window usually (but not always) uses proportional fonts.
.IP "\fBbindings: \fI(see above)\fR"
Key bindings to supplement or override the default bindings. The resource should look like
.I key=function [, "argument"];
.I key=function [, "argument"] ...\&
is the name of a key, preceded by
to indicate a control key and
to indicate a meta key.
should be one of the function names listed in parentheses in the "Key Bindings" section.
(which is optional) should be a quoted string which will be passed to the function. Currently, only the
function takes an argument.
So, for example,
.I xzip.bindings: c-x=kill-input; m-i=macro,"inventory"; m-d=no-op
would mean that
will delete all input, and
will enter the string "inventory", and
will do nothing. You can have more than one key bound to a function, but you can only have one function bound to a key; later bindings will override earlier ones.
Ok, I lied; there's one behavior which is set by an environment variable. If you set INFOCOM_PATH to a directory or colon-separated list of directories,
will look there for a story file if it doesn't find it in the current directory.
As always, if you highlight colored text, the result may be surprising. Highlighting "normal" text will be fine, and any other fonts which are the same color, but other colors may highlight in strange ways, and could be hard to read. (This is only a problem for text which is highlighted because it's selected. Text in a reverse font looks correct.)
Certain games (notably
.IR Curses! )
display pop-up windows, by using the status line in a slightly funky way. They expand the status line, display some text, and then immediately shrink the status line again.
I have done my best to support this in
\'s two-window system. The pop-up window will be visible from when it is created until the first time you hit
Then the status window will shrink again. This gives you one "turn" to read the pop-up, which should be sufficient. (In one-window, non-scrolling interpreters, the pop-up appears over your old text, and scrolls away as you continue play.)
If you turn off the
option, pop-ups will not be erased; use
to expand the status window and read them after the window shrinks, and
to erase them manually. If you do not erase the pop-up, a later pop-up may partially overwrite it, which looks ugly.
If you turn off the
option, the status window will not shrink, but the pop-up will still be erased (unless you have turned off
.SH Known Bugs
The "resizeupward" preference just plain doesn't work. If you use it, the status window will slowly drift downwards as it resizes.
If a timed input (such as
uses) expires while you are editing a line, the dot jumps to the end of the line.
If a style change occurs in the middle of a word,
thinks it's okay to break the word there (when wrapping lines.)
Reverse text has gaps in it in full-justified lines. It also has gaps between lines, in the text window.
The keybindings are ignored while
is waiting for a single keystroke (as opposed to a line of input.)
is hardwired to work, but any other key will just be taken literally.
Scrolling is slow and awful on X servers without backing store.
Ignores meta modifier on special keyboard keys (Home, PageUp, etc)
Parsing of keys in bindings could be cleverer. It ought to understand /123 octal notation at least.
Ought to have separate font and color prefs for the status window.
Sometimes makes you place a window by hand, even though the geometry is specified.
X interface by Andrew Plotkin (firstname.lastname@example.org)
The Z-code engine is taken from ZIP V2.0.7 by Mark Howell (email@example.com)
For more information, see the web page:
You are expressly forbidden to use this program on an Infocom game data file
if, in so doing, you violate the copyright notice supplied with the original
Parts of this program (the files xinit.c, xio.c, xkey.c, xmess.c, xstat.c, xtext.c) are copyrighted by Andrew Plotkin. These files may be distributed, modified, and used freely, with the exception noted above.
I do not know the exact copyright status of the rest, except that it was written by Mark Howell and thus is probably copyrighted by him. He released it for free, so to the best of my knowledge, it can also be distributed, modified, and used freely, with the exception noted above.