• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D03-May-20221.5 KiB5418

READMEH A D25-Nov-20097.9 KiB191145

commons.cH A D14-Oct-199815.9 KiB748740

commons.hH A D14-Oct-19989.3 KiB213182

dungeon.cH A D14-Oct-19987 KiB289164

funcs.hH A D25-Nov-20095.9 KiB119114

game.cH A D24-Nov-200914.9 KiB601360

gdt.cH A D25-Nov-200922 KiB845763

glkstart.cH A D24-Nov-2009917 3213

miscfort.cH A D14-Oct-19983.1 KiB154132

miscfort.hH A D24-Nov-2009383 1913

objects.cH A D14-Oct-1998108.5 KiB5,3283,529

osdepend.cH A D25-Nov-200914.7 KiB583438

parser.cH A D24-Nov-200970.1 KiB2,7091,713

rooms.cH A D14-Oct-199833.8 KiB1,7181,109

subr.cH A D14-Oct-199843.2 KiB2,1241,225

timefnc.cH A D14-Oct-199850 KiB2,2851,453

verbs.cH A D14-Oct-199888.8 KiB4,2712,803

README

1Dungeon 3.2B, C port (Glk)
2
3Translated and ported by Andrew Plotkin <erkyrath@eblong.com>
4GDT port and 64-bit patches by Paul Goyette <pgoyette@whooppee.com>
5Fortran source for Dungeon by Robert M. Supnik
6Dungeon was created by Tim Anderson, Marc Blank, Bruce Daniels, and Dave
7Lebling.
8Dungeon is copyright 1980, 1990 by Infocom, Inc (now owned by
9Activision)
10
11*** Introduction ***
12
13Welcome to Dungeon.
14
15This is a Glk port of a C translation of the Dungeon 3.2B Fortran source
16code. Hark, is that the sound of a million hackers crying out "Huh?" and
17then falling silent? Let me explain.
18
19Dungeon is the original Zork text adventure. It was later split up and
20modified into the Zork trilogy, which was sold for home computers by
21Infocom, Inc. It's the game with the troll, the thief, and the white
22house with its front door boarded up.
23
24(If you're looking for nasty little dwarves, "xyzzy", and a black rod
25with a rusty star on the end, this isn't it. You want Adventure, also
26known as Colossal Cave. Down the valley, follow the stream, on your
27right, a well house for a large spring -- you can't miss it.)
28
29There have been many versions and ports of Dungeon. This code is based
30on version 3.2, patchlevel B. That's the latest Fortran source code
31known to exist. It was released, believe it or not, in 1994.
32
33I translated the 3.2B Fortran source into C, using the translation tool
34f2c. This was a hairy and a half, believe me, because Dungeon is written
35in a nonstandard dialect of Fortran. I had to modify f2c itself. Thanks
36to the miracle of open-source software, this was not unduly difficult.
37(Although GNU bison wouldn't compile the yacc source that forms the
38heart of f2c... well, I got it worked out.)
39
40I then removed the Fortran compatibility libraries that f2c provides.
41This is the code that handles input and output -- both to the player,
42and to the data files that come with Dungeon.
43
44Instead, I installed code to handle input/output through Glk. Glk is a
45portable I/O library that I created especially for text adventures --
46although it may be useful for other tasks as well. I designed Glk to
47provide a natural interface on many platforms: text terminals, the
48Macintosh GUI, X Windows, Microsoft OSes, even PDAs such as the
49PalmPilot. This port of Dungeon is an experiment and a demonstration of
50the usefulness of Glk.
51
52*** Modifications ***
53
54This version should be functionally identical to the Fortran version in
55nearly every way. I have made a few changes, however.
56
57    Reformatted all the text to remove linebreaks. The Glk library
58handles all line-wrapping now. ASCII art, such as the images of the
59zorkmids, is preserved (with appropriate Glk commands to display in a
60fixed-width font even on graphical displays, which normally use
61proportional fonts.)
62    Added and removed a few linebreaks for purely aesthetic reasons.
63(For example, if you type "take all", the each "object: taken" message
64appears on one line, rather than split over two.)
65    Added a status line. This displays the room name on the left, and
66your score and the number of moves on the right, in classic Infocom
67fashion.
68    The "restore" command works when you're dead. ("Save" still does
69not.)
70    If the game cannot determine how long you've been playing, the
71"time" command prints an appropriate message.
72    With some hesistation, I added a normal command prompt to the Loud
73Room.
74    Fixed a couple of minor misspellings.
75    The data files "dindx.dat" and "dtext.dat" have been unified into
76"dundat", with a more compact format.
77    The save file format is also changed; don't expect to re-load games
78that you saved from the Fortran version. However, the save files are
79compatible across all versions of Glk Dungeon 3.2B (Mac, DOS, Unix,
80etc.)
81
82*** The Debugger ***
83
84Paul Goyette has contributed a Glk port of gdt, the game debugging
85toolkit. This is not compiled in by default. To try it, edit the
86Makefile to include the "GDT_FLAG = -DHAVE_GDT=1" line.
87
88In the game, type "gdt" to enter debug mode. At the debug prompt, "he"
89lists all the debug commands; "ex" exits debug mode. What does it all
90mean? Experiment!
91
92*** Building Dungeon ***
93
94Since this is a Glk program, it must be built with a Glk library. See
95the Glk home page at
96
97http://eblong.com/zarf/glk/index.html
98
99The Unix Makefile that comes with this package is designed to link any
100of the Unix libraries (XGlk, GlkTerm, and CheapGlk.) You'll have to
101go into the Makefile and set three variables to find the library. There
102are instructions at the top of the Makefile. Then just type
103
104    make dungeon
105
106By default, the program looks for its data file "dundat" in the
107current directory; you must be in the same directory as that file to
108run the game. If you want to install the game to a permanent location,
109modify the DATADIR line in the Makefile to refer to a directory, and
110then copy "dundat" to that directory.
111
112*** History ***
113
114(Section I. to V. of this history are drawn from the HISTORY file in the
115old C translation of Dungeon version 2.7.)
116
117I. From the original documentation...
118
119To:     Dungeon Players
120From:   "The Translator"
121Subj:   Game Information
122Date:   8-OCT-80
123
124This is the first (and last) source release of the PDP-11 version of
125Dungeon.
126
127II. DEC FORTRAN to f77 Conversion (17-nov-81)
128
129The conversion from DEC FORTRAN to Unix f77 was done by Randy Dietrich,
130Lynn Cochran and Sig Peterson.  Much hacking was done to get it to fit
131in the limited address space of a PDP-11/44 (split I/D). Suffice it to
132say that by leaving out the debugging package and not linking in the f77
133i/o library they managed to get it to run.
134
135III. PDP to VAX (dec-85)
136
137Based on the work of Randy, Lynn and Sig, Bill Randle folded in the full
138save/restore functions and the game debugging package (gdt) into the pdp
139version to create a Vax/Unix version.  This version also uses f77 i/o,
140thus eliminating the extra speak and listen processes needed on the pdp.
141
142IV. Cleanup I (11-dec-86)
143
144John Gilmore (hoptoad!gnu) cleaned up the source files by moving most of
145the common declarations into include files and added comments from the
146original (FORTRAN or MDL?) source.  His efforts are greatly appreciated.
147
148V. Cleanup II (9-feb-87)
149
150Bill Randle (billr@tekred.tek.com) added the pdp dependencies back into
151the Vax source files with #ifdefs in order to have just one set of
152sources.  Previously, there were two sets of source: one for the pdp and
153one for the Vax.  In addition, a shell escape of the form !cmd was added
154and the wizard can enter the gdt without having to recompile the source.
155Finally, a man page was generated, based on the dungeon.doc file.
156
157VI. Assorted Additions (up to oct-94)
158
159Performed, to the best of my knowledge, by Robert Supnik. This includes
160several puzzles, "lots and lots and lots and LOTS" of bug fixes, an
161unsatisfying afterlife, and a Last Lousy Point.
162
163VII. C Translation (oct-98)
164
165See my diatribe above.
166
167*** Copyrights and Other Verbiage ***
168
169Please note that Dungeon has been superceded by the game ZORK(tm). The
170following is an extract from the new product announcement for ZORK in
171the September, 1980 issue of the RT-11 SIG newsletter:
172
173"'ZORK: The Great Underground Empire - Part I' ...was developed by the
174original authors based on their ZORK (Dungeon) game for the PDP-10. It
175features a greatly improved parser; command input and transcript output
176files; SAVEs to any device and file name; and adaptation to different
177terminal types, including a status line on VT100s. Note: this is not the
178FORTRAN version that has been available through DECUS. This version has
179been completely rewritten to run efficiently on small machines - up to
18010 times as fast as the DECUS version.
181
182"...ZORK runs under RT-ll, HT-ll, or RSTS/E and requires as little as
18320K words of memory and a single floppy disk drive. The game package,
184consisting of an RX01-format diskette and an instruction booklet, is
185available from Infocom, Inc., P.O. Box 120, Kendall Station, Cambridge,
186Ma. 02142."
187
188Copyright on the Dungeon sources is retained by Infocom, and commercial
189use is strictly prohibited. ZORK(tm) is a trademark of Infocom, Inc.
190
191