Home Previous Next

Configuring Zoom: X-Windows

Under X-Windows, Zoom does not currently provide a graphical interface for configuration. Instead, you can configure Zoom by editting a .zoomrc file in your home directory, or a global zoomrc in /usr/local/share/zoom by default (this will be created when you install Zoom). It is probably advisable to copy this default file to your home directory and edit it rather than create a whole new file from scratch.

The .zoomrc file consists of a single default definition, followed by an optional number of definitions for individual games. Game definitions can override any option defined in the default defintion (so you can give a particular game different fonts, for example). However, this feature is most often used for setting the title of individual games to something more descriptive than the filename and serial number.

Each definition in the zoomrc file begins with a specifier that indicates which game it is for. This is of the form 'game "<title>" <serial numbers>'. The default definition is specified by 'default "<title>"'. The title can be any string you like - the default is "%s (%i.%.6s.%04x)" (this piece of magic tells Zoom to substitute in the filename and serial number of the game). Serial numbers have two forms: RELEASE.SERIAL (eg 23.020901 - most games display their release and serial numbers at startup) and RELEASE.SERIAL.CHECKSUM (eg 23.020901.6f94 - Zoom displays this form in its title bar when you use the default title). The advantage of the latter is that it is much more unlikely that any two games will have the same ID. If a game has multiple releases, you can specify multiple IDs by seperating them with commas.

The specifier may, optionally, be followed by a list of options enclosed in curly brackets ({}). A complete list of these follows:

interpreter <number>
Defines the interpreter number to report to the game. This doesn't make very much difference in most modern games, however, several Infocom games (especially version 6 ones) inspect this to guess the interpreter features. The numbers Infocom used are as follows:
revision <character>
Specifies the version of the interpreter to claim: Infocom conventionally used a letter for this purpose, and this is the format that Zoom accepts (for example, revision Z). Games usually just print this at the start and otherwise ignore it.
font <number> "<name>" <style>
There are three ways a font name can be specified under X-Windows: as a standard X font specifier; as path to an Adobe Type 1 font file and as the special string 'font3'. You can obtain an X font specifier using the xfontsel utility. Type 1 fonts are only available if Zoom was compiled with T1Lib support built in: the file name should be followed by a space and a number indicating the font size (in pixels) - ghostscript comes with a useful selection of type 1 fonts that can be used. 'font3' is a special font indicating that Zoom should use the 'symbolic' font 3 that it has built in. The 'style' parameter indicates for which display styles the font should be used. roman is the default style. The style can also be one, or a combination of, fixed, bold, italic and symbolic: combine styles with '-' - eg 'fixed-bold-italic'. You should provide at least roman and fixed fonts: there are a total of 16 possible styles, but most games only use the 'pure' styles rather than combinations.

The number should be unique for each font, counting from 1.

NOTE: Zoom will use Xft for font rendering if at all possible. This enables anti-aliasing, and also provides support for rendering Unicode. Zoom will, however, fall back to the standard X font system if Xft is not available for any reason. Any fixed pitch fonts should be specified as being the same size, and Type 1 fonts do not make good fixed-pitch fonts.

antialias <yes/no>
If you have XRender installed, or are using Type 1 fonts, Zoom will anti-alias its display by default. Setting this option to 'no' will turn off this feature (images are always anti-aliased, when a game features them). This will disable Xft rendering - note that this means that Zoom cannot render Unicode characters.
colours <colours>
The Z-Machine has 10 default colours - this option allows you to define them. Each colour is specified as a string of the form '(Red, Green, Blue)', wher Red, Green and Blue are numbers in the range 0 - 255. Colours are seperated with commas, and are defined starting with colour 0. You should provide at least the 8 standard colours. The Z-Machine colours are defined as follows:
size <x> , <y>
Specifies the size of the game window, in characters. The window will be created big enough to fit in x fixed-pitch characters across, and y down.
gamedir "<path>"
When Zoom is started up with no arguments, it will look in this directory to see if it can present a menu of games.
savedir "<path>"
Zoom will save and load games in the directory you specify here by default.
resources "<path>"
Some games require extra resources in the form of a Blorb file. This directive tells Zoom where to find these resources - if it is not specified, Zoom will check for a resource file in the same directory as the game, with the same name except for a '.blb' extension. If you explicitly specify this, Zoom will always load the resource file, even if the game identifier in the file does not match that of the game you are running.

Example definition

This provides an example of a definition for a game. Note that any options not specified for a game will be taken from the default block.

game "Beyond Zork" 47.870915, 49.870917, 51.870923, 57.871221
{
  interpreter 5
  revision    Z

  font 1 "/usr/share/ghostscript/fonts/n021003l.pfb 14" roman
  font 2 "/usr/share/ghostscript/fonts/n021004l.pfb 14" bold
  font 3 "/usr/share/ghostscript/fonts/n021023l.pfb 14" italic
  font 4 "-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*"     fixed
  font 5 "-*-courier-bold-r-*-*-14-*-*-*-*-*-*-*"       fixed-bold
  font 6 "-*-courier-medium-o-*-*-14-*-*-*-*-*-*-*"     fixed-italic
  font 7 "-*-courier-bold-o-*-*-14-*-*-*-*-*-*-*"       fixed-bold-italic
  font 8 "/usr/share/ghostscript/fonts/n021024l.pfb 14" bold-italic
  font 9 "font3"                                        symbolic, fixed-symbolic
}
  

Zoom written by Andrew Hunter. Mail any suggestions, bug reports or abuse to andrew@logicalshift.demon.co.uk