Document the evolution of MDL Zork

12/4/77 - 500 Points

This version currently crashes on startup with this message:

I'm sorry, you seem to have encountered an error in the program.
Send mail to DUNGEON@MIT-DMS describing what it was you tried to do.
This version created December 4.

DANGEROUS-INTERRUPT-NOT-HANDLED!-ERRORS
MPV!-INTERRUPTS
#WORD *710000464247*
Your score is 23748389065 [total of 500 points], in -1 moves.
This score gives you the rank of Wizard.

This version have 145 rooms, 152 objects and the dictionary contains 284 words.

US News & Dungeon Report dated 12/3/77
                US NEWS & DUNGEON REPORT
12/3/77  				       Late Dungeon Edition

     Dungeon will now print the creation date of the current version
when it comes up.  This is defined to be an essential part of any bug
report.  The date will also be printed when a fatal error occurs, and
is available via the 'version' command.

     Many people have reported the following message:
'GIN FREE STORAGE- VECTOR ...GOUT TIME= n.nn'
This indicates that a garbage collection is occurring.  Some reports
have this taking up to 30 sec. of cpu time, during which your dungeon
will refuse to respond.  We have added a feature which should prevent
this; if you see such a message, please send mail to DUNGEON@DM
describing the circumstances (particularly number of moves,
save/restore status, and the TIME).  A garbage collection is not
fatal:  your dungeon should be perfectly all right once it finishes
(after the GOUT TIME= message is printed).

     Some relatively gross bugs were recently fixed in save/restore. 
Unfortunately, some of them caused bad save files to be written out. 
The only factor affected was the scoring:  if you're using an old
save file (before November 20 or so), your score almost certainly
will not be valid.  Sorry about that.  The fixes were otherwise
compatible.

     Certain overly friendly behavior by the thief in his hideout has
been eliminated.

1/7/78 - 500 Points

This version currently crashes on startup with this message:

I'm sorry, you seem to have encountered an error in the program.
Send mail to DUNGEON@MIT-DMS describing what it was you tried to do.
This version created January 7.

PURE-LOAD-FAILURE!-ERRORS
FIELD
Your score is 23748389065 [total of 500 points], in -1 moves.
This score gives you the rank of Wizard.

This version have 147 rooms, 148 objects and the dictionary contains 283 words.

US News & Dungeon Report dated 1/1/78
US NEWS & DUNGEON REPORT
1/1/78                 Late Dungeon Edition

             Happy New Year!

    Please get ZORK by typing ZORK^K to DDT rather than :ZORK.
This will prevent the accidental creation of multiple ZORKs.

    Another new version of the parser has been installed.  The
newest features are:
        1. Phrases like 'pick up', 'put down', etc. may work.
        2. Expressions like 'pile of leaves' now work.
        3. 'On lamp' does not work.  Use 'Turn on lamp' or some such.
        4. Multiple objects may be specified for certain verbs.
           The following forms are recognized:
             a. 'Put foo and bar and bletch in trophy case'
             b. 'Put foo, bar, and bletch in trophy case'
             c. 'Put foo, bar, bletch in trophy case'
           The following forms will never work:
             a. 'Put foo bar bletch in trophy case'
             b. 'Put foo bar and bletch in trophy case'
        5. Referencing self may occasionally work.

OLD FLASH!
     An important change has been made.  When you have been killed,
and the 'patch' question is asked, or if you are confirming a 'quit',
it is now necessary to terminate the response to the question with a
carriage return (you may be surprised to find that this wasn't true
before).  Also, the answer to the 'patch' question is taken to be yes
unless something starting with n, N, f, or F is typed; the answer to
the 'quit' question is no unless something starting with y, Y, t, or
T is typed.

1/11/78 - 500 Points

This version currently crashes on startup with this message:

I'm sorry, you seem to have encountered an error in the program.
Send mail to DUNGEON@MIT-DMS describing what it was you tried to do.
This version created January 11.

PURE-LOAD-FAILURE!-ERRORS
FIELD
Your score is 23748389065 [total of 500 points], in -1 moves.
This score gives you the rank of Wizard.

This version have 147 rooms, 148 objects and the dictionary contains 293 words.

US News & Dungeon Report dated 1/9/78
                US NEWS & DUNGEON REPORT
1/9/78                                         Late Dungeon Edition

    New commands 'bug' and 'feature' (with various synonyms) have
been added.  They cause a file to be written out; it is hoped that
such files will eventually be directed to the maintainers.

    The arrangement of the dungeon has been changed slightly in a
couple of places.

    Another new version of the parser has been installed.  The
newest features are:
        1. Phrases like 'pick up', 'put down', etc. may work.
        2. Expressions like 'pile of leaves' now work.
        3. 'On lamp' does not work.  Use 'Turn on lamp' or some such.
        4. Multiple objects may be specified for certain verbs.
           The following forms are recognized:
             a. 'Put foo and bar and bletch in trophy case'
             b. 'Put foo, bar, and bletch in trophy case'
             c. 'Put foo, bar, bletch in trophy case'
           The following forms will never work:
             a. 'Put foo bar bletch in trophy case'
             b. 'Put foo bar and bletch in trophy case'
        5. Referencing self may occasionally work.

OLD FLASH!
     An important change has been made.  When you have been killed,
and the 'patch' question is asked, or if you are confirming a 'quit',
it is now necessary to terminate the response to the question with a
carriage return (you may be surprised to find that this wasn't true
before).  Also, the answer to the 'patch' question is taken to be yes
unless something starting with n, N, f, or F is typed; the answer to
the 'quit' question is no unless something starting with y, Y, t, or
T is typed.

1/24/78, 1/26/78, 1/28/78 - 500 Points

These versions are almost identical to each other and to the previous one (1/23/78). There is a new issue of the “US News & Dungeon Report” and, I assume, a couple of bugfixes.Most notable bugfix is the one from the previous version with LIGHT and BURN.
There is also source code available to the 1/28/78 that is, with some changes, possible to play in Confusion. In the Confusion version the half finished end-game is added. The end-game is playable all the way until the last puzzle with the wizard and the parapet where the game breaks down.

All these versions have 147 rooms, 145 objects and the dictionary contains 297 words.


Startup message 1/24/78
Welcome to Dungeon.
This version created January 24.
You are in an open field west of a big white house, with a boarded
front door.
There is a small mailbox here.
>
Startup message 1/26/78
Welcome to Dungeon.
This version created January 26.
You are in an open field west of a big white house, with a boarded
front door.
There is a small mailbox here.
>
Startup message 1/28/78
Welcome to Dungeon.
This version created January 28.
You are in an open field west of a big white house, with a boarded
front door.
There is a small mailbox here.
>
US News & Dungeon Report dated 1/24/78
                US NEWS & DUNGEON REPORT
1/24/78                                        Late Dungeon Edition

    When an error is encountered in this version, you will be asked
for a description of the problem immediately, just as if you had used
the 'bug' command.  We hope that this will improve the handling of
such problems.

    A reminder that save files created before 1/17 will not work in
this version; fortunately, the program is clever enough to figure out
whether a particular save file can be used or not.

    New commands 'bug' and 'feature' (with various synonyms) have
been added.  They cause a file to be written out; it is hoped that
such files will eventually be directed to the maintainers.

    In addition to 'take foo and bar', the parser now claims to
understand things like 'take foo and read bar', 'take foo and read
it', and so on.

1 Like

Source code 12/12/77 → 1/28/78

For 12/12/77 and 1/28/78 have the source code been partially restored from MIT backup tapes. Below is a table of the relevant files needed to make a complete, playable game. They are listed in the order they need to be loaded and have a short description of the files purpose. Note that on the PDP-10 ITS each file has two filenames, each up to six characters long. Here they are listed as filename and extension. Conventionally the first filename was the name of the file and the second filename was used as iteration, practically a version number. Files with “?” as version number is missing and have been recreated from later versions.

12/12/77	1/28/78
--------	-------
PRIM.?		PRIM.?		Definition of MDL extensions.
DEFS.63		DEFS.89		Definition of types, structs, functions and macros.
MAKSTR.7	MAKSTR.25	Definition of MDL extensions for IF. Practically ZIL.
TELL.?		TELL.?		Definition of TELL.
ACT1.38		ACT1.71		Action-routines for the locations in the 285 points version.
ACT2.27		ACT1.37		Action-routines for the coal mine, the aragain falls and the volcano. 
ACT3.13		ACT1.18		Action-routines for Alice in wonderland.
ROOMS.99	ROOMS.165	Guts of frob:  Basic verbs, command reader, parser, vocabulary hackers.
NP.93		NP.168		Parser
MELEE.?		MELEE.105	Action-routines and definitions for fighting, D&D style. 
DUNG.56		DUNG.129	Definition for rooms and objects.

My ambition is to make a deeper analysis, in following posts, of the changes in each individual file.

1 Like

I discovered a nice little trick one can do when playing on the PDP-10 ITS. If you login as one of the defined “WINNERS” on the emulator, the game will not KILL the MDL environment when quitting or stopping the execution (Ctrl-G). You will remain in MDL and can there inspect variables. Unfortunately are all the FUNCTIONs compiled so you can’t see the source code for those. Sure WINNERS are MARC, PDL, TAA or BKD.

Example:

THIS IS TT ITS, A HIGHTY VOLATILE SYSTEM FOR TESTING

For brief information, type ?
For a list of colon commands, type :? and press Enter.
For the full info system, type :INFO and Enter.

You may have to set the correct terminal type.
Try :TCTYP AAA or :TCTYP DATAPOINT

PLEASE LOG IN!  Type ":login", your name, and Enter.
Please log out when your are done.
:login marc

To see system messages, do ":MSGS<CR>"
:mud54
MUDDLE 54 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1
<RESTORE "MADMAN;MADADV JAN28">$
Welcome to Dungeon.
This version created January 28.
You are in an open field west of a big white house, with a boardedfront door.
There is a small mailbox here.
>
*ERROR*
CONTROL-G?
LISTENING-AT-LEVEL 2 PROCESS 1
,HERE$
#ROOM [WHOUS "West of House" NORTH SOUTH WEST EAST FDOOR MAILB <>]

The <1 .OBLIST> contains all the names of the defined variables and functions (an OBLIST is a lookup list Muddle uses to parse the code to the right variable or function (ATOM) in the current context).
,ROOMS prints out all the room definitions and ,OBJECTS print all the object definitions. The vocabulary is stored in its own OBLIST called WORDS, <MOBLIST WORDS>.

I’m gonna update earlier posts with new information I gained by this. I, for example, found out how you open up the “Strange Passage” in the 285 point versions. I’m also gonna add some statistical info on each game.

EDIT: You can also change things in the game like: modifying texts, rewriting functions (<SET REDEFINE T> and then replace existing function with your own). When you’re finished you just call and the game save a new MADMAN; MADADV SAVE-file that is a new modified game!

2 Likes

Is there anyway in MDL to ‘decompile’ functions?

E.g. in Common Lisp, if we define a function:

CL-USER> (defun foofunc (x y) (* x y))
FOOFUNC

Then if we try to eval it, we just get:

CL-USER> (eval #'foofunc)

#<FUNCTION FOOFUNC>

But there are other functions we can apply, e.g. function-lambda-expression:

CL-USER> (function-lambda-expression #'foofunc)
(LAMBDA (X Y) (BLOCK FOOFUNC (* X Y)))
T
FOOFUNC

(There’s also things like inspect.)
I don’t know MDL well enough to know if there could be equivalents.

I’m certainly no expert on MDL but my understanding is that almost everything in the end are what’s called an ATOM.

Example:

If you define a FUNCTION (and assign it to an ATOM, it is possible to have FUNCTIONs that’s not assigned to ATOMs. Lets not get into that.).

<DEFINE HELLO ()
  <PRINT "Hello, world!">
>

The ATOM HELLO is assigned the specified code. If you look at the ATOM it look something like this:

,HELLO
#FUNCTION (() <PRINT "Hello, world!">)

I.e an ATOM of the TYPE FUNCTION.

Unfortunately when, on the PDP-10 ITS, the MDL code is compiled the functions becomes machine language and are no longer available. They become just like the built-in functions and only display their call sign.

,SPARSE
%<RSUBR-ENTRY '[REMOVE-OBJECT SPARSE #DECL ("VALUE" <OR ATOM FALSE VECTOR> <
VECTOR [REST STRING]> <OR ATOM FALSE>)] 9902>

It should be possible to reverse engineer that into some psuedo-code, but that is far beyond my knowledge.

Have a look at the issues over at the PDP-10 IRS project. There are some knowledgeable person there that was at MIT during the 70s and sometimes even some old imp gives some insight.

1 Like

I see. I suppose the PDP-10 keeping the uncompiled version of the function around would eat up extra memory, and is not done for that reason (and compiling-on-demand would make things slower).

Exactly. If you try to feed the full 616 points version of Zork the MDL interpreter starts to complain about memory and garbage collection problems.

I think one user have access to a compiler to MDL version 55 that works and that he has successfully compiled it. Unfortunately MIT hasn’t released this version of MDL with its compiler yet, but hopefully they will, soon. The compiler for the MDL version 54 & 56 havn’t been found as far as I know.

1 Like

MIT have released some new source code and some new compiled games from July 1977, March 1978 & March 1979. I’ve extracted the new issues of “US News & Dungeon Report” and updated the fifth post in this thread with the relevant information.

The source from July 1977 is incomplete but is from the 387 points version and the source from March 1978 look nearly complete and is the first with the complete end-game so it’s the 500 points version + 100 points end-game.

According to @larsbrinkhoff this exhaust all the Zork material that have been located on old backup tapes for the ITS.

I intend to revisit this subject now that Mini-Zork 2 is almost finished.

2 Likes

Both the source code for Zork 3 & MDL Zork have this remark before the “Zork Royal Puzzle” section:

"SUBTITLE CHINESE PUZZLE SECTION (COURTESY OF WILL WENG)"

MDL Zork also have this ASCII-art for the gold card:

 ____________________________________________________________
|							                                 |
|              FROBOZZ MAGIC SECURITY SYSTEMS	             |
|    Door Pass                  Royal Zork Puzzle Museum     |
|							                                 |
|                     #632-988-496-XTHF			             |
|							                                 |
|							                                 |
|     USE OF THIS PASS BY UNAUTHORIZED PERSONS OR AFTER	     |
|   EXPIRATION DATE WILL RESULT IN IMMEDIATE CONFISCATION    |
|							                                 |
|							                                 |
|                              (approved)		             |
|                              Will Weng		             |
|                               789 G.U.E.		             |
|							                                 |
|                                        Expires 792 G.U.E.  |
|____________________________________________________________|

The “Will Weng” mentioned here surely must refer to Will Weng who was the crossword puzzle editor in New York Times, 1969-77?

@eriktorbjorn pointed out that in earlier versions you can fight with the cyclops. This feature dissappeared between 1/28/78 and 12/11/79 but the messages are still there in the later versions (they are still there in Zork 1). It’s not clear if it’s intentional that the possibility of fighting dissappeared or some sort of bug. It’s a shame, though, because the messages are sometimes witty and always brutal but the end is always the same, you die! (Cyclops strength is 10,000, the troll, for comparison has the strength 2).

Examples:

"The Cyclops rushes you, but runs into the wall."
"The Cyclops gets a good grip and breaks your arm."
"The monster smashes his huge fist into your chest, breaking several
ribs." 
"A flying drop kick breaks your jaw."
"The Cyclops seems unable to decide whether to broil or stew his
dinner."
"The Cyclops, no sportsman, dispatches his unconscious victim."

In the later games the message is always:
"The cyclops ignores all injury to his body with a shrug."

2 Likes

Just to add to the confusion, not only are the cyclops fight messages still in Zork I, the cyclops is still in the table of “villains” which makes it look like you should be able to fight him. But apparently the code that loops through it skips the last entry, so he won’t. In the buggy, unreleased 1984 version of Mini-Zork I the cyclops entry was removed (probably to save space), so there it’s the thief who won’t fight you.

From what I remember (it’s been some time since I tried), if you do try to enable the cyclops fight in Zork I you’ll automatically win because he’s unarmed and thus considered defenseless. So it’s a little bit more work than it first seems.

2 Likes

I don’t know if it was mentioned before, or if I just missed it, but another thing that changed was how the game handles death. In earlier versions:

>SOUTH
Oh, no!  A fearsome grue slithered into the room and devoured you.
Do you want me to try to patch you?YES
Now, let me see...
Well, we weren't quite able to restore your state.  You can't have
everything.

Or, if you answer no:

What?  You don't trust me?  Why, only last week I patched a running ITS
and it survived for over 30 seconds.  Oh, well.
Your score is 25 [total of 500 points], in 13 moves.
This score gives you the rank of Amateur Adventurer.

This chatty form of resurrection reminds me of Colossal Cave, which is perhaps why later versions changed it into something more elaborate: Turning you into a ghost. (Unless you’re in the endgame?)

>SOUTH
Oh, no!  A fearsome grue slithered into the room and devoured you.

As you take your last breath, you feel relieved of your burdens. The
feeling passes as you find yourself before the gates of Hell, where
the spirits jeer at you and deny you entry.  Your senses are
disturbed.  The objects in the dungeon appear indistinct, bleached of
color, even unreal.

I think the way Zork I handles it is an improvement: Early on, the game resurrects you and moves you to the forest, but once you have found the temple it turns you into a ghost instead. (There’s also a special case for if you die while you’re a ghost, but I never figured out any way to trigger that.)

It’s quite unclear what was intended. Back as far as 771212, the cyclops “ignores all injury to his body with a shrug” if the action is MUNG. But MUNG doesn’t seem to actually be an action in the 77 version. In 780124 it appears to be an action distinct from ATTACK, but for some reason the special cyclops action doesn’t get run; the regular melee code does. For some of the other cyclops actions, the special action does get run – e.g. “throw sword at cyclops” results in the “ignores all injury” message. This seems wrong.

For 791211 it’s the other way around. The special cyclops action gets run, preventing the regular action from running, thus preventing the fight with the cyclops. You can still fight him – do the lunch-and-water solution, then wake him up. He’ll be in a fighting mood.

It’s possible some of these are Confusion bugs.

I believe the reason the cyclops doesn’t fight in Zork I is unrelated and probably a mistake in translating a MAPR to an explicit loop.

I think @larsbrinkhoff (or actually @eswenson1) have a workable version of the 791211 running on pdp-10 ITS. There is also a binary from 790317 available. Unfortunately they need muddle v55 to run and that version isn’t cleared for release (yet?). Running these could determine if it’'s related to Confusion.

Thread on pdp-10 github.

I just found this thread and read it eagerly. Thank you for your excellent work in documenting your findings! Really interesting stuff.

Update: 1981 mainframe Zork built from MDL source code

2 Likes

Hello,
my name is David. I am looking for the OP, Mr. Henrik Åsman. I was trying to reach him regarding zork versions on his GitHub profile, but could not find any contact of his. @heasm66 If you some time, please reach me on email@dpolakovic.space

Thank you. :slight_smile:

1 Like