-
Notifications
You must be signed in to change notification settings - Fork 85
Zork escape
Bob Supnik's story as told in his Get Lamp interview:
The game was known as Dungeon at the time I met it. And what happened was it drifed in from MIT, via the ARPAnet. The MIT system that was being used as a development base was called ITS, which stood for the "Incompatible Timesharing System", which was a play on a much older MIT system called CTSS, the "Compatible Time-Sharing System". And there was a way to run it on a more conventional PDP-10 operating system called TOPS-20 of which there were a few, but only a few, in DEC. Most of them ran an older system called TOPS-10.
And so it drifted in and as usual for a company - relatively small company in those day - the word began to get around that there was this much more elaborate, much more interesting and complicated puzzle/text adventure/problem solving game. And it was extraordinary difficult to get access to it because, as I said, the machines that even DEC owned that could run it were relatively few and far between. And having just come off working with Adventure, I was very eager to learn more about these games and when I saw Dungeon with its full-fledged parser and its far more elaborate descriptive mechanisms and just the general richness of the whole environment, it was very very interesting to me to see it.
And it was also frustrating to play, because access was limited. It was a hard game - much harder than Adventure. And it was incomplete at the time. It was still being elaborated by Marc and Tim and the rest of the MIT gang. There was version skew going on between them and anybody else was playing it.
So the same idea occurred to me which was if it was on a small machine, I'd have access to it. A lot more people would have acess to it, and we'd know more about it. So kind of without quite really understanding what was involved, I decided, well I'll do the same thing. I'll port it. There were only a couple of, sort of, minor assumptions that weren't quite right in my thinking.
The first is of course that it wasn't written in Fortran. It was written in an obscure variant of a functional language like Lisp that was called MDL, Model Development Language. And when I first saw the sources I was like, what is this? I'd just have no clue what I was looking at.
Then the second thing is, it's a much bigger game. The source size for Dungeon at the time was probably five to ten times the size of the Adventure sources. So the notion of trying to shoe-horn this into the machine target I had, which was the smallest most personal PDP-11 of the time, was a bit more daunting.
And then the third problem was it wasn't done. It was changing all the time.
So, well, I didn't know any better. And nonetheless I decided I would do this. I would do it in the only higher-level language that I was really fluent in which was Fortran. C was certainly available but it was probably not a single Unix system in DEC at the time. So Fortran was it.
I bought a book on Muddle from the MIT Press. And started in doing some probe coding. And this was probably in late 1977 or early 1978. And I would not have made a huge amount of progress, except that in early 1978 there occurred what is foundly called the Blizzard of 78, when 26 inches or so of snow fell on the place in early February. And the state was shut down for a week. I was home. I was home with a printed Muddle listings. And the book. And I didn't have anything else to do at the time. So during that week I fundamentally worked out how to represent the data structures and the algorithms in Fortran from the sources I had. And I did a probe coded version of the game with no parser. But nonetheless you could basically type in numerical equivalents for a command and then it would go off and it would do the game action. It would display rooms and do actions and the pirate would show up and the thief would show up and cut your throat and all the good things it's supposed to do.
When I had this running in March of 78 I made contact with the guys at MIT and said, hey you know, it's possible to run this on a much smaller machine. Would you be interested in supporting this by actually giving me the complete source set as opposed to the fragment that I had. They came out to where I was working, and I was actually working right across the divide here in the other building. And they were completely astounded to see that what they regarded as a mainframe large scale program was running on this - from their point of view - tiny machine. They agreed to provide the full source set so that I could port as much of the game as existed at the time. So for really the first half of 78, I finished off an initial complete implementation and put that out in DECUS. Their one condition was that the big database file, the text file, that sort of had all the strings couldn't be published in unencrypted form.
And then basically as new inputs came in - they finished the endgame and so forth - I kept up with what they were doing for about the next eighteen months.
Some more details have been published in the New Zork Times:
Although people could get runnable Zorks, they couldn’t get sources. We tried two approaches to protecting the sources (remember, there was no protection of any sort on DM): they were normally kept encrypted; and we patched the system to protect the directory where we kept the sources (named CFS, for either “Charles F. Stanley” or “Computer Fantasy and Simulation”). This worked pretty well, but was finally beaten by a system hacker from Digital: using some archaic ITS documentation (there’s never been any other kind), he was able to figure out how to modify the running operating system. Being clever, he was also able to figure out how our patch to protect the source directory worked. Then it was just a matter of decrypting the sources, but that was soon reduced to figuring out the key we’d used. Ted had no trouble getting machine time; he just found a new TOPS-20 machine that was undergoing final testing, and started a program that tried every key until it got something that looked like text. After less than a day of crunching, he had a readable copy of the source. We had to concede that anyone who’d go to that much trouble deserved it.
Eric Swenson:
While an undergraduate at MIT between 1976 and 1980 I became introduced to Adventure and Dungeon (Zork) and spent many hours with both games. One might say I became obsessed with obtaining the maximum number of points possible in both of these games. With Zork, which was still being developed, this was a moving target, so I had to play over and over as few features were added to the game and as the "endgame" was added. I did succeed in my pursuit of all the points in both games. Once that goal was met, however, my obsession turned to seeing and getting the source code for both games. Adventure source was easy to obtain. Zork sources, on the other hand, were closely guarded by the four implementors (Tim Anderson, Marc Blanc, Dave Lebling, and Bruce Daniels). I knew the game was developed on the MIT-DM ITS system, scouring the file system didn't reveal where the sources were. I did find some XGP printout of one of the game source files and was able to confirm the machine (DM) and directory in which the sources were kept. But I had no luck listing that directory nor finding the files.
I made it my mission to get hold of the Zork sources. I had guessed that some ITS patch was hiding the directory where the sources were kept, and some magic incantation was required to make the directory accessible. I'm not sure if, at the time, the sources were encrypted -- that might have come later. I spent countless hours disassembling ITS and looking for the hack. Eventually, I was able to successfully patch ITS and gain access to the files. I know I needed to work quickly at this point because each time you patched ITS, a message was written on the system console -- a DEC LA36 printing console, I believe. I also didn't know whether any alerts were provided to the Zork implementors and at the time I hacked in, at least Tim Anderson (TAA), and possibly others, were logged into DM and (ostensibly) working on Zork. So as soon as I was able to access the files, I started madly FTP'ing the them from MIT-DM to MIT-MULTICS. I figured that copying them to MIT-MC would be risky as anyone could locate the files there and delete them. Multics, on the other hand, provided a more secure place to store the contraband.
In the middle of my FTP session, Tim Anderson (TAA) came into the room where I was furiously snarfing files. He declared to me that what I was doing was "most distateful". He made no attempt to stop me at the time, and there was little I could do but accept the chastisement. I did manage to get all the files copied, but I felt bad that I had been caught red-handed. I still don't know how Tim knew what I was doing -- hence my suspicion that the implementors were alerted to my intrusion.
My "work" was not done, however, I still had to preserve my copy of the files, and for that, I created a Multics backup tape of the sources. That tape followed me everywhere for years -- usually sitting in an attic until my wife made me throw it out. Interestingly, I begrudgingly thew out that tape (and lots of other old artifacts) just prior to learning that Multics was in the process of being resurrected on the DPS8M emulator. Had I kept them a bit longer, I could have had the backup tape imaged and loaded onto a currently running emulated Multics system. I did, however, copy all the Zork sources back to MIT-MC prior to my leaving MIT (to work on Multics at the Pentagon). I wanted to get a nice, bound XGP copy of the sources. I did manage to get this printout and have the set to this day. I encrypted the sources and left them in an archive when I graduated. Of great surprise to me, I recently uncovered that archive in MIT-MC backup tape images and have loaded them onto an emulated ITS system. Of course, until we manage to get a working MDL interpreter, those files serve only informational and historical purposes. I do hold out hope, however, that we'll get an MDL interpreter working some day and will be able to run those sources. While I'm sure the game experience will be exactly the same as that gleamed from running the Dungeon that was ported to Fortran and C and freely available on the Internet, somehow, I'll get much more satisfaction if we can run MDL Zork on ITS some day.