26970799e6e5888b5512321d53c221a859b65613
[rodin/chimara.git] / interpreters / nitfol / nitfol.info
1 This is nitfol.info, produced by makeinfo version 4.13 from nitfol.texi.
2
3 INFO-DIR-SECTION Games
4 START-INFO-DIR-ENTRY
5 * nitfol: (nitfol).               Z-code interpreter and debugger.
6 END-INFO-DIR-ENTRY
7
8 \1f
9 File: nitfol.info,  Node: Top,  Next: Invoking nitfol,  Prev: (dir),  Up: (dir)
10
11 Introduction
12 ************
13
14 Nitfol is a portable interpreter for Z-machine code, the game format
15 used by Infocom and more recently, Inform
16 (http://www.gnelson.demon.co.uk/inform.html).  Nitfol handles versions
17 one through eight of the format, and attempts to comply with version
18 1.0 of the Z-machine specification.
19
20    You will need game files to use nitfol.  The "if-archive" contains a
21 large collection of these, available at
22 `ftp://ftp.gmd.de/if-archive/games/zcode/' or at the USA mirror
23 `http://ifarchive.org/indexes/if-archiveXgamesXzcode.html'.
24
25    This manual describes how to use nitfol and how it differs from
26 other Z-machine interpreters.  This manual was written with UNIX-like
27 systems in mind; ignore that which does not apply to your platform.
28 Comments on and corrections for this manual and nitfol are appreciated
29 and should be sent to <nitfol@my-deja.com>.
30
31 * Menu:
32
33 * Invoking nitfol::               How to start nitfol under UNIX
34 * Features::                      Useful extras
35 * Debugger::                      Built in source-level debugger
36
37 * Bugs::                          What I know is wrong
38 * Thanks::                        List of people who've helped
39 * Games Cited::                   The games used as examples in this manual
40
41 \1f
42 File: nitfol.info,  Node: Invoking nitfol,  Next: Features,  Prev: Top,  Up: Top
43
44 1 Invoking nitfol
45 *****************
46
47 Invoke nitfol with the game filename, and options.  If you omit the
48 game filename, nitfol will prompt you for one.  The following options
49 are recognized:
50
51 `-ignore'
52 `-no-ignore'
53 `-i'
54      Ignore Z-machine strictness errors.  Normally nitfol checks for
55      illegal and undefined Z-machine behaviour and alerts the user.  If
56      you're playing someone else's buggy game, this can be annoying and
57      you should use this option.
58
59 `-fullname'
60 `-no-fullname'
61 `-f'
62      For running under Emacs or DDD.  Tells nitfol to give
63      machine-recognizeable markers when stack frames are displayed
64      instead of displaying the line. Only useful if you are using
65      nitfol as an inferior debugger.
66
67 `-command FILE'
68 `-x FILE'
69      Read commands from this file.  Load a script from a file for
70      playback in the game.
71
72 `-pirate'
73 `-no-pirate'
74 `-P'
75      Aye, matey.  Make the piracy opcode not branch, letting the game
76      know the game disc is not "genuine." Infocom never used this
77      opcode and neither should you, but if obscurity amuses you...
78
79 `-quiet'
80 `-no-quiet'
81 `-q'
82      Do not print introductory messages.  For GDB compatibility.
83
84 `-spell'
85 `-no-spell'
86      Perform spelling correction.  Normally Z-machine games are
87      unforgiving of typos (though they do have an `oops' command). If
88      you type in a word which isn't in the game's dictionary and have
89      typo correction enabled, nitfol will search for a word which is
90      off by one letter by a substitution, deletion, insertion or
91      transposition.
92
93 `-expand'
94 `-no-expand'
95      Expand one letter abbreviations.  Early Z-machine games don't
96      include `x' as a synonym for `examine' and such.  If the first
97      word in a sentence is one letter long and not recognized by the
98      game, this will attempt to expand it to a full word.
99
100 `-symbols FILE'
101 `-s FILE'
102      Specify symbol file for game.  If you want to perform source-level
103      debugging, you will need to specify a symbol file, which contains
104      the names of variables and tells nitfol how source code
105      corresponds to object code.
106
107 `-tandy'
108 `-no-tandy'
109 `-t'
110      Censors some Infocom games.  Some version 3 games perform minor
111      wording changes when this bit is set to appease the sensitivity of
112      Tandy Corporation.
113
114 `-transcript WFILE'
115 `-T WFILE'
116      Write transcript to this file.  This transcript begins as soon as
117      the game starts.
118
119 `-debug'
120 `-no-debug'
121 `-d'
122      Enter debugger immediatly.  Imitate GDB by not automatically
123      starting the story.
124
125 `-prompt STRING'
126      Specify debugging prompt.  This is the prompt nitfol prints when
127      it is waiting for a debugging command (as opposed to the > the
128      game story prints when waiting for a game command).  DDD requires
129      this to be `(gdb) '.
130
131 `-path STRING'
132      Look for games in this directory.  If nitfol cannot find the
133      requested game in the current directory, it looks through the
134      directories listed in the given colon separated string.  The
135      directories specified here are also used to search for gamefiles
136      from saved games.   If this option is not used, nitfol looks at
137      the `INFOCOM_PATH' environment variable.
138
139 `-autoundo'
140 `-no-autoundo'
141      Ensure `@save_undo' is called every turn.  If a turn passes with
142      no `@save_undo' between, this option performs the `@save_undo'
143      automagically.  Could cause problems with some games which have a
144      different concept of a turn.
145
146 `-stacklimit NUMBER'
147 `-S NUMBER'
148      Exit when the stack is this deep.  If a game is infinitely
149      recursing, nitfol will allocate large amounts of memory and take a
150      long time before the problem is reported.  This option makes it
151      fatal to recurse more than the given number of stack frames.
152      Setting this to 0 makes nitfol allow as many as fit contiguously
153      in memory.  The Z-machine Standards Document recommends games use
154      no more than 1024 words of total stack (frames and pushed data) in
155      ZIP, which roughly works out to 90 routine calls deep.
156
157 `-alias STRING'
158 `-a STRING'
159      Specify an alias.  Adds an alias which will be expanded in read
160      lines before tokenisation.  The alias is of the form NAME VALUE;
161      you will need to use quotes around it on the commandline.
162
163 `-ralias STRING'
164      Specify an recursive alias.  Adds an alias whose result is checked
165      for further alias expansion.  Identical syntax to adding a normal
166      alias.
167
168 `-unalias STRING'
169      Remove an alias.  Removes an alias previously added by -alias.
170      Useful for removing aliases in preference files.
171
172 `-random NUMBER'
173 `-r NUMBER'
174      Set random seed.  Normally the random number generator is
175      initialized with the time of day.  If this option is used with a
176      non-zero argument, the given number will be used to initialize the
177      generator and for `@random 0'.
178
179 `-mapsym STRING'
180      Specify mapping glyphs.  Nitfol draws maps using ASCII characters;
181      you can choose which characters it uses to draw rooms.  Defaults
182      to `*udb@UDB+', which is, in order: empty room, room with down
183      exit, room with up exit, room with up and down exits, room with
184      player, room with player and up exit, room with player and down
185      exit, room with player and up and down exits, bend symbol.
186
187 `-mapsize NUMBER'
188      Specify map size.  Determines the number of lines to be used for
189      the map.
190
191 `-maploc STRING'
192      Specify map location.  Nitfol creates a Glk window for the map it
193      generates.  The map can be placed `above', `below', to the
194      `right', or the `left', of the main game window.  Follow this
195      option with one those locations.
196
197 `-terpnum NUMBER'
198      Specify interpreter number.  Each port of Infocom's Z-machine
199      interpreter was given a number.  `1' for their own DECSystem-20,
200      `2' for Apple IIe, `3' for Macintosh, `4' for Amiga, `5' for Atari
201      ST, `6' for IBM PC, `7' for Commodore 128, `8' for Commodore 64,
202      `9' for Apple IIc, `10' for Apple IIgs, `11' for Tandy Color.
203      Giving this option makes nitfol claim to be running on the
204      specified system.  A few games change their behaviour slightly
205      depending on which machine type they run.  By default nitfol
206      claims to be on an Apple IIe, as this makes Beyond Zork not do
207      character graphics.
208
209 `-terpver STRING'
210      Specify interpreter version.  Infocom's interpreters were given
211      versions, typically a capital letter.  Nitfol defaults to `N',
212      Frotz uses `F', and ZIP uses `B'.  Any single character version is
213      allowed.  Multicharacter options are read as a number instead of
214      an ASCII character.  Only known effect upon games is the letter
215      printed by banners and the `version' command.  Version 6 games
216      interpret this as a number instead of a letter.
217
218
219 \1f
220 File: nitfol.info,  Node: Features,  Next: Debugger,  Prev: Invoking nitfol,  Up: Top
221
222 2 Features
223 **********
224
225 * Menu:
226
227 * Preferences::                   Store options in `~/.nitfolrc'
228 * Infinite undo/redo::            Erase your mistakes and bad luck
229 * Aliases::                       Abbreviate long/common words
230 * Abbreviation Expansion::        Expand one letter commands
231 * Typo correction::               Nitfol uses a smart tokeniser
232 * Automapping::                   Automatically generate an on-screen map
233 * Quetzal::                       Save files are in Quetzal format
234 * Blorb::                         Nitfol supports Blorb resources
235
236 \1f
237 File: nitfol.info,  Node: Preferences,  Next: Infinite undo/redo,  Prev: Features,  Up: Features
238
239 2.1 Preferences
240 ===============
241
242 If you don't like the default options and don't want to recompile, you
243 can set your preferences by writing a `.nitfolrc' in your home
244 directory.
245
246    Each line should be of the form `OPTION=VALUE'.  Blank lines and
247 lines starting with a `#' are ignored.  If you want to specify
248 different options for different copies of nitfol, you can put those
249 options in a block which will only be read by copies of nitfol with a
250 specific name.
251
252    Here's an example `.nitfolrc':
253      path=/usr/local/games/infocom
254      alias=v verbose
255      alias=asierra tone cordial. ask sierra about
256      ignore=true
257
258      [strictnitfol]
259      ignore=false
260      spell=false
261      expand=false
262      autoundo=false
263      unalias=v
264      unalias=asierra
265
266      [xnitfol]
267      tandy=true
268      pirate=true
269
270    Nitfol will look in `/usr/local/games/infocom' for game files.
271 Copies of nitfol named `strictnitfol' will report Z-machine strictness
272 errors, perform strict tokenisation, and not automatically
273 `@save_undo'.  All others will ignore strictness errors and have two
274 aliases.  `xnitfol' will set the Tandy bit and branch on the piracy
275 opcode.
276
277    Options specified in the preference file may be overruled by
278 environment variables and command line options.
279
280 \1f
281 File: nitfol.info,  Node: Infinite undo/redo,  Next: Aliases,  Prev: Preferences,  Up: Features
282
283 2.2 Infinite undo/redo
284 ======================
285
286 Multiple `@restore_undo' opcodes with no intervening `@save_undo' will
287 restore earlier and earlier saved states.  However, Inform games will
288 not do this, so if you want infinite undo, you must enter the commands
289 `/undo' and `/redo'. The `/...' commands are part of the debugger, so
290 you will need to compile in debugger support to use this feature.
291
292    Z-machine games prior to version 5 do not provide undo (none of them
293 provide redo), and some version 5 games don't use it (like
294 `Wishbringer').  If the game performs two `@read' opcodes with no
295 intervening `@save_undo' or `@restore_undo', nitfol will perform a
296 `@save_undo'.
297
298 \1f
299 File: nitfol.info,  Node: Aliases,  Next: Abbreviation Expansion,  Prev: Infinite undo/redo,  Up: Features
300
301 2.3 Aliases
302 ===========
303
304 If the game has long words which you wish to abbreviate, you can use
305 aliases.  Use the command `/alias NAME VALUE'.  All instances of NAME
306 in line input will be replaced with VALUE.  NAME may not contain
307 whitespace.
308
309    Unlike abbreviation expansion and typo correction, alias expansion
310 modifies the text buffer, inserting the requested text.  This is
311 necessary to allow multiple commands to be given in an alias through
312 the use of periods.
313
314    Aliases are not expanded recursively, so you could do something
315 clever like this:
316      >/alias e w
317      /alias w e
318      /alias nw ne
319      /alias ne nw
320      /alias sw se
321      /alias se sw
322
323    And your east-west movement will be swapped (`e' will do a `w',
324 though `east' will still do `east').  Aliases expand on all input the
325 game receives using `@read', including transcripts and directions from
326 the automapper.
327
328    If you want the expansion of the alias to be checked for further
329 aliases, you must use the `/ralias' command.  This expansion is stopped
330 when an alias would expand itself.
331      >/ralias e w
332      /ralias w e
333
334    Would do nothing, as `e' is expanded to `w', which is expanded to
335 `e', and then it stops because the rule for expanding `e' has already
336 taken place.
337
338      >/ralias hanoi2 move src to extra. move src to dest. move extra to dest
339      /alias src left
340      /alias dest center
341      /alias extra right
342      hanoi2
343      You move the small disc from the left peg to the right peg.
344      You move the medium disc from the left peg to the middle peg.
345      You move the small disc from the right peg to the middle peg.
346      >move left to right
347      You move the large disc from the left peg to the right peg.
348      >/alias src center
349      /alias dest right
350      /alias extra left
351      hanoi2
352      You move the small disc from the middle peg to the left peg.
353      You move the medium disc from the middle peg to the right peg.
354      You move the small disc from the left peg to the right peg.
355
356    Ideally you should be able to define an alias which recursively
357 solves any depth by relying on lower levels being solvable, but this
358 isn't yet possible.  You must keep the expansion of aliases to a
359 reasonable size, since Inform has a fairly small buffer size.
360
361    You can remove aliases using the `/unalias' command.
362      >/unalias hanoi2
363
364    Aliases do not effect `/...' commands; if they did, it wouldn't be
365 possible to `/unalias'.
366
367 \1f
368 File: nitfol.info,  Node: Abbreviation Expansion,  Next: Typo correction,  Prev: Aliases,  Up: Features
369
370 2.4 Abbreviation Expansion
371 ==========================
372
373 Early Infocom games don't provide abbreviations like `x' for `examine'.
374 If you enable abbreviation expansion, nitfol will attempt to expand one
375 letter words at the beginning of inputs which are not in the game's
376 dictionary.
377
378    Nitfol supports the following expansions (note that some are
379 non-standard):
380
381 c   close       d   down        e   east        g   again
382 i   inventory   k   attack      l   look        n   north
383 o   oops        p   open        q   quit        r   drop
384 s   south       t   take        u   up          w   west
385 x   examine     y   yes         z   wait            
386
387    From `Zork I':
388      *West of House*
389      You are standing in an open field west of a white house, with a
390      boarded front door.
391      There is a small mailbox here.
392
393      >x mailbox
394      [x -> examine]
395      The small mailbox is closed.
396
397      >p it
398      [p -> open]
399      Opening the small mailbox reveals a leaflet.
400
401      >t leaflet
402      [t -> take]
403      Taken.
404
405 \1f
406 File: nitfol.info,  Node: Typo correction,  Next: Automapping,  Prev: Abbreviation Expansion,  Up: Features
407
408 2.5 Typo correction
409 ===================
410
411 In the Z-machine, the `@read' opcode provides the interpreter with a
412 dictionary to search in order to do tokenisation and word matching.  If
413 you enable typo correction and enter a word not in the provided
414 dictionary, nitfol will search for near misses.
415
416    From `Curses':
417      >ask jemmia about gloves
418      [jemmia -> jemima]
419      "Those are my gloves."
420
421    Nitfol takes the following steps to correct typos:
422
423   1. If the entered word is in the dictionary, behave as normal.
424
425   2. If the length of the word is less than 3 letters long, give up.
426      We don't want to make assumptions about what so short words might
427      be.
428
429   3. If the word is the same as a dictionary word with one
430      transposition, assume it is that word.  `exmaine' becomes
431      `examine'.
432
433   4. If it is a dictionary word with one deleted letter, assume it is
434      that word.  `botle' becomes `bottle'.
435
436   5. If it is a dictionary word with one inserted letter, assume it is
437      that word.  `tastey' becomes `tasty'.
438
439   6. If it is a dictionary word with one substitution, assume it is
440      that word.  `opin' becomes `open'.
441
442    This behavior can be annoying when nitfol "corrects" intentionally
443 entered words which are similar to dictionary words.  Usually this has
444 no effect upon the game, perhaps slightly changing the game's error
445 message, but may have negative effects when it causes an undesired
446 action.  Games like `Beyond Zork' expect you to type words not in their
447 dictionary to name things.  Nitfol might "correct" your entered word to
448 a dictionary word, which the game might complain about.
449
450    If typo correction is getting in your way, run nitfol with
451 `-no-smart', compile it without applying `-DSMART_TOKENISER', or edit
452 `nitfol.opt' to change the compile-time default.
453
454 \1f
455 File: nitfol.info,  Node: Automapping,  Next: Quetzal,  Prev: Typo correction,  Up: Features
456
457 2.6 Automapping
458 ===============
459
460 Nitfol has the ability to display an on-screen map showing visited
461 rooms and their connections on the current floor.  Below is a map
462 generated from `Enchanter'.
463                                         *-* *
464                                         |   |
465                         u-*-*-*-*-------*---*
466                         |               |
467             * *   *     |     *---*     |
468             |/ \ /      |    /|\ / \    |
469             *   *       *   / | X * \   *
470            /     \      |  /  |/ v|  \  |
471           /   *   *-*-*-*-*---*---u---*-*-*-@
472          /    |  /      | |\  |\ ^|  /  |
473       *-*     * *       | | \ | X * /   *-*
474          \    |/        | |  \|/ \ /    |
475           *   *         * *   *---*     *
476            \ /          | |             |
477             *           u-d-*-----------*-u
478                                         |
479                                         *
480                                          \
481                                           *
482
483    The `*'s designate rooms; the `@' the current room.  Rooms
484 containing staircases are shown with a `u' or `d', or `b' if the
485 staircase is bi-directional.  If the current room contains a staircase,
486 nitfol draws it with a `U', `D', or `B'.  Passageways are shown with
487 lines; the `X's are crossed lines.  One-way passages are shown as lines
488 with arrows.  Nitfol uses `v', `^', `<', and `>' for arrow heads.
489
490    In Glks which provide mouse events, you can click on rooms and it
491 will display the room name (and number) in the upper left hand corner
492 of the map.  Note that XGlk is slightly broken, so you need to click on
493 the left-hand side of the room.  Clicking on an empty map space clears
494 the name.
495
496    In order to use automapping, you must tell nitfol how to calculate
497 the current location.  You do this by specifying an Inform expression,
498 so you must have debugging enabled.
499
500    Typically the current location is available in a global.  In Z-code
501 versions 3 and prior, the current location is always stored in global
502 zero, so typing `/automap (global) 0' should work.  In later versions,
503 you must figure out an expression which evaluates to the current
504 location.
505
506    First, find out where the player object is.  Typically, the player
507 object is named `self', `cretin', `self-object', or the name of the PC.
508 You can use the `find' command to search object names.  If this all
509 fails, try `object-tree' to find the location number.
510
511    Once you have found the number of the location, you need to figure
512 out which global keeps track of the location.  You can use the
513 `globals' command to search the globals.
514
515    From `Spider And Web':
516      >/find self
517      20 "(self object)"
518      25 "yourself" in 91 "End of Alley"
519      26 "yourself" in 48 "chair"
520      /globals 91
521      G15 G36 G39
522      s
523
524      *Mouth of Alley*
525      You're in the entrance of a narrow brick alley, which runs further
526      in to the north. To the south a broad street courses by, congested
527      with traffic and bicycles, although none of them seem to notice you.
528
529      >/find self
530      20 "(self object)"
531      25 "yourself" in 94 "Mouth of Alley"
532      26 "yourself" in 48 "chair"
533      /globals 94
534      G15 G36 G39
535      /automap (global) 15
536
537    Obviously we have 3 globals tracking the player location.  Typically
538 there are only two, but some games have more.  In this, we just picked
539 the first one, which is probably the Inform `location' variable;
540 another is probably the `real_location' variable.  Depending on how you
541 want automapping to behave in the dark, or when dealing with
542 game-specific stuff, you may want to pick a different one.
543
544    To figure out what is in which direction, nitfol checks the current
545 location, tells the game to go north, checks the new location, undoes
546 the north movement, tries to go northeast, and so on.  During all of
547 this, output is disabled.
548
549    Drawing the map is more complicated.  First nitfol looks for cycles
550 in the graph and makes the cycles connect properly.  Then it draws the
551 map.  If parts of the map overlapp, it finds a path connecting the
552 overlapping bits and tries increasing the length of each passage in
553 this path by one, and recalculates cycle connections.  If this solves
554 the problem, it's done; otherwise, it tries increasing the length of
555 two passages, or of one of the passages by two.  If this fails, it
556 gives up.
557
558    This technique isn't perfect.  The implementation of this technique
559 isn't perfect either.  So expect nitfol to misbehave a lot on complex
560 maps, and a little on simple maps.  If you clever ideas on how to
561 improve it, let me know.
562
563    Nitfol makes an effort to simplify the map.  If multiple exits go
564 from the barn to cornfield and you've been to both places, nitfol will
565 draw a single two-way passage if possible.  If both up and west go up
566 the stairs and nitfol knows east returns from the top of the stairs,
567 nitfol will draw it as a simple west-east passage ignoring the up/down.
568 If east doesn't return from the top of the staircase, nitfol will draw
569 it as up/down, leaving out the west passage.
570
571    If you've been north of a gate, and come up to the gate from the
572 south, and unlock the gate, nitfol will draw it as a one-way passage
573 since last time it was north of the gate, it couldn't go south.
574
575    Some games feature reincarnation, perhaps moving you to a new
576 location.  If movement leads to your death, this makes nitfol think the
577 reincarnation location is in that direction.  Nitfol watches for three
578 asterisks in a row and will assume they mean death instead of a normal
579 passage.
580
581    Some of these problems could be avoided by having nitfol explore
582 each neighboring room, but this would make automapping even slower.
583
584 \1f
585 File: nitfol.info,  Node: Quetzal,  Next: Blorb,  Prev: Automapping,  Up: Features
586
587 2.7 Quetzal
588 ===========
589
590 Nitfol uses Quetzal version 1.4 for its save format, so you can use
591 your saves between different computers and interpreters.  More
592 information about Quetzal is available at
593 `http://www.geocities.com/SiliconValley/Vista/6631/'.
594
595    If you specify a save-file on the command-line on UNIX, nitfol uses
596 a `UNIX' `IntD' chunk to locate the game file associated with the save
597 name.  This chunk is included in save games when nitfol can figure out
598 the current filename.  If you compile nitfol with -D__USE_GNU,
599 -D__USE_BSD, or -D__USE_XOPEN_EXTENDED, nitfol will canonicalize the
600 file name, so you don't have to worry about relative file name
601 specifications no longer working if you invoke nitfol from a different
602 directory.
603
604    On MacOS, nitfol uses alias records from a `MACS' `IntD' chunk to
605 locate the game file.  This won't work for games built-in to the
606 interpreter.
607
608    If no `IntD' chunk is included, nitfol searches the environment
609 variable `INFOCOM_PATH' for a game with matching release number, serial
610 number, and checksum.
611
612    Looking for games without an `IntD' chunk isn't foolproof, but it
613 should work most of the time.  Serial numbers are basically the date
614 and it's extremely unlikely more than ten games will be compiled on the
615 same day (the only time lots of games are compiled on same day is right
616 before competition time).  Assuming they all have the same release
617 number, there's still only a .0686% chance that at least two of these
618 ten will share the same checksum.  If someone reports this as a
619 problem, I'll make nitfol ensure the game contains a `save' opcode
620 right before the restored PC.
621
622 \1f
623 File: nitfol.info,  Node: Blorb,  Prev: Quetzal,  Up: Features
624
625 2.8 Blorb
626 =========
627
628 If you wish to hear sounds or see graphics in your games, they must be
629 packaged in Blorb files.  The Z-machine game may included in the Blorb
630 file or may be specified separately.  Nitfol does not support the
631 traditional Infocom `.mg1' and `.snd' files.
632
633    Note that graphics are displayed incorrectly, and sound has not yet
634 been tested.
635
636 \1f
637 File: nitfol.info,  Node: Debugger,  Next: Bugs,  Prev: Features,  Up: Top
638
639 3 Debugger
640 **********
641
642 Nitfol debugging mode tries to imitate the GDB interface.  If you're
643 familiar with that, you should have no problem using nitfol (other than
644 dealing with the current incompleteness).
645
646    You need inform 6.21 or later, as earlier versions don't produce
647 correct infix files without a patch.  You then need to compile infix
648 information for your game.  I recommend doing:
649
650    `inform -k -~S -~X -~D MYGAME.inf'
651
652    Then your debug information will be in `gameinfo.dbg'.  If you have
653 a command-line on your platform, run nitfol like `nitfol MYGAME.z5
654 -symbols gameinfo.dbg'.  Otherwise, start up your game and type
655 `/symbol-file gameinfo.dbg' the first time you get a prompt.
656
657    When the game stops to read a line of text, you can begin that line
658 with `/' to give a debug command.  If you want to pass a line beginning
659 with a `/' to the game, double the `/' and the game will be passed the
660 second one.  When at a `(nitfol) ' prompt, starting commands with `/'
661 is neither necessary nor recommended.
662
663    All expressions are like the ones used in Inform.
664
665    You can perform casts to get the result in the form you want:
666
667 `(number) EXPRESSION'
668      Use EXPRESSION as if it were a number.  Useful when you want to
669      know the number of something, not the object, routine, or string
670      information nitfol normally gives.
671
672 `(object) EXPRESSION'
673      Use EXPRESSION as if it were an object.  Most useful when printing
674      the result, as it will show the object's attributes and properties.
675
676 `(routine) EXPRESSION'
677      Use EXPRESSION as if it were the packed address of a routine.
678      Useful if you have the packed address of a routine which you want
679      to set a breakpoint at.
680
681 `(string) EXPRESSION'
682      Use EXPRESSION as if it were the packed address of a string.
683      Useful for printing it.
684
685 `(global) EXPRESSION'
686      Evaluates to the value of a numbered global.  `(global) 0' is the
687      player location for version 3 Infocom games.
688
689 `(local) EXPRESSION'
690      Evaluates to the value of a numbered local.  Not terribly useful
691      unless you're debugging something without source.
692
693    Here are short descriptions of the debugger commands.  *note
694 (gdb)Top::, for more information.  Some of these were taken/adapted
695 from GDB's help.
696
697 `up-silently'
698 `up-silently NUM'
699      Select the parent of the selected frame silently.  An argument
700      specifies how many frames up to go.
701
702 `set EXP'
703      Evaluate an expression without printing its value.
704
705 `backtrace'
706 `backtrace NUM'
707 `backtrace - NUM'
708      Display the parent functions of the current frame.  An argument
709      specifies how many frames back to show.  If the argument is
710      negative, start from the first frame instead of the current.
711
712 `break LINESPEC'
713 `break LINESPEC if EXP'
714      Set a breakpoint.  An `if' clause specifies a condition.
715
716 `recording off'
717      Stop recording a script.
718
719 `recording on'
720      Start recording a script.
721
722 `down-silently'
723 `down-silently NUM'
724      Silently select the child of the selected frame.  An argument
725      specifies how many frames down to go.
726
727 `show copying'
728      Show licensing information.
729
730 `condition NUM EXP'
731      Set a condition for an existing breakpoint.
732
733 `step'
734 `step NUM'
735      Step through program to a different source line.  An argument
736      specifies a repeat count.
737
738 `remove EXP'
739      Remove an object from the object tree.
740
741 `replay'
742      Replay a recorded script.
743
744 `down'
745 `down NUM'
746      Select the child of the selected frame.  An argument specifies how
747      many frames down to go.
748
749 `globals'
750 `globals EXP'
751      List all global variables and their values.  With an argument,
752      list all only those with a specific value.
753
754 `enable display NUM'
755      Re-enable an automatic display.
756
757 `nexti'
758 `nexti NUM'
759      Step one instruction, stepping over subroutine calls.  Step a
760      specified number of instructions, stepping over subroutine calls.
761
762 `until'
763      Resume execution until the program reaches a line number greater
764      than the current line.
765
766 `object-tree'
767 `object-tree EXP'
768      Display the object tree.  An argument says which object to use as
769      the root of the tree.
770
771 `stepi'
772 `stepi NUM'
773      Step exactly one instruction.  An argument specifies a repeat
774      count.
775
776 `show warranty'
777      Show warranty information.
778
779 `restart'
780      Restart the game.
781
782 `undo'
783      Undo last move (not last debugger command).
784
785 `frame'
786 `frame NUM'
787      Show the selected stack frame.  An argument specifies a stack
788      frame to show.
789
790 `select-frame NUM'
791      Select a specific stack frame.
792
793 `continue'
794 `continue NUM'
795      Continue execution.  An argument sets the ignore count of the
796      current breakpoint.
797
798 `finish'
799      An argument specifies a repeat count.
800
801 `give EXP NUM'
802 `give EXP ~ NUM'
803      Give an object an attribute.  With a tilde clears the attribute
804      instead of setting it.
805
806 `find'
807      Find objects whose shortnames contain a string.
808
809 `jump LINESPEC'
810      Continue execution at a new location.
811
812 `show language'
813      Show the current source language.
814
815 `dumpmem FILE'
816      Dump memory to a file
817
818 `undisplay NUM'
819      Stop automatically displaying an expression.
820
821 `disable NUM'
822      Temporarily disable a breakpoint.
823
824 `restore'
825      Restore a saved game.
826
827 `redo'
828      Redo undid move.  Only works immediately after an `undo'.
829
830 `info sources'
831      List source files.
832
833 `symbol-file FILE'
834      Load debugging info from a file (usually `gameinfo.dbg').
835
836 `display EXP'
837      Print value of an expression each time the program stops.
838
839 `next'
840 `next NUM'
841      Step through program, stepping over subroutine calls.  An argument
842      specifies a repeat count.
843
844 `info breakpoints'
845 `info breakpoints NUM'
846      List breakpoints.  An argument specifies a specific breakpoint to
847      list.
848
849 `unalias NAME'
850      Remove an alias
851
852 `help'
853      Print list of commands.
854
855 `move EXP to EXP'
856      Move an object around the object tree.
857
858 `delete NUM'
859      Delete a breakpoint.
860
861 `quit'
862      Exit nitfol.
863
864 `up'
865 `up NUM'
866      Select the parent of the selected frame.  An argument specifies
867      how many frames up to go.
868
869 `alias NAME VALUE'
870      Add an alias
871
872 `enable NUM'
873      Re-enabled a breakpoint.
874
875 `automap EXP'
876      Start automapping
877
878 `info source'
879      Get information on the current source file.
880
881 `replay off'
882      Halt replay.
883
884 `#  comment'
885      Enter a comment
886
887 `ralias NAME VALUE'
888      Add a recursive alias
889
890 `ignore NUM NUM'
891      Set the ignore count for a breakpoint.
892
893 `print EXP'
894      Evaluates an expression and prints the result.  This can include
895      function calls.
896
897 `disable display NUM'
898      Temporarily disable an automatic display.
899
900
901    If you're on a UNIX and you don't like the GDB interface, you can
902 compile cheapnitfol and run it as the inferior debugger under Emacs or
903 DDD.  You can also try compiling `xnitfol' with `-DSTDOUT_DEBUG' and
904 trying that, but I haven't tested that much.
905
906 `ddd MYGAME.z5 --debugger cheapnitfol -s gameinfo.dbg -prompt "(gdb) "'
907
908 \1f
909 File: nitfol.info,  Node: Bugs,  Next: Thanks,  Prev: Debugger,  Up: Top
910
911 4 Bugs
912 ******
913
914 A nitfol bug is any behaviour which makes nitfol reliably misbehave,
915 with the exceptions of bugs in Glk libraries.  These include: anything
916 which makes nitfol crash (other than when nitfol reports `FATAL'
917 errors), anything which causes nitfol to contradict the Z-machine
918 standards documents (except for optional enhancements like spelling
919 correction and debug mode), any buffer overflows, and anything which
920 makes nitfol infinite loop other than infinite loops in the game itself.
921
922    Before reporting a bug, make sure the bug is not listed below and
923 your copy of nitfol is not compiled with `-DFAST'.  Please report the
924 version of nitfol, your system type and a series of commands which
925 reliably cause the bug.
926
927    Nitfol is lacking:
928    - Graphical font (`Beyond Zork')  (should use images for this)
929
930    - Terminating character support (mostly `Beyond Zork')
931
932    - Reverse video, full color (should querry Glk more aggressively)
933
934    - Unicode support
935
936    - keypad character codes
937
938    - its own random number generator (relies on system one)
939
940    Nitfol does incorrectly:
941    - Play is not paused to wait for sounds to complete in `The Lurking
942      Horror'.
943
944    - Pictures and text are not placed correctly for v6 games.
945
946    - block quotes are placed in the upper window, so `cheapnitfol'
947      can't see them.
948
949    - Corrupted save files may make nitfol do bad things.
950
951    - Should figure out a way to handle buggy games like `AMFV' and
952      `Varicella' which assume the upper window is 80 columns wide.
953
954    - Doesn't catch header writing other than `@storeb' and `@storew'.
955
956    Debugger problems:
957    - Sometimes says there's no code at a location where it could be
958      clever and   find some.
959
960    - `ofclass', superclass not implemented.
961
962    - Should perform more sanity checks everywhere.
963
964    - Lots of useful commands not yet implemented.
965
966    - OBJECT.FUNCTION is handled incorrectly, both for assignments and
967      calls.
968
969    - Assumes you know what you're doing, so `quit', `run', etc., don't
970      prompt you for confirmation.
971
972    Automapping problems:
973    - Doesn't work well for random destinations (the forest in `Advent')
974
975    - `@get_cursor' doesn't return the correct value during automapping
976      since output is disabled.
977
978    - Requires too much work for the end-user; should put in stuff to
979      make it figure out the location global in 95% of games.
980
981    - Doesn't really work if multiple locations are coded as being in
982      the same room (long road in `Enchanter').
983
984    - Doesn't show exits which go nowhere, but change the game.
985
986    - Perhaps should use graphics windows when available.
987
988    - Movement causing teleportation confuses it.
989
990    - Reincarnation handling isn't optimal.
991
992    - Still very buggy.
993
994    - It's too slow.
995
996    - Should realize it can add extra bends (especially in one-way
997      passages).
998
999    - Should be able to output nice-looking Postscript.
1000
1001    - Should store map in saved games (wait until automapping code
1002      stabilizes).
1003
1004 \1f
1005 File: nitfol.info,  Node: Thanks,  Next: Games Cited,  Prev: Bugs,  Up: Top
1006
1007 5 Thanks
1008 ********
1009
1010 The following people have given comments, suggestions, bug reports,
1011 answered questions, or helped port nitfol (in alphabetical order):
1012    - John Cater
1013
1014    - Paul David Doherty
1015
1016    - Martin Frost
1017
1018    - Doug Jones
1019
1020    - David Picton
1021
1022    - Andrew Plotkin
1023
1024    - Andrew Pontious
1025
1026    - L. Ross Raszewski
1027
1028    - Dan Shiovitz
1029
1030 \1f
1031 File: nitfol.info,  Node: Games Cited,  Prev: Thanks,  Up: Top
1032
1033 6 Games Cited
1034 *************
1035
1036 `Wishbringer' Copyright (C) 1985, 1988 Infocom Inc.
1037
1038 `Zork I' Copyright (C) 1981-1986 Infocom Inc.
1039
1040 `Curses' Copyright (C) 1993-1994 Graham Nelson.
1041
1042    `http://ifarchive.org/if-archive/games/zcode/curses.z5'
1043
1044 `Beyond Zork' Copyright (C) 1987 Infocom Inc.
1045
1046 `Enchanter' Copyright (C) 1983, 1984, 1986 Infocom Inc.
1047
1048 `Varicella' by Adam Cadre 1999.
1049
1050    `http://adamcadre.ac/content/vgame.z8'
1051
1052 `Spider And Web' Copyright (C) 1997-1998 Andrew Plotkin.
1053
1054    `http://ifarchive.org/if-archive/games/zcode/Tangle.z5'
1055
1056
1057 \1f
1058 Tag Table:
1059 Node: Top\7f205
1060 Node: Invoking nitfol\7f1544
1061 Node: Features\7f8420
1062 Node: Preferences\7f9069
1063 Node: Infinite undo/redo\7f10425
1064 Node: Aliases\7f11199
1065 Node: Abbreviation Expansion\7f13723
1066 Node: Typo correction\7f14840
1067 Node: Automapping\7f16754
1068 Node: Quetzal\7f22533
1069 Node: Blorb\7f24254
1070 Node: Debugger\7f24680
1071 Node: Bugs\7f31655
1072 Node: Thanks\7f34710
1073 Node: Games Cited\7f35126
1074 \1f
1075 End Tag Table