========================================================================= Date: 21 Nov 87 20:02 -0600 To: A. Patzner Reply-To: Apple II List Sender: Apple II List From: Grant Delaney Subject: KIWI Krill's Infocom Word Inspector This file contains the program and docs for a program to inspect the words in any INFOCOM game. Thanks to Don Elton for forwarding it to me so that it could be posted. ================== >Posted-Date: Tue, 17 Nov 87 16:56:28 EST +----------------------------------+ ! Documentation for ! ! ! ! Krill's Infocom Word Inspector ! ! A.K.A (KIWI) ! ! ! ! by: Krill ! +----------------------------------+ WARNING: USE OF THIS PROGRAM ON GAMES THAT YOU HAVE YET TO SOLVE CONSTITUTES CHEATING UNDER THE FEDERAL ADVENTURE GAME MORALITY ACT OF 1986. KRILL CANNOT BE HELD IN ANY WAY RESPONSIBLE FOR LOSS OF CONSCIENCE DUE TO IMPROPER USE OF THIS PROGRAM. Introduction: Krill's Infocom Word Inspector is a program for the Apple II that automatica lly generates a listing of all the words that an Infocom adventure will accept as valid input. This program should be used only after solving an adventure to find interesting debugging commands, and words that cause humorous responses. The use of this p rogram as an aid in solving an adventure is considered to be an act of severe m oral turpitude. Commands: At the "Insert game disk" prompt: D - Toggle drive ^C - Exit program ESC- Exit program Any other key starts the listing. During the listing: ^C - Exit program ^S - Pause listing ESC- Go to "Do another game" prompt At the "Do another game" prompt: Y - Go to "Insert game disk" prompt N - Exit program Comments: Krill's Infocom Word Inspector (KIWI) should work with any Apple Infocom adv enture that doesn't use the new EZIP, which "A Mind Forever Voyaging" uses. To use KIWI on copy-protected games, you must first make the following patch to DO S by entering the monitor (CALL -151) and typing: B925:18 60 B988:18 60 B8FB:29 00 I considered having KIWI do this automatically, but decided that it is impol ite for a program to patch DOS without permission. To make a printout of the listing, simply type PR#1 (or whatever slot your p rinter is in) before running the program. The title and prompts are written di rectly to the screen, and will not appear on the printout. A side-effect of th is feature is that the title and prompts will not appear on Apple II and II+ 80 column displays, but will appear on //e and //c displays. To understand some things about the listing, it is helpful to know how the I nfocom text packing scheme works. The scheme uses a five bit code, with the ab ility to shift between different character sets. The code also has provision f or macros, but thi s is not used in the vocabulary words; it is only used in text to be output. T here are two versions of the code: one used in the really old games (Zork I and II) and one used in the newer games. KIWI is able to determine which code is being used, and tr anslate accordingly. In the older code, there were characters for shifting to another set permanently and seperate characters for shifting sets for only the next character. In the newer code Infocom sacrificed the ability to shift sets permanently in or der to expand the number of macros possible. (I suspect that they intended to h ave two consecutive shifts cause a permanent shift, thereby freeing up the othe r characters for macro use while keeping the capability of permanent shifts, bu t due to a bug in their program, they abandoned the idea.) Here is a complete listing of the newer code: | lower case | upper case | symbols _________________________________________ 00| space | space | space 01| macro1 | macro1 | macro1 02| macro2 | macro2 | macro2 03| macro3 | macro3 | macro3 04| shift to | shift to | shift to | upper case | lower case | lower case 05| shift to | shift to | shift to | symbol | lower case | lower case 06| a | A | ASCII 07| b | B | CR 08| c | C | 0 09| d | D | 1 0A| e | E | 2 0B| f | F | 3 0C| g | G | 4 0D| h | H | 5 0E| i | I | 6 0F| j | J | 7 10| k | K | 8 11| l | L | 9 12| m | M | . 13| n | N | , 14| o | O | ! 15| p | P | ? 16| q | Q | _ 17| r | R | # 18| s | S | ' 19| t | T | " 1A| u | U | / 1B| v | V | \ 1C| w | W | - 1D| x | X | : 1E| y | Y | ( 1F| z | Z | ) All shifts only apply to the next character. When the ASCII (symbol 06) is encountered, the next two characters (ten bits) are truncated to seven bits and translated as an ASCII character. This allows for ASCII characters not in the symbol set (e.g. &) to be used. When a macro character is encountered, the next character refer s to a pre-defined string of characters. Since there are three macro character s, there are 96 possible macros (32 in the old code). In the older code, the differences are as follows: 02| temporary | temporary | temporary | shift to | shift to | shift to | upper case | symbol | lower case 03| temporary | temporary | temporary | shift to | shift to | shift to | symbol | lower case | upper case 04| permanent | permanent | permanent | shift to | shift to | shift to | upper case | symbol | lower case 05| permanent | permanent | permanent | shift to | shift to | shift to | symbol | lower case | upper case Since the macro characters are never used in the vocabulary, KIWI knows that if it encounters a 02 or 03, then the code it is looking at must be the old co de, and it translates accordingly. If KIWI encounters a 01, it prints out a fl ashing space. This should never happen. If it does, you are probably either not looking at an I nfocom disk, or there is something wrong with your disk. If it happens on an I nfocom disk, try the $ve (verify) command on it. Now that you know something about the Infocom code, you can understand some peculiarities in the listing. All Infocom vocabulary words are truncated to th eir first six characters, but some of those characters may not be visible. For example, when $ve rify is truncated, it comes out as $ve, since the first six characters are 05 0 6 01 04 1B 0A (the 01 and the 04 are ASCII "$" stretched into two five bit chun ks). Now, suppose there was an Infocom word "word$". This truncates to 1C 14 17 0D 05 06, which is displayed as "word". But if in the game you type "word", the game would sa y it didn't know that word, because even though those shift characters are not displayed, they are there. But if you typed "word" followed by any ASCII chara cter that is not i n the symbol set, it would match. So "word$" and "word%" would both match. If you ever see a word in the listing, but the game doesn't seem to recognize it, try typing it followed by a symbol from the symbol table, and if that doesn't work, then try typing it followed by a symbol that is not in the symbol set (e.g. $). I hope you enjoy using KIWI. Look forward to implementations of KIWI for ot her computers, coming soon to a line near you. Send any questions, comments, o r suggestions about KIWI to Krill on C.O.M.P.U.T.E (614) 239-7621. rash!pnet01!pro-sol!pro-carolina!delton ARPA: crash!pnet01!pro-sol!pro-carolina!delton@nosc.mil INET: delton@pro-carolina.cts.com UUCP: [ ihnp4 sdcsvax nosc ] !crash!pnet01!pro-sol!pro-carolina!delton ARPA: crash!pnet01!pro-sol!pro-carolina!delton@nosc.mil INET: delton@pro-carolina.cts.com ??????????????????????????