1SFROTZ(6)                        Games Manual                        SFROTZ(6)
2
3
4

NAME

6       sfrotz  - interpreter for Infocom and other Z-Machine games (SDL inter‐
7       face)
8
9

SYNOPSIS

11       sfrotz [options] file [blorb_file]
12
13       At least one file must be specified on the command line.  This  can  be
14       either  a  plain  Z-code file or a Blorb file.  A Z-code file is a com‐
15       piled executable for the  Z-Machine.   A  Blorb  file  contains  audio,
16       graphics,  and  other  things in addition to the game wrapped up into a
17       single file.  It can also optionally contain the Z-Machine  executable.
18       If  a  plain Z-code file is supplied, then Frotz will check for a Blorb
19       file with the same base name but  an  extension  of  .blb,  .blorb,  or
20       .zblorb and load it if found.
21
22       If  the  file  supplied on the command line is a Blorb file, then Frotz
23       will check to see if a Z-code file is contained within.  If not  found,
24       then Frotz will complain and exit.
25
26       An  alternatively-named Blorb file can be supplied as the optional sec‐
27       ond parameter to the command line invocatio
28
29
30

DESCRIPTION

32       Frotz is a Z-Machine interpreter.  The Z-machine is a  virtual  machine
33       designed  by  Infocom  to  run  all  of their text adventures.  It went
34       through multiple revisions during the lifetime of the company, and  two
35       further  revisions  (V7 and V8) were created by Graham Nelson after the
36       company's demise.  The specification is now quite well documented; this
37       version of Frotz supports version 1.0.
38
39       This  version  of  Frotz fully supports all these versions of the Z-Ma‐
40       chine including the graphical version 6.  Graphics and sound  are  cre‐
41       ated  through the use of the SDL libraries.  AIFF sound effects and mu‐
42       sic in MOD and OGG formats are supported when packaged  in  Blorb  con‐
43       tainer files or optionally from individual files.
44
45
46

STANDARD OPTIONS

48       -a     Watch  attribute setting.  Setting and clearing of attributes on
49              objects will be noted in debugging messages.
50
51
52       -A     Watch attribute testing.  Every time the Z-machine tests an  at‐
53              tribute value, the test and the result will be reported.
54
55
56       -b <colorname>
57              Sets  the  default background color.  <colorname> corresponds to
58              one of the Z-machine colors, which are as follows:
59              black red green yellow blue magenta cyan white
60              If color support is disabled or not available on your  terminal,
61              this option does nothing.
62
63
64       -c N   Sets  the  number  of  context  lines used.  By default, after a
65              ``[MORE]'' prompt, and assuming there is enough output  pending,
66              Frotz  will  allow all the currently visible lines to scroll off
67              the screen before prompting again.  This  switch  specifies  how
68              many  lines  of text Frotz will hold over and display at the top
69              of the next screen.
70
71
72       -C <filename>
73              Load this configuration file instead of $HOME/.sfrotzrc.
74
75
76       -d     Disable color.
77
78
79       -f <colorname>
80              Sets the default foreground color.  <colorname>  corresponds  to
81              one of the Z-machine colors, which are as follows
82              black red green yellow blue magenta cyan white
83              If  color support is disabled or is not available on your termi‐
84              nal, this option does nothing.
85
86
87       -h N   Manually sets the text height.
88
89
90       -i     Ignore fatal errors.  If a Z-Machine  interpreter  encounters  a
91              zcode  error  such  as division-by-zero or addressing an illegal
92              object, the proper response is to abort execution.  This is done
93              because  the  zcode program doesn't have a clear idea of what is
94              going on.  There are some games out there that cause  fatal  er‐
95              rors  because  the authors were careless and used an interpreter
96              that didn't properly check for errors.  This option is  intended
97              to  get  around such bugs, but be warned that Strange Things may
98              happen if fatal errors are not caught.
99
100
101       -I N   Set the interpreter number.  Infocom designed the Z-machine such
102              that  a  game could tell on what kind of machine the interpreter
103              was running.  See INTERPRETER NUMBER below.
104
105
106       -l N   Sets the left margin, for those who might have specific  format‐
107              ting needs.
108
109
110       -L <filename>
111              When the game starts, load this saved game file.
112
113
114       -o     Watch  object  movement.  This option enables debugging messages
115              from the interpreter which describe the moving of objects in the
116              object tree.
117
118
119       -O     Watch  object location.  These debugging messages detail the lo‐
120              cations of objects in the object tree.
121
122
123       -P     Alter the piracy opcode.  The piracy opcode was  never  used  by
124              Infocom.   This  switch is really only useful for those who like
125              to toy around with Z-code.
126
127
128       -r N   Sets the right margin.
129
130
131
132       -s N   Set the random number seed value.  The given seed value is  used
133              as  the initial seed value on every restart. This is helpful for
134              testing games like Curses which make random decisions before the
135              first input (such that the hot key Alt-S does not really help).
136
137
138       -S N   Set  the transcript width.  By default your transcript files are
139              formatted to a width of 80 columns per line, regardless  of  the
140              current  text width.  This switch allows you to change this set‐
141              ting. In particular, use  -S  0  to  deactivate  automatic  line
142              splitting in transcript files.
143
144
145       -t     Sets the Z-machine's Tandy bit, which may affect the behavior of
146              certain Infocom games.  For example, Zork I pretends not to have
147              sequels, and Witness has its language toned down.
148
149
150       -u N   Sets  the  number  of  slots available for Frotz's multiple undo
151              hotkey (see below).  This defaults to twenty,  which  should  be
152              sufficient  for  most  purposes.  Setting too high a number here
153              may be dangerous on machines with limited memory.
154
155
156       -w N   Manually sets the text width.
157
158
159       -x     Expand the abbreviations "g", "x", and "z"  to  "again",  "exam‐
160              ine", and "wait".  This switch is for use with old Infocom games
161              that lack these common abbreviations which  were  introduced  in
162              later  games.   Use  it with caution: A few games might use "g",
163              "x" or "z" for different purposes.
164
165
166       -Z N   Error checking mode.
167              0 = don't report errors.
168              1 = report first instance of an error.
169              2 = report all errors.
170              3 = exit after any error.
171              Default is 1 (report first instance of an error).
172
173

EXTENDED OPTIONS

175       -@ <listfile>
176              Use resource files listed  in  <listfile>  (see  NON  BLORB  RE‐
177              SOURCES).
178
179
180       -%     Use local resource files.
181
182
183       -F     Run in fullscreen mode (see NOTES).
184
185
186       -m <msecs>
187              Set  the  timer interrupt cycle to <msecs> milliseconds, instead
188              of the default 100 (1/10 sec).
189
190
191       -N <mode>
192              Set the mode (date or name) for creating default file names  for
193              save/script  etc.   For  date,  a  timestamp is prepended to the
194              filename extension.  For name,  a  four-digit  number  beginning
195              with 0000 is prepended to the filename extension.
196
197
198       -T     Use  traditional in-game requests for file names, instead of on-
199              screen dialogs.
200
201
202       -v     Show version information and exit.  This will display  the  ver‐
203              sion  of Frotz, some information about what's enabled and what's
204              not, the commit date of the source code, and a  git(1)  hash  of
205              that commit.
206
207
208       -V     Force the use of default monospaced VGA font.
209
210
211

HOT KEYS

213       Sfrotz supports the same hot keys as standard Frotz, plus the Ctl-Alt-X
214       combination for immediate exit, which may be used in case of emergency.
215       Note that these hot keys are enabled only when the Z-machine is waiting
216       for line input (for Z-machine experts: @read opcode), with  the  excep‐
217       tion  of  Ctl-Alt-X  which  also  works  in single character input mode
218       (@read_char opcode).
219
220
221       Alt-D  Set debugging options.
222
223
224       Alt-H  Help (print the list of hot keys).
225
226
227       Alt-N  New game (restart).
228
229
230       Alt-P  Playback on.
231
232
233       Alt-R  Recording on/off.
234
235
236       Alt-S  Set random number seed.
237
238
239       Alt-U  Undo one turn.
240
241
242       Alt-X  Exit game (after confirmation).
243
244
245       Ctl-Alt-X
246              Exit game immediately (no confirmation).
247
248
249

WINDOW

251       Sfrotz has a hardwired default screen size of 640x400. The screen  size
252       can  be  changed  by the values in this section, by the values found in
253       the Reso chunk of a Blorb file, and finally by the -w  and  -h  command
254       line  options (in that order). Note however that Sfrotz shall refuse to
255       set a screen width less than 640 and/or a height less than  400.  NOTE:
256       for  normal  (windowed) usage, the screen size should obviously be less
257       than the PC screen resolution (taking into account also window  decora‐
258       tions,  taskbars etc.) For fullscreen usage, the size should preferably
259       be one of those supported by the PC video driver; otherwise, SDL  shall
260       try  to  use  the  next higher available resolution, with black borders
261       around the Z-machine screen. In fullscreen mode, however, it may happen
262       that  for  some  strange  resolutions  SDL accepts the request, but the
263       screen goes blank... In such a case, you may shut down the  program  by
264       pressing Ctrl-Alt-X.
265
266
267

INTERPRETER NUMBER

269       The  interpreter  number  is a setting in the Z-machine header which is
270       used to tell the game on what sort of machine the interpreter  is  run‐
271       ning.  Sfrotz will automatically choose the most appropriate number for
272       a given Infocom-produced game.  Should you want to override the number,
273       the -I option is available.
274
275       An  interpreter  should choose the interpreter number most suitable for
276       the machine it will run on.  In Versions up to 5, the  main  considera‐
277       tion  is that the behaviour of 'Beyond Zork' depends on the interpreter
278       number (in terms of its usage of the character graphics font). In  Ver‐
279       sion  6,  the decision is more serious, as existing Infocom story files
280       depend on interpreter number in many ways: moreover, some  story  files
281       expect  to  be  run  only on the interpreters for a particular machine.
282       There are, for instance, specifically Amiga versions.  The DECSystem-20
283       was Infocom's own in-house mainframe.
284
285       For  Infocom's  four V6 games, the interpreter number will be automati‐
286       cally chosen based on the title and release number.   Of  course,  this
287       can be overridden at the command line.
288
289       Infocom used the following interpreter numbers:
290
291
292       1   DECSystem 20
293
294
295       2   Apple IIe
296
297
298       3   Macintosh
299
300
301       4   Amiga
302
303
304       5   Atari ST
305
306
307       6   IBM PC
308
309
310       7   Commodore128
311
312
313       8   Commodore64
314
315
316       9   Apple IIc
317
318
319       10   Apple IIgs
320
321
322       11   Tandy Color
323
324
325

NON BLORB RESOURCES

327       Besides  Blorb-packaged  resources, Sfrotz can also render graphics and
328       sound from individual files, provided the latter  are  either  suitably
329       named  (e.g  a common root with a numeric field specifying the resource
330       number), or listed in a suitably formatted text file.
331
332       Note that this feature is not automatic, but must be enabled by the  -%
333       or  -@  command  line  options.  When the feature is enabled, resources
334       found this way override those in the Blorb file, if present.
335
336       This feature can be useful to game designers, as it eases changing  and
337       adding resources without having to re-compile the Blorb file each time.
338       The format of the list file used with the -@ option  (see  EXAMPLE  BLC
339       FILE)  is  identical  to  that  of the BLC control file used by L. Ross
340       Raszewski's iblorb package, so one can use the same list for  compiling
341       the final Blorb file for distribution.
342
343
344

TRUETYPE FONTS

346       Sfrotz  can  display  text  with  Truetype  or  Type1  fonts, using the
347       FreeType2 rendering library. The location of the necessary  font  files
348       must  be  specified  in  the setup file. Also, antialiased rendering of
349       Truetype fonts can be specified.  Please  note  that  this  feature  in
350       sfrotz  is  still experimental, so don't expect too much (e.g., kerning
351       is not supported).
352
353
354

DEFAULT FONTS

356       Sfrotz does not need Truetype fonts to work; in fact it has  a  default
357       monospaced  font, based on an 8x16 VGA font, which can be used for both
358       the TEXT_FONT and  the  FIXED_FONT  of  the  z-machine,  with  suitable
359       (though  not  very  nice) modifications for the various styles. Even if
360       Truetype fonts are specified in the setup file, Sfrotz can be forced to
361       use the VGA font by the -V command line switch.
362
363
364

UNICODE

366       Sfrotz  supports  Unicode  glyphs  by way of UTF-8 as long as the fonts
367       loaded contain the glyphs you need.  The default font provided  by  SDL
368       does  not  contain  much beyond the Latin alphabet and some diacritical
369       marks.  Inverted punctuation marks as used in Spanish are missing.  Two
370       monospaced  fonts known to work well with most commonly-encountered al‐
371       phabetic languages are Leggie  and  FreeMono.  They  can  be  found  at
372       https://memleek.org/leggie/       (X11       BDF       fonts)       and
373       https://www.gnu.org/software/freefont/  (Truetype  fonts).  Logographic
374       glyphs (Kanji and Chinese are not currently supported.
375
376
377

ENVIRONMENT

379       If the ZCODE_PATH environmental variable is defined, Sfrotz will search
380       that path for game files.  If that doesn't exist, INFOCOM_PATH will  be
381       searched.
382
383
384

SETUP FILE

386       On  startup,  sfrotz  will check $HOME/.sfrotzrc for setup information.
387       The setup file has four sections: Interpreter, Display, Fonts, and  Re‐
388       sources.
389
390       The  Interpreter  section  deals with options having to do with how the
391       Frotz core works.
392
393       The Window section deals with screen display.  Sfrotz has  a  hardwired
394       default  screen  size of 640x400. The screen size can be changed by the
395       values in this section, by the values found in  the  Reso  chunk  of  a
396       Blorb  file, and finally by the -w and -h command line options (in that
397       order).  Note however that sfrotz shall refuse to set  a  screen  width
398       less than 640 and/or a height less than 400.
399
400       NOTE:  for normal (windowed) usage, the screen size should obviously be
401       less than the PC screen resolution (taking  into  account  also  window
402       decorations,  taskbars  etc.)  For  fullscreen  usage,  the size should
403       preferably be one of those supported by the PC video driver; otherwise,
404       SDL  shall  try to use the next higher available resolution, with black
405       borders around the z-machine screen. In fullscreen  mode,  however,  it
406       may  happen  that for some strange resolutions SDL accepts the request,
407       but the screen goes blank... In such a case, you may shut down the pro‐
408       gram by pressing Ctrl-Alt-X.
409
410       The Display section is reserved for future developments.
411
412       The  Fonts  section is for defining the font directory, font files, and
413       if antialiasing is enabled (which is currently not supported).
414
415       The  following  eight  statements:  textroman,  textbold,   textitalic,
416       textbolditalic,   fixedroman,   fixedbold,   fixeditalic,   and  fixed‐
417       bolditalic; specify the eight font faces used  by  the  z-machine  (not
418       counting  the  so-called  graphics  font  used in Beyond Zork, which is
419       hardwired in the program), that is the normal TEXT_FONT and  the  mono‐
420       spaced  FIXED_FONT,  each  in  four  styles  (roman,  bold,  italic and
421       bold+italic). A single face is specified by the  file  name  (with  its
422       suffix!), optionally followed by an @ sign and a number, indicating the
423       font size in pixels (default is 14). Multiple face files can be  speci‐
424       fied,  separated by pipe (|) characters; Sfrotz shall use the first one
425       it finds (see the example in EXAMPLE SETUP FILE). This  feature  allows
426       e.g. to use the same setup file on different systems.
427
428       The  Resources section is for configuring graphics and sound resources.
429       Each template must contain exactly one C-style decimal format specifier
430       (e.g. Pict%d) to be substituted by the resource number.
431
432
433

SETUP FILE GRAMMAR

435       [Interpreter]
436
437       Number = number
438         Set the interpreter number (default is 4, i.e. Amiga Interpreter)
439
440
441       Error Reporting = level
442         Set the error reporting level (same as the -Z option)
443
444
445       Ignore Errors = 0/1
446         Ignore (1) or not (0) non-fatal runtime errors.
447
448
449       Expand Abbreviations = 0/1
450         Set/reset  expansion  of g/x/z abbreviations. Expansion is useful for
451         old v1 games which do not understand such abbreviations.  Default:  0
452         (the -xoption can set this switch.)
453
454
455       Tandy Bit = 0/1
456         Set/reset  the  Tandy  bit.  Default:  0  (the -t option can set this
457         switch.)
458
459
460       Wrap Script Lines = nc
461         Set the width (number of columns) of the transcript to nc. Same as -S
462         option.
463
464
465       SaveNames = date/name
466         Set  the  mode  (date  or  name)  for creating default file names for
467         save/script etc.  For date, a timestamp is prepended to the  filename
468         extension.   For  name,  a  four-digit  number beginning with 0000 is
469         prepended to the filename extension.
470
471
472       [Window]
473
474       AcWidth = width
475         Set the screen width in pixels (default: 640)
476
477
478       AcHeight = height
479         Set the screen height in pixels (default: 400)
480
481
482       [Display]
483
484       (This section reserved for future developments)
485
486
487       [Fonts]
488
489       antialias = 0/1
490         Set antialiased rendering of Truetype fonts off (0) or on  (nonzero).
491         Note that this option cannot be overridden by a command line switch.
492
493
494       fontdir = folder
495         Specify  the  directory  containing the Truetype fonts.  If this does
496         not begin with a slash, then the directory is assumed to be  relative
497         to the user's home directory.
498
499
500       textroman = fontspec
501         Set the font file for TEXT_FONT, roman style.
502
503
504       textbold = fontspec
505         Set the font file for TEXT_FONT, bold style.
506
507
508       textitalic = fontspec
509         Set the font file for TEXT_FONT, italic style.
510
511
512       textbolditalic = fontspec
513
514
515       fixedroman = fontspec
516         Set the font file for FIXED_FONT, roman style.
517
518
519       fixedbold = fontspec
520         Set the font file for FIXED_FONT, bold style.
521
522
523       fixeditalic = fontspec
524         Set the font file for FIXED_FONT, italic style.
525
526
527       fixedbolditalic = fontspec
528         Set the font file for FIXED_FONT, bold and italic style
529
530
531       [Resources]
532
533
534       Dir = folder
535         Specify the folder for individual graphics/sound resource files.
536
537
538       Pict = template
539         Template for picture resource files.
540
541
542       Snd = template
543         Template for sound resource files.
544
545
546

EXAMPLE SETUP FILE

548       # The # denotes the start of a comment
549       # Everything after the # is ignored, up to the end of the line
550
551       [Interpreter]
552       SaveNames=date
553
554       [Window]
555       # The following entries are commented out
556       # but they are the same as the hardwired defaults, anyway
557       #AcWidth = 640
558       #AcHeight = 400
559
560       [Display]
561
562       [Fonts]
563       antialias=1
564       fontdir=/usr/share/fonts/truetype/freefont
565       textroman=arial.ttf@16|FreeSans.ttf@16
566       textbold=arialbd.ttf@16|FreeSansBold.ttf@16
567       textitalic=ariali.ttf@16|FreeSansOblique.ttf@16
568       textbolditalic=arialbi.ttf@16|FreeSansBoldOblique.ttf@16
569       fixedroman=cour.ttf@16|FreeMono.ttf@16
570       fixedbold=courbd.ttf@16|FreeMonoBold.ttf@16
571       fixeditalic=couri.ttf@16|FreeMonoOblique.ttf@16
572       fixedbolditalic=courbi.ttf@16|FreeMonoBoldOblique.ttf@16
573
574       [Resources]
575       Dir=./        # the current dir
576       Pict=PIC%d    # i.e. PIC1, PIC2, ...
577       Snd=SND%d     # i.e. SND3, SND4, ...
578
579
580

EXAMPLE BLC FILE

582       Exec 0 ZCOD ani.z6
583
584       Snd 13 FORM busyalone.au.aiff
585       Snd 12 FORM s0020.au.aiff
586       Snd 11 FORM s0154.au.aiff
587       Snd 10 FORM s1484.au.aiff
588
589       Pict 10 PNG edleft.png0.png
590       Pict 11 PNG edleft.png1.png
591       Pict 12 PNG edleft.png2.png
592       Pict 13 PNG edleft.png3.png
593       Pict 14 PNG edleft.png4.png
594       Pict 15 PNG edleft.png5.png
595
596       Pict 16 PNG lauhoh.png0.png
597       Pict 17 PNG lauhoh.png1.png
598       Pict 18 PNG lauhoh.png2.png
599
600       Pict 19 PNG edfront.png0.png
601       Pict 20 PNG edfront.png1.png
602       Pict 21 PNG edfront.png2.png
603       Pict 22 PNG edfront.png3.png
604       Pict 23 PNG edfront.png4.png
605       Pict 24 PNG edfront.png5.png
606
607       Pict 25 PNG hoagie.png0.png
608       Pict 26 PNG hoagie.png1.png
609
610       Pict 30 PNG dott0.png
611
612
613

FURTHER INFORMATION

615       The Frotz homepage is at https://661.org/proj/if/frotz/.
616
617       A  git(1)  repository  of  all  versions  of Unix Frotz back to 2.32 is
618       available for public perusal here:
619       https://gitlab.com/DavidGriffith/frotz/.
620
621       The bleeding edge of Frotz development may be followed there.
622
623       The Interactive Fiction Archive is a good place to find games  to  play
624       with Frotz.  Various ports and builds for Frotz may also be found here.
625       Here is its URL:
626       http://www.ifarchive.org/
627
628       Most distributions of Linux and BSD  include  Frotz  in  their  package
629       repositories.
630
631       It is distributed under the GNU General Public License version 2 or (at
632       your option) any later version.
633       https://www.gnu.org/licenses/gpl-2.0.en.html
634
635       This software is offered as-is with no warranty or liability.   If  you
636       find a bug or would like Frotz to do something it doesn't currently do,
637       please visit the above Gitlab website and report your concerns.
638
639
640

CAVEATS

642       The Z Machine itself has trouble with the concept of resizing a  termi‐
643       nal.   It  assumes  that once the screen height and width are set, they
644       will never change; even across saves.  This made sense when 24x80  ter‐
645       minals were the norm and graphical user interfaces were mostly unknown.
646       I'm fairly sure there's a way around this problem, but for  now,  don't
647       resize  an  xterm  in  which frotz is running.  Also, you should try to
648       make sure the terminal on which you restore a saved game has  the  same
649       dimensions as the one on which you saved the game.
650
651
652       Audio  latency  might be unreasonably long depending on the settings of
653       your operating system.  Linux generally has things right.  The BSDs may
654       need  some  sysctl(8)  settings adjusted.  See the sound(4) or audio(4)
655       manpages for more information.
656
657
658       This manpage is not intended to tell users HOW to play interactive fic‐
659       tion.   Refer  to the file HOW_TO_PLAY included in the Unix Frotz docu‐
660       mentation or visit one of the following sites:
661       http://www.microheaven.com/ifguide/
662       http://www.brasslantern.org/beginners/
663       http://www.musicwords.net/if/how_to_play.htm
664       http://ifarchive.org/
665
666
667

BUGS

669       This program has no bugs.  no bugs.  no bugs.  no *WHAP* thank you.  If
670       you  find  one, please report it to the Gitlab site referenced above in
671       FURTHER INFORMATION.
672
673
674

AUTHORS

676       frotz was written by Stefan Jokisch for MSDOS in 1995-7.
677       The SDL port was done in 2009 by Aldo Cumani  and  is  currently  main‐
678       tained by David Griffith <dave@661.org>.
679
680
681

SEE ALSO

683       frotz(6) dfrotz(6) nitfol(6) rezrov(6) jzip(6) xzip(6) inform(1)
684
685
686
687SDL Frotz v2.54                   2021-06-21                         SFROTZ(6)
Impressum