CLI tool
devshane/zork avatar
devshane/zork

devshane/zork keeps the mainframe Dungeon source compiling in C

The DUNGEON (Zork I) source

650 stars138 forksCLicense varies

At a glance

What is it?
A public domain C port of the mainframe text adventure Dungeon, carried from MDL through PDP-11 FORTRAN and f77 into a Makefile that still targets /usr/games. The goal is preservation, not new features.
Who is it for?
Adopt devshane/zork if you want the full mainframe Dungeon rather than the smaller Zork I map, and if you enjoy reading four decades of parser code. Skip it if you want a modern parser, portable save files, or a stated licence.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 115 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Six translation layers separate you from the 1980 FORTRAN release

The lineage is the interesting part. The original game, first titled Zork, was written in MDL (MUDDLE) at the MIT Laboratory for Computer Science. Bob Supnik translated that MDL source into DEC FORTRAN for the PDP-11 and renamed the game Dungeon. It was later ported to f77 for UNIX systems. Ian Lance Taylor then generated C with f2c, the FORTRAN to C translator written by David Gay, Stu Feldman, Mark Maimone and Norm Schryer. The resulting C was modified to drop the FORTRAN I/O library, add simple mode processing and change the database file format. Between those steps sit a 1985 PDP to VAX move by Bill Randle and two cleanup passes, the second of which folded the PDP and VAX variants back into one source tree using #ifdef guards. What you build today is that chain, not a rewrite. The current maintainers list Shane Thomas, Jan Drögehoff and Justin Wheeler, and they state the primary design goal as code preservation: keeping the logic and behavior of the game accurate while updating it to compile on modern compilers and operating systems. That stated priority explains most of what follows, including the rough edges.

The Makefile still installs into /usr/games and links termcap

The build system is a period piece with modern touches. Installation targets are hardcoded: BINDIR is /usr/games, DATADIR is /usr/games/lib and MANDIR is /usr/share/man. A plain make compiles and links, but installing into those directories needs root privileges on most systems. The Makefile also carries a four way choice for the paging helper the program uses to guess how many rows the terminal has. The default selection is the termcap routines with LIBS set to -ltermcap, and the comments note that on some systems the variable may need to be -lcurses, while the commented alternatives point at terminfo via -lcursesX with the -DMORE_TERMINFO flag, a fixed twenty four row assumption through -DMORE_24, or switching the facility off entirely with -DMORE_NONE. So the pager behaviour is a compile time decision, not a runtime setting. GDTFLAG is set to -DALLOW_GDT, which means the game debugging tool is compiled in rather than left out.

Building with make and reading the first room

The project offers one package route and one source route. The package route is Fedora specific: the documentation states that this package is available in the official Fedora Linux repositories, so on Fedora you install it from the command line.

bash
sudo dnf install zork

On other distributions you compile from the files in the checkout yourself.

bash
make

Run make at the top of the tree and the compiler produces the dungeon binary from the sources listed in the CSRC variable, which includes actors.c, ballop.c, clockr.c, demons.c, dgame.c, dinit.c and dmain among others. The listing also shows that the game is spread across many files by subsystem: rooms.c and nrooms.c for geography, objcts.c, nobjs.c, sobjs.c and ballop.c for objects, verbs.c, sverbs.c, dverb1.c and dverb2.c for the parser, np.c, np1.c, np2.c and np3.c for the characters, and villns.c for the villains. Shared declarations live in funcs.h, parse.h and vars.h. When the game starts you land in the opening scene: an open field west of a big white house with a boarded front door and a small mailbox, and the interpreter prompts you with a greater than sign.

gdt and the !cmd shell escape are compiled in by default

Two hooks exist that most game forks would strip out. The 1987 cleanup pass added a shell escape of the form !cmd, which lets a player run a command on the host system from inside the game. The same pass made it possible for the wizard to enter the game debugging tool without recompiling the source. The Makefile keeps that capability live: GDTFLAG is set to -DALLOW_GDT, and the comment above it says the tool is invoked by typing gdt and is not much use except for debugging. There is also a man page in the tree, dungeon.6, which was generated from the dungeon.doc file. If you are evaluating this code for use on a shared or multi user machine, note that a shell escape is a shell escape. The documentation does not describe how to compile it out, so the closest documented route is to edit GDTFLAG in the Makefile before building. The shell escape itself is not covered by any build flag documented in the tree.

This is Dungeon, not the Zork I that most people mean

The distinction matters for anyone deciding between this repository and a commercial Zork. The project documentation is explicit that Dungeon differs from Zork I: Zork I is a microcomputer adaptation covering approximately one third of the original mainframe map and puzzles, while Dungeon represents the more complete, earlier mainframe experience. The 1980 announcement quoted in the project history describes that commercial product as a completely rewritten version with a greatly improved parser, command input and transcript output files, SAVEs to any device and file name, and adaptation to different terminal types including a status line on VT100s, running on small machines. So the trade is direct. A commercial Zork gives you a modern parser and portable save files. This repository gives you the larger map and the original implementation, and the write-up documents no save, restore or transcript features of its own. The PDP-11 version was famously constrained: the UNIX f77 conversion required a lot of hacking to fit in the limited address space of a PDP-11/44 with split instruction and data space, and the developers left out the debugging package and the f77 I/O library to make it run.

Two readmes, one undocumented data file, and a blank licence field

The file listing includes both README.md and a separate readme.txt, and it shows a data file named dtextc.dat sitting alongside the C sources. Nothing describes the format of dtextc.dat, and the project history notes that the C conversion changed the format of the database file. The dependency on your side is therefore an opaque asset whose provenance you cannot verify from the documentation. The same applies to the licence. The project documentation calls the code public domain source code, and the history section quotes the 1980 translator note describing the first and last source release of the PDP-11 version, but the repository's licence field is empty, so there is no licence identifier attached for tooling to read. On maintenance, the last push was on 2026-06-30, and the release tagged v1.1.0 carries the same date. Earlier tags go back to v1.0.2 in 2017 and v1.0.3 in 2021, so the recent tag is the first in years.

Editorial conclusion

Adopt devshane/zork if you want the full mainframe Dungeon rather than the smaller Zork I map, and if you enjoy reading four decades of parser code. Skip it if you want a modern parser, portable save files, or a stated licence. Before you commit, check the licence field, read readme.txt, and try make in a scratch directory since the Makefile writes to /usr/games.

Frequently asked questions

How do I install devshane/zork on Linux?

On Fedora the project states the package is available in the official Fedora Linux repositories and gives the command sudo dnf install zork. On other systems you build from the source files in the repository using make, and the resulting program expects its data file in a games data directory.

Is devshane/zork the same game as Zork I?

No. The write-up states that Zork I is a microcomputer adaptation covering roughly one third of the original mainframe map and puzzles, while this repository holds Dungeon, the more complete mainframe version that preceded Infocom's commercial trilogy.

Can I save my game in devshane/zork?

The project documentation does not describe a save or restore command for the C port. The full save and restore functions were folded into the VAX version by Bill Randle in 1985 according to the project history, but the current write-up does not explain how to use them in the C build.

What licence applies to the devshane/zork source code?

The project describes the repository as public domain source code for the mainframe game Dungeon. However the repository's licence field is empty, so there is no licence identifier attached, and the documentation does not include a licence text you can rely on when redistributing or shipping the code.

Official sources

  1. devshane/zork on GitHub
  2. Issues
  3. README
  4. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/devshane-zork.svg)](https://hysenlabs.com/projects/devshane-zork)

Was this useful?