PDP-10 / its

Incompatible Timesharing System
Other
868 stars 84 forks source link

Bring Zork back home #12

Closed larsbrinkhoff closed 6 years ago

larsbrinkhoff commented 8 years ago

Rich Alderson says he has the Muddle interpreter/compiler? for TOPS-20. Binary only. It could be disassembled and ported back to ITS.

zork

Photo credit: Tor Lillqvist (@tml1024), 1980.
Source: https://www.flickr.com/photos/tml/370427667/

larsbrinkhoff commented 8 years ago

There may be another copy on twenex.org.

larsbrinkhoff commented 8 years ago

@ethandicks Did you use a PDP-10 MDL interpreter when you ported Zork to z-code?

ethandicks commented 8 years ago

On Mon, Nov 21, 2016 at 2:33 PM, Lars Brinkhoff notifications@github.com wrote:

@ethandicks Did you use a PDP-10 MDL interpreter when you ported Zork to z-code?

Not at first - I just read the MDL code, got the MDL books from MIT Press and learned enough MDL to understand what the code was doing. Fortunately, despite the massive visual differences between Inform and MDL, because MDL is the ancestor of ZIL which compiles to Z-machine byte code, and Inform compiles to Z-machine byte code, when one needs to, say, generate a room with attributes and properties, the resulting byte code is quite similar, so it's somewhat easy to "rephrase" a MDL problem into Inform.

I did later do some side-by-side testing by running the original 36-bit Zork on one of the machines Rich Alderson runs. I did not compile the MDL I have into a running game, but I did run 20+ year old game files to elicit various responses.

So the Inform port is a re-creation, but it's a section-by-section re-creation with very similar logic and structure, but not 100% identical. It's using the Inform parser code, not the MDL parser code, for example, but with various responses and some structure backported from the MDL to Inform.

-ethan

larsbrinkhoff commented 8 years ago

Zork MDL source code from Bob Supnik: http://simh.trailing-edge.com/games/zork-mdl.zip

Muddle manual: https://github.com/taradinoc/mdl-docs

ethandicks commented 8 years ago

I did not get my MDL sources from Bob (I got them directly from one of the original contributors nearly 25 years ago) but they are identical.

eswenson1 commented 8 years ago

I wonder if TAA, or MARC, or LEBLING (can't remember the other original author of MDL Zork (Dungeon)) still has the MDL sources. I also wonder whether the MDL compiler runs on a non-DM ITS. I get the impression that there were some differences between system calls on DM and the other ITSs.

larsbrinkhoff commented 8 years ago

People have been searching for the ITS MDL compiler/interpreter for years and came up with nothing, so I guess there is no MDL compiler for any ITS.

CC @taa01776

larsbrinkhoff commented 8 years ago

About DM backups:

Alan asked:

Do we have a way to read DM backup tapes? Did anyone write such a tool when the DM users moved to XX?

Moon replied:

I don't know of any way to do it, but the format is so simple. Each file on the tape is a file (i.e. there are tape marks between the files) and just has some header information at the front.

taa01776 commented 8 years ago

There probably were backups made, but I don't have any idea where they are now. I'll ask a couple of people. DM was unusual in having a 9-track tape drive, IIRC; AI, ML, and MC, again IIRC, had 7.

The original Muddle compiler wasn't really specific to ITS (it didn't generate any system calls), but when we moved to XX there was a new implementation of the interpreter (primarily written in Muddle, rather than assembly language), and a more modern compiler to go with it. But I don't think we had to change source code much at all to get Zork running on XX.

taa01776 commented 8 years ago

I checked with Dave Lebling and Chris Reeve, and neither of them has the original Muddle sources. Chris would've been the likeliest candidate, but he's not sentimental, or at least wasn't then--he was quite happy, recently, to find some of his code in the online CTSS sources. If there were DM backup tapes made, they either ended up with someone else (but I'm not sure who that would be--Vezza?), or more likely just stayed at MIT when we left.

larsbrinkhoff commented 8 years ago

Thank you for the information, @taa01776. Who is Vezza?

36bit commented 7 years ago

Vezza is https://en.wikipedia.org/wiki/Albert_Vezza

I have been doing research into Muddle for several years. The only thing that twenex.org has is a copy of the interpreter. All of the other stuff (like the compiler and library which contained the package system and etc) seems missing. Those tools are described in http://ifarchive.flavorplex.com/if-archive/programming/mdl/manuals/MDL_Programming_Environment.pdf

I assume what Rich Alderson has is the same as what's at twenex.org.

Muddle continued to undergo development even after what's described in the available Muddle docs online and the binary at twenex.org (which is version 105), eventually culminating in graphics support and other functions that were mentioned in some papers that I was able to find in the MIT Library but no further information on what those functions were supposed to have done.

Some parts of Muddle -- at least the package library but possibly more -- is also known to have existed on a machine called mit-ajax, or perhaps just ajax, at least into the early to mid 1980s, from a reference in some old Emacs source code where Emacs had a Muddle mode to interact with a superior Muddle process, but that machine seems to have since been retired. I've not been able to find anyone that would know if the contents of the machine were archived away somewhere or not. Finding that would be a big help.

Muddle was eventually ported to Apollo/Domain workstations and VAX. It's also known that Muddle ran on BSD UNIX either 4.2 or 4.3 as well as A/UX. To my knowledge none of this has survived to the present day but if it did show up it would be a great boon.

I talked to Dave Lebling almost a year ago. He indicated:

The "MIM" (Muddle in Muddle) runtime base was indeed written in C. It loaded and ran additional runtime code written in Muddle and compiled by MIMC ("MIM Compiler"). I thought all but the C runtime base layer was on the (in)famous "Infocom Disk" which can be found in various places on the web.

What is as far as I know truly lost is the old PDP-10/Tops-20 Muddle Compiler and MIMC. Still, Muddle is not exactly as hard to compile as C++, to pick one example. (Easy for me to say as I wasn't the compiler writer!) My recollection is that most of the complexity of it was in code optimization, because Muddle ran on machines with very little memory.

I have found that John Scott from http://ascii.textfiles.com/ has a copy of the drive in the form of a 150MB zip file, which contains source code, but he has been unwilling to share anything.

36bit commented 7 years ago

Oh, and to tack on some more info to clear up acronyms: What made it easier to port to other machines was work on making a so-called "Machine Independent Muddle", or MIM for short, which began in the early 1980s. MIM was also said to stand for Muddle-in-Muddle. These terms refer to the work done to make the Muddle interpreter, which was originally written in assembly language, more portable and easier to maintain. Part of this effort involved implementing a runtime base layer in C, with higher things written in directly in Muddle, hence "Muddle-in-Muddle." It also refers to the creation of a virtual machine in which to run Muddle programs (not the Z-Machine that Infocom made though.) There is some info on this virtual machine on the "Status of MDL Project" message at http://www.saildart.org/LISP.MTG[TIM,LSP] but this seems to be all of the information that survives on the VM.

Anyway, I am probably rambling on but it's good to find others with similar interests.

taa01776 commented 7 years ago

A few points:

36bit commented 7 years ago

It never ran on the Apollo? I guess the information from Chris Reeve is not correct then: http://www.saildart.org/LISP.MTG%5BTIM,LSP%5D has that

We are going to have Apollo Domains very shortly and we plan to port MDL to the Domain. By September 1981 we will have a complete MDL system based on machine independent MDL on the 20 and the Domain. By the end of calendar 1981 both of these systems will have achieved the same level of reliability and robustness available on the current MDL. We intend to bring up MDL on the VAX by mid 1982.

It seems it was at least an idea then. Perhaps the project never completed or never started? The message was written in future tense after all. That's the same message where he mentions a virtual machine.

My source for saying that MIM was also used as Muddle-in-Muddle comes from the old Emacs source code where Emacs had a Muddle mode to interact with a superior Muddle process. A copy of part is at http://www.mit.edu/afs.new/athena/contrib/epoch/lisp/mim-mode.el where "Mim (MDL in MDL)" is mentioned a few times. Perhaps unofficial but I mentioned it anyway as it's something that came up in my research into Muddle. http://www.mit.edu/afs.new/athena/contrib/epoch/lisp/medit.el is the one that has the reference to mit-ajax.

The reason I am saying more work was done on Muddle after what was described in those documents is because I've found someone's 116 page thesis buried in the archives at the MIT Library. It describes a device-independent graphics manager for Muddle and is dated in 1982 while the last version of "The MDL Programming Languge" book is dated in 1979. It says things like "Christopher Reeve, one of the original implementers of the language MDL, modified the MIM compiler to compile graphics instructions, and helped in the debugging of the Motorola M68000 assembly programs." Coincidentally, the Apollo machines used Motorola 68k CPUs. Plus, the sample source code listings in the thesis contain calls to functions that are not mentioned in the 1979 book.

I'm not sure how to reconcile your comments and Dave Lebling's comments about the runtime base layer but I suppose it doesn't matter what language it was written in.

36bit commented 7 years ago

Ah, I managed to find that a copy of the thesis is online: https://dspace.mit.edu/bitstream/handle/1721.1/102210/10219781-MIT.pdf Page 70 calls out the Apollo by name.

larsbrinkhoff commented 7 years ago

Thanks for the detailed information, @36bit!

Hal Abelson at MIT seems to be coordinating an effort to preserve the backup tapes. See #154. I suppose we'll have to wait and see what comes out of that.

Apart from processing the tapes, a major concern is that many files may contain private data. Perhaps MIT would be willing to give out the files if the original authors request them.

taa01776 commented 7 years ago

Checked with CLR--he did manage to get Muddle (that is, MIM) working on the two Apollos we had in the DM group, so I was mistaken. I rather think that Lim was the only one who ever used it seriously, though. OTOH, that probably provided a basis for the A/UX compiler a few years later, since the ones we had used 68000s.

larsbrinkhoff commented 7 years ago

I have found that John Scott from http://ascii.textfiles.com/ has a copy of the drive

@36bit What drive was that?

taa01776 commented 7 years ago

Presumably the "Infocom drive," which is (most of) the contents of the Sun file server that Infocom used after abandoning its DEC-20s. It has sources for some versions of Muddle (20 and VAX, but oddly not A/UX), as well as for the original Infocom games, as well as some other stuff that's of interest to Infocom fans/historians. It is several years removed from anything to do with ITS, though.

36bit commented 7 years ago

It is several years removed from anything to do with ITS, though.

The stuff for the 20 could potentially be ported back. See comment 1 in this thread.

larsbrinkhoff commented 7 years ago

@AndreasDavour is probably also interested in this.

ethandicks commented 7 years ago

I have found that John Scott from http://ascii.textfiles.com/ has a copy of the drive

Jason Scott.

-ethan

taa01776 commented 7 years ago

I will check the mimi20.mid sources tonight, but IIRC Muddle on the 20 took advantage of extended addressing, which would not port back to ITS (why it only ever got ported to the 2020).

taa01776 commented 7 years ago

The DEC20 Muddle runtime claims that it can run in either a single memory section, or in several (in the latter case, it had a few reserved sections--one for the program (vs. control) stack, for example--with everything else used for GC space). Would have to study it a bit more closely to see if that's actually a true statement: I know that we always ran in multi-section mode (we needed the memory), so the single-section configuration would not have been exercised a lot. Muddle did not take advantage of 18-bit addresses even on the KA-10 (pointers were two words, with the header having type code and, for some types, length), so there wouldn't be any changes in pointer sizes to deal with, anyway.

AndreasDavour commented 7 years ago

Interesting stuff, this! Some of you have been digging deep. I really look forward hearing more from Hal's and the MIT archivist's efforts.

I think I have heard from Rich Alderson that the ITS disks that have been online was just a few of the backups taken and more should be in the vaults at MIT. Sadly, I don't remember if I asked him that, or if it popped up in some other conversations. No trace in my archives.

larsbrinkhoff commented 7 years ago

I believe you mean the AI and MC backups that were taken before they were shut down the last time. They are indeed just a snapshot of the systems at that point in time. Many programs are missing, and even more source code.

There were regular backups made since at least 1971, to 7-track tapes. When the 7-track drives started to fail, a selection of the tapes were taken to DEC's Manyard site and transferred to 9-track tapes. Later, the process repeated itself, and a selection of 9-track tapes were transferred to more modern media. Some tapes were unreadable and some were only incremental backups. The result now sits somewhere inside MIT's digital archives.

AndreasDavour commented 7 years ago

It must have been the processing of those 9 tracks that I remember being mentioned then.

larsbrinkhoff commented 7 years ago

A map:

larsbrinkhoff commented 6 years ago

From @36bit:

The only thing I know of is the MDL105.EXE.1 from trailing-edge. And it's not complete of course. The package system and everything is gone. Plus the source. It could run a Muddle zork, although the Muddle-based Zork was written for version 104 of the interpreter. As I recall it has a warning that appears to "report strange occurrences" when running on the 105 version interpreter that trailing-edge has.

eswenson1 commented 6 years ago

Not that this source of Zork sources is ideal, but I do have printouts (on XGP printers) of all the MIT zork sources from sometime after the endgame was completed. If I had a Muddle interpreter, I might be persuaded to type in the source code (I don't imagine, but could be wrong, that OCR technology would get it right).

eswenson1 commented 6 years ago

I guess that won't be necessary since I just saw this: https://github.com/PDP-10/zork. Sorry for not noticing that earlier.

larsbrinkhoff commented 6 years ago

Right. What's missing is the interpreter and/or compiler for ITS. There may be one for TOPS-20 available, but it's unknown whether it could ever run in only one section. See discussion above.

eswenson1 commented 6 years ago

What about the effort by Hal Abelson to preserve backup tapes? Has anyone talked to him recently about that?

larsbrinkhoff commented 6 years ago

Yes, see #154.

taa01776 commented 6 years ago

There are (digital) sources around for the "machine-independent" Muddle compilers, and for the various runtimes for them (20, Vax, Mac A/UX)--even some of the libraries. That archive does not, for reasons that are beyond my comprehension, include the interpreter sources, though I just heard that clr might have a listing. What one would really like, of course, is the Midas sources for the original Muddle interpreter. Those are, as far as I know, nowhere.

eswenson1 commented 6 years ago

And no one even has printouts?

taa01776 commented 6 years ago

I know that I do not. Quite sure Chris would’ve mentioned them if he had them, but he has a big attic, so who knows.

From: Eric Swenson [mailto:notifications@github.com] Sent: Sunday, 28 January, 2018 23:05 To: PDP-10/its its@noreply.github.com Cc: Anderson, Timothy A. taa@stresearch.com; Mention mention@noreply.github.com Subject: Re: [PDP-10/its] Bring Zork back home (#12)

And no one even has printouts?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/PDP-10/its/issues/12#issuecomment-361134990, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABnTXTwZEkwFnkoY2xmhsg6Ekq2e-qD_ks5tPUN0gaJpZM4K4HNL.

eswenson1 commented 6 years ago

Such a shame. I had printouts of the muddle sources for years before my wife strongly encouraged me to get rid of it all! I would gladly type them all back in now!

larsbrinkhoff commented 6 years ago

Last year we managed to get Ron Schnell's original Maclisp game DUNNET from MIT. I'm not sure how or where exactly, but I think a key part was that Ron asked for it himself.

I'm guessing there were regular backups made from the DM PDP-10, but I'm not sure if they have been preserved or read back. But apparenly that has been the case for some other MIT DEC machines, so maybe.

larsbrinkhoff commented 6 years ago

Looking back at the email conversation, it was Brad Parker who had access to MIT-OZ backups (maybe more?). Ron's file was from late 1982.

larsbrinkhoff commented 6 years ago

In 2016, @rmaldersoniii wrote to the SIMH mailing list:

Somewhere in my collection of stuff I probably still have a tape of the source for MDL v105, and there are archives of the MDL sources for a later version of ZORK than the well-known executable.

CC @36bit

taa01776 commented 6 years ago

That would be the only shot at this point. Chris recycled his original Muddle listings (Muddle 104/105) sometime late last century. -ta

From: Lars Brinkhoff [mailto:notifications@github.com] Sent: Friday, 2 February, 2018 01:39 To: PDP-10/its its@noreply.github.com Cc: Anderson, Timothy A. taa@stresearch.com; Mention mention@noreply.github.com Subject: Re: [PDP-10/its] Bring Zork back home (#12)

In 2016, @rmaldersoniiihttps://github.com/rmaldersoniii wrote to the SIMH mailing list:

Somewhere in my collection of stuff I probably still have a tape of the source for MDL v105, and there are archives of the MDL sources for a later version of ZORK than the well-known executable.

CC @36bithttps://github.com/36bit

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/PDP-10/its/issues/12#issuecomment-362500207, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABnTXV0pXzCe0KJG96KQ8IaV6RkMTQq0ks5tQq2IgaJpZM4K4HNL.

larsbrinkhoff commented 6 years ago

@taa01776, do you remember what the directory and/or file name was for the Muddle compiler?

larsbrinkhoff commented 6 years ago

Two versions of the MIDAS Muddle has been placed here:
http://github.com/PDP-10/muddle

EDIT: Now also TOPS-20 and VAX MIM.

larsbrinkhoff commented 6 years ago

And there's a Zork that is slightly newer than the one Bob Supnik has published. Also adds a few more files.

For now, it's in a branch called lars/zork.

EDIT: Slightly older. Supnik's have dates referring to 1981, and Swenson's to 1979. The differences are minor. Both versions are checked in as separate commits. The sources are now in the ZORK directory, but may change to CFS in the future.

larsbrinkhoff commented 6 years ago

With MDL 56 in place, it's a just a small matter of getting Zork running. (Yes, I'm ironic.) Further development in #832.

larsbrinkhoff commented 6 years ago

I think it's a shame that this has moved forward so much, yet still Zork isn't playable. @atsampson, isn't it the case you could run a large part of Zork interpreted? Maybe that's good enough for now?

atsampson commented 6 years ago

Completing the stub that replaces the assembly bits of Zork would indeed make at least some of the game playable - I hadn't gone any further down that route because you'd found the Muddle compiler source and I was hoping that the library source might also show up at some point, which'd let us compile the original assembly bits. (At present, I haven't looked into actually reading from the TTY in Muddle so it just does the same hardcoded command repeatedly...)

There's also the problem that the Muddle interpreter fails once all the memory has been allocated; it would be interesting to try it on LCM's real hardware to see whether it's an emulator problem.

larsbrinkhoff commented 5 years ago

MIDAS source for ZAP, ZIL assembler:
https://github.com/historicalsource/minizork-1982/blob/65673bb4345f31fc3cb8f8aba9e6822fff1f99a6/zap.mid