forked from videogamepreservation/zork-fortran
-
Notifications
You must be signed in to change notification settings - Fork 1
LydiaMarieWilliamson/zork-fortran
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a Fortran version of the source code for Zork, based ultimately on the original translation to Fortran from MDL. It has been updated to make it compatible with Fortran 2018 and to remove some of its bugs. Further details on this may be found in ‟History”. In addition, a new translation into C99, separate from the 1991 C translation described in ‟History”, is in the C2021 subdirectory, an update of the 1991 C translation is under C1991, with some of the bugs, that it inherited from the Fortran version, removed. The Makefile provided here (which subsumes the one described below) is set up for a linux::gfortran configuration. No additional measures have yet been added for the ‟GDB” in-program debugger, and it's possible that none may be. Script file inputs and outputs may be added to be used for regression testing. As with other games, this contains the architecture of an entire world in it ... but also some fixed parameters that best belong in the source code files, instead. The first README addenda ━━━━━━━━━━━━━━━━━━━━━━━━ From Tom Almy: Running dungeon ─────────────── Run dungeon (also known as "ZORK") from the directory containing the *.dat files. This "mainframe zork" has everything contained in the commercial ZORK I, part of ZORK II, and the endgame from ZORK III. Some mainframe computers don't have this full version, so if your mainframe doesn't have the endgame, the bank of zork, and the puzzle room, you are in for some new challenges. BTW, the source files say copyright INFOCOM, but allow non-commercial use. This was the last version before INFOCOM went commercial. Compiling dungeon ───────────────── The makefile will make dungeon.exe from the sources. You will need: ∙ A UNIX like make (I use Don Kneller's NDMAKE) ∙ Microsoft Fortran (versions 4 and 5 tested) I modified the sources only slightly from the distribution I received (which was intended for the VAX). Changes made: ∙ INCLUDE statement syntax different ∙ Continuation character moved from column 1 to 6 (boy is the VAXUNIX wierd!) ∙ Bitwise logical function names changed. ∙ GDT command always available if compiled with debug code present (see Makefile for instructions). All pretty trivial. The program readit (compiled from readit.f or readit.c) will decompile the database files ‟dindx.dat” and ‟dtext.dat”. This is useful for the cheaters among you, particularly those compiling in the GDT command. :-) The original README ━━━━━━━━━━━━━━━━━━━ This is a source file distribution for the game dungeon as implemented in f77 for Unix(R) systems. It is based on the game dungeon as distributed on a DECUS tape, circa 1980. It has been converted from the original DEC FORTRAN into something that is palatable to Unix f77. See the file ‟History” for some revision history and credit to those whose efforts have made this possible. Branch Note: this branch of Zork is being used as a starting point for translation C using a more up-to-date Fortran-to-C translator; and will be subject to a round of major recoding to bring it up to sync with our locally-maintained version of both this branch and the C branch. Both will be merged. Checkout the Makefile and adjust it to fit your system. The only things that should really need tweaking are the directory definitions and the ‟-D” defines. There is an example for both large address machines (e.g. Vax) that get the complete game and small address machines (e.g. Pdp-11) that get a modified game with minor functionality missing (to get it to fit). Also edit the include file ‟files.h” if necessary. All of the f77 files end in a '.f' extension to force f77 to invoke the C preprocessor for the #include files and #ifdefs. Most of the #ifdefs are for the PDP version (default non-pdp) and for debug (default off). Except for dtext.dat, all files in the distribution kit are ASCII. dtext.dat is a binary file consisting of 76-byte fixed length records. This has been compiled and tested on a PDP-11/44 Version 7, PDP-11/70 2.9bsd Vax-11/785 4.3bsd and Sun-3 before the pdp and Vax sources were merged (see the file ‟History”). After the merge it was again tested on the Vax 11-785 4.3bsd. I/we consider my/our changes to be in the public domain. The original source, however, is copyright. John Gilmore, Nebula Consultants hoptoad!gnu 1986/11/11 Bill Randle Tektronix, Inc. [email protected] 1987/02/09 Dungeon consists of the following files: (0 = contained in the original versions only, 1 = contained in the current version only) dmain.f -program root dgame.f -main routine dsub.f -resident subroutines dinit.f -initialization routine np.f -parser, part 0 np1.f -parser, part 1 np2.f -parser, part 2 np3.f -parser, part 3 gdt.f -game debugging tool verbs.f -principal verbs objcts.f -principal objects sverbs.f -simple verbs dverb1.f -auxiliary verbs, part 1 dverb2.f -auxiliary verbs, part 2 actors.f -character processors demons.f -demon processors clockr.f -clock event processors rooms.f -room processors nrooms.f -new room processors sobjs.f -simple objects nobjs.f -new objects ballop.f -balloon processor lightp.f -light processors villns.f -villain processors dso1.f -overlaid subroutines, part 1 dso2.f -overlaid subroutines, part 2 dso3.f -overlaid subroutines, part 3 dso4.f -overlaid subroutines, part 4 dso5.f -overlaid subroutines, part 5 dso6.f -overlaid subroutines, part 6 dso7.f -overlaid subroutines, part 7 1 blkdata.f -block data initializations 1 mindex.h -header file for the Message Table 0 files.h -header file for directory paths advers.h -header file for the Adventurers clock.h -header file for the Clock Interrupts curxt.h -header file for the Current Exits debug.h -header file for debug mode exits.h -header file for Exits flags.h -header file for Flags gamestat.h -header file for the Game State io.h -header file for I/O Variables objects.h -header file for the Objects Table oflags.h -header file for Object Flags oindex.h -header file for Object Labels parser.h -header file for the Parser State and Parser Output puzzle.h -header file for the Puzzle Room State rflag.h -header file for Room Flags rindex.h -header file for Room Labels rooms.h -header file for the Rooms Table screen.h -header file for the Screen Of Light state.h -header file for the Play State verbs.h -header file for the Verbs Table villians.h -header file for the Villians and Demons vocab.h -header file for the Vocabularies xpars.h -header file for the Directions/Exits Parser xsrch.h -header file for the Directions/Exits Labels readit.f -Fortran routine to decompile the database files dindx.dat and dtext.dat rtim.f -Fortran routines for system-dependent functions C2021/readit.c -C routine to decompile the database files dindx.dat and dtext.dat C2021/rtim.c -C routines for system-dependent functions C2021/dindx.dat -the database index file: for initializing parameters and tables C2021/dtext.dat -the database story file: for the text strings [a binary file with XOR-encrypted strings] 0 dungeon.doc -original documentation file 0 dungeon.6 -man page abstracted from dungeon.doc 1 C2021/Zork.6 -man page abstracted from dungeon.doc 0 dungeon.sh -shell script to invoke pdp version Makefile -Makefile for making pdp or vax versions History -Some revision history notes 0 PDP.doc -Notes on the PDP-11/Unix conversion README -This file 1 Make.log -Compilation notes 0 cinit.c -C routine to initialize game [pdp ver] 0 cio.c -C routine for misc i/o [pdp version] 0 listen.c -C co-process for reading keyboard [pdp] 0 cspeak.c -C co-process for displaying messages [pdp] 0 speak.f -lookup messages for speak process [pdp] 0 rtext.dat -message index file [pdp version]
About
The original version of the translation, into Fortran, of the MDL source code for Zork, updated for Fortran 2018 compatibility, along with a translation of it into C99.
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- C 54.8%
- Fortran 39.6%
- Elixir 3.7%
- Roff 1.1%
- Makefile 0.8%