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
10

SYNOPSIS

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

DESCRIPTION

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

STANDARD OPTIONS

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

EXTENDED OPTIONS

169       -@ <listfile>
170              Use  resource  files  listed  in  <listfile>  (see   NON   BLORB
171              RESOURCES).
172
173
174       -%     Use local resource files.
175
176
177       -F     Run in fullscreen mode (see NOTES).
178
179
180       -m <msecs>
181              Set  the  timer interrupt cycle to <msecs> milliseconds, instead
182              of the default 100 (1/10 sec).
183
184
185       -N <mode>
186              Set the mode (date or name) for creating default file names  for
187              save/script  etc.   For  date,  a  timestamp is prepended to the
188              filename extension.  For name,  a  four-digit  number  beginning
189              with 0000 is prepended to the filename extension.
190
191
192       -T     Use  traditional  in-game requests for file names, intead of on-
193              screen dialogs.
194
195
196       -V     Force the use of default monospaced VGA font.
197
198
199

HOT KEYS

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

WINDOW

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

INTERPRETER NUMBER

257       The interpreter number is a setting in the Z-machine  header  which  is
258       used  to  tell the game on what sort of machine the interpreter is run‐
259       ning.  Sfrotz will automatically choose the most appropriate number for
260       a given Infocom-produced game.  Should you want to override the number,
261       the -I option is available.
262
263       An interpreter should choose the interpreter number most  suitable  for
264       the  machine  it will run on.  In Versions up to 5, the main considera‐
265       tion is that the behaviour of 'Beyond Zork' depends on the  interpreter
266       number  (in terms of its usage of the character graphics font). In Ver‐
267       sion 6, the decision is more serious, as existing Infocom  story  files
268       depend  on  interpreter number in many ways: moreover, some story files
269       expect to be run only on the interpreters  for  a  particular  machine.
270       There are, for instance, specifically Amiga versions.  The DECSystem-20
271       was Infocom's own in-house mainframe.
272
273       Infocom used the following interpreter numbers:
274
275
276       1   DECSystem 20
277
278
279       2   Apple IIe
280
281
282       3   Macintosh
283
284
285       4   Amiga
286
287
288       5   Atari ST
289
290
291       6   IBM PC
292
293
294       7   Commodore128
295
296
297       8   Commodore64
298
299
300       9   Apple IIc
301
302
303       10   Apple IIgs
304
305
306       11   Tandy Color
307
308
309

NON BLORB RESOURCES

311       Besides Blorb-packaged resources, Sfrotz can also render  graphics  and
312       sound  from  individual  files, provided the latter are either suitably
313       named (e.g a common root with a numeric field specifying  the  resource
314       number), or listed in a suitably formatted text file.
315
316       Note  that this feature is not automatic, but must be enabled by the -%
317       or -@ command line options. When  the  feature  is  enabled,  resources
318       found this way override those in the Blorb file, if present.
319
320       This  feature can be useful to game designers, as it eases changing and
321       adding resources without having to re-compile the Blorb file each time.
322       The  format  of  the list file used with the -@ option (see EXAMPLE BLC
323       FILE) is identical to that of the BLC control  file  used  by  L.  Ross
324       Raszewski's  iblorb package, so one can use the same list for compiling
325       the final Blorb file for distribution.
326
327
328

TRUETYPE FONTS

330       Sfrotz can display  text  with  Truetype  or  Type1  fonts,  using  the
331       FreeType2  rendering  library. The location of the necessary font files
332       must be specified in the setup file.  Also,  antialiased  rendering  of
333       Truetype  fonts  can  be  specified.  Please  note that this feature in
334       sfrotz is still experimental, so don't expect too much  (e.g.,  kerning
335       is not supported).
336
337
338

DEFAULT FONTS

340       Sfrotz  does  not need Truetype fonts to work; in fact it has a default
341       monospaced font, based on an 8x16 VGA font, which can be used for  both
342       the  TEXT_FONT  and  the  FIXED_FONT  of  the  z-machine, with suitable
343       (though not very nice) modifications for the various  styles.  Even  if
344       Truetype fonts are specified in the setup file, Sfrotz can be forced to
345       use the VGA font by the -V command line switch.
346
347
348

UNICODE

350       Sfrotz supports Unicode glyphs by way of UTF-8 as  long  as  the  fonts
351       loaded  contain  the glyphs you need.  The default font provided by SDL
352       does not contain much beyond the Latin alphabet  and  some  diacritical
353       marks.  Inverted punctuation marks as used in Spanish are missing.  Two
354       monospaced fonts known to  work  well  with  most  commonly-encountered
355       alphabetic  languages  are  Leggie  and  FreeMono. They can be found at
356       https://memleek.org/leggie/       (X11       BDF       fonts)       and
357       https://www.gnu.org/software/freefont/  (Truetype  fonts).  Logographic
358       glyphs (Kanji and Chinese are not currently supported.
359
360
361

ENVIRONMENT

363       If the ZCODE_PATH environmental variable is defined, Sfrotz will search
364       that  path for game files.  If that doesn't exist, INFOCOM_PATH will be
365       searched.
366
367
368

SETUP FILE

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

SETUP FILE GRAMMAR

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

EXAMPLE SETUP FILE

532       # The # denotes the start of a comment
533       # Everything after the # is ignored, up to the end of the line
534
535       [Interpreter]
536       SaveNames=date
537
538       [Window]
539       # The following entries are commented out
540       # but they are the same as the hardwired defaults, anyway
541       #AcWidth = 640
542       #AcHeight = 400
543
544       [Display]
545
546       [Fonts]
547       antialias=1
548       fontdir=/usr/share/fonts/truetype/freefont
549       textroman=arial.ttf@16|FreeSans.ttf@16
550       textbold=arialbd.ttf@16|FreeSansBold.ttf@16
551       textitalic=ariali.ttf@16|FreeSansOblique.ttf@16
552       textbolditalic=arialbi.ttf@16|FreeSansBoldOblique.ttf@16
553       fixedroman=cour.ttf@16|FreeMono.ttf@16
554       fixedbold=courbd.ttf@16|FreeMonoBold.ttf@16
555       fixeditalic=couri.ttf@16|FreeMonoOblique.ttf@16
556       fixedbolditalic=courbi.ttf@16|FreeMonoBoldOblique.ttf@16
557
558       [Resources]
559       Dir=./        # the current dir
560       Pict=PIC%d    # i.e. PIC1, PIC2, ...
561       Snd=SND%d     # i.e. SND3, SND4, ...
562
563
564

EXAMPLE BLC FILE

566       Exec 0 ZCOD ani.z6
567
568       Snd 13 FORM busyalone.au.aiff
569       Snd 12 FORM s0020.au.aiff
570       Snd 11 FORM s0154.au.aiff
571       Snd 10 FORM s1484.au.aiff
572
573       Pict 10 PNG edleft.png0.png
574       Pict 11 PNG edleft.png1.png
575       Pict 12 PNG edleft.png2.png
576       Pict 13 PNG edleft.png3.png
577       Pict 14 PNG edleft.png4.png
578       Pict 15 PNG edleft.png5.png
579
580       Pict 16 PNG lauhoh.png0.png
581       Pict 17 PNG lauhoh.png1.png
582       Pict 18 PNG lauhoh.png2.png
583
584       Pict 19 PNG edfront.png0.png
585       Pict 20 PNG edfront.png1.png
586       Pict 21 PNG edfront.png2.png
587       Pict 22 PNG edfront.png3.png
588       Pict 23 PNG edfront.png4.png
589       Pict 24 PNG edfront.png5.png
590
591       Pict 25 PNG hoagie.png0.png
592       Pict 26 PNG hoagie.png1.png
593
594       Pict 30 PNG dott0.png
595
596
597

FURTHER INFORMATION

599       The Frotz homepage is at https://661.org/proj/if/frotz/.
600
601       A git(1) repository of all versions of  Unix  Frotz  back  to  2.32  is
602       available for public perusal here:
603       https://gitlab.com/DavidGriffith/frotz/.
604
605       The bleeding edge of Frotz development may be followed there.
606
607       The  Interactive  Fiction Archive is a good place to find games to play
608       with Frotz.  Various ports and builds for Frotz may also be found here.
609       Here is its URL:
610       http://www.ifarchive.org/
611
612       Most  distributions  of  Linux  and  BSD include Frotz in their package
613       repositories.
614
615
616

CAVEATS

618       The Z Machine itself has trouble with the concept of resizing a  termi‐
619       nal.   It  assumes  that once the screen height and width are set, they
620       will never change; even across saves.  This made sense when 24x80  ter‐
621       minals were the norm and graphical user interfaces were mostly unknown.
622       I'm fairly sure there's a way around this problem, but for  now,  don't
623       resize  an  xterm  in  which frotz is running.  Also, you should try to
624       make sure the terminal on which you restore a saved game has  the  same
625       dimensions as the one on which you saved the game.
626
627
628       Audio  latency  might be unreasonably long depending on the settings of
629       your operating system.  Linux generally has things right.  The BSDs may
630       need  some  sysctl(8)  settings adjusted.  See the sound(4) or audio(4)
631       manpages for more information.
632
633
634       This manpage is not intended to tell users HOW to play interactive fic‐
635       tion.   Refer  to the file HOW_TO_PLAY included in the Unix Frotz docu‐
636       mentation or visit one of the following sites:
637       http://www.microheaven.com/ifguide/
638       http://www.brasslantern.org/beginners/
639       http://www.musicwords.net/if/how_to_play.htm
640       http://ifarchive.org/
641
642
643

BUGS

645       This program has no bugs.  no bugs.  no bugs.  no *WHAP* thank you.  If
646       you  find  one, please report it to the Gitlab site referenced above in
647       FURTHER INFORMATION.
648
649
650

AUTHORS

652       frotz was written by Stefan Jokisch for MSDOS in 1995-7.
653       The SDL port was done in 2009 by Aldo Cumani  and  is  currently  main‐
654       tained by David Griffith <dave@661.org>.
655
656
657

SEE ALSO

659       frotz(6) dfrotz(6) nitfol(6) rezrov(6) jzip(6) xzip(6) inform(1)
660
661
662
663                                     2.51                            SFROTZ(6)
Impressum