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              -v Show version information and exit.   This  will  display  the
196              version  of  Frotz,  some  information  about what's enabled and
197              what's not, the commit date of the source  code,  and  a  git(1)
198              hash of that commit.
199
200
201       -V     Force the use of default monospaced VGA font.
202
203
204

HOT KEYS

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

WINDOW

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

INTERPRETER NUMBER

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

NON BLORB RESOURCES

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

TRUETYPE FONTS

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

DEFAULT FONTS

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

UNICODE

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

ENVIRONMENT

368       If the ZCODE_PATH environmental variable is defined, Sfrotz will search
369       that path for game files.  If that doesn't exist, INFOCOM_PATH will  be
370       searched.
371
372
373

SETUP FILE

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

SETUP FILE GRAMMAR

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

EXAMPLE SETUP FILE

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

EXAMPLE BLC FILE

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

FURTHER INFORMATION

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

CAVEATS

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

BUGS

650       This program has no bugs.  no bugs.  no bugs.  no *WHAP* thank you.  If
651       you find one, please report it to the Gitlab site referenced  above  in
652       FURTHER INFORMATION.
653
654
655

AUTHORS

657       frotz was written by Stefan Jokisch for MSDOS in 1995-7.
658       The  SDL  port  was  done in 2009 by Aldo Cumani and is currently main‐
659       tained by David Griffith <dave@661.org>.
660
661
662

SEE ALSO

664       frotz(6) dfrotz(6) nitfol(6) rezrov(6) jzip(6) xzip(6) inform(1)
665
666
667
668                                     2.51                            SFROTZ(6)
Impressum