-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile 1981 Zork sources #832
Comments
Random notes:
|
I think we could use some Muddle eyeballs on build.cmd and rooms.394. @36bit? |
|
|
|
@eswenson1, was there ever a playable Zork on MIT-MC? Given your comment about the Z option in NGAME, I guess not. And all files above are KMP's dummies. I have a tiny shread of hope that the earliest one from August 1979 could be the real thing. I do see plenty of Zork save files! Ranging from 1977-12-10 to 1981-06-21. |
I don’t ever recall zork’s being available on MC, AI, or ML — only DM. Can’t rationalize those zork save files. |
The SRI-NIC games directory contains ZORK.EXE, ZORK.DOC, ZORK.LOG and MDL105.EXE. ZORK.EXE contains the strings:
So it sounds like we should also have a ZORK.SAV, and ZORK.EXE is a stub that starts MDL and loads it. ZORK.DOC has the interesting comment:
|
I looked at DDTORD, by I didn't find any thing to explain that difference between ^K and :. ^K always loads a file, whilst : can run a built-in DDT command. But that should not be the case here. Unless DM patched their DDT? So I went to the source code. ACTRLK has the comment "HERE WE HANDLE FOO^H, FOO^K, :FOO ..., :NEW FOO ..., :RETRY FOO ... " But as far as I can see :FOO goes to ACTRLK too so I think " ..." can be empty. |
I don't think we have the assembler (although maybe some of the MIM PDP-10 code is derived from it?). The Confusion MDL interpreter's mdlzork.tgz has pure-MDL versions of some of the stuff in TELL. FLOAD-ing the files in the order Confusion uses (PRIM DEFS MAKSTR (TELL) ACT1 ACT2 ACT3 ACT4 DISP1 PARSER MELEE ROOMS DUNG IMPL SR SYNTAX TYPHAK UTIL), a couple of immediate problems...
|
LSRTNS sounds like it could be a library to access the INQUIR database. The database contains information about registered users. It's what you enter when you apply for an ITS account using PANDA. |
There is an INQUIR library called LSRRTN (INQUIR; LSRRTN 31) which is the LISP variant of this library. It includes SYSENG; LSRTNS >, which is the MIDAS implementation of the code that knows how to map in the iNQUIR database, and search/update/delete/etc entries in that database. |
Regarding the need for a stub to run ZORK on TOPS-20, I have the following in my personal directory on the XKL Toad-2 at LCM+l: LS: The timestamp indicates that it is from the public DEC-20 at UChicago, almost 2 years before I moved to Stanford. The text of the program is as follows:
|
Here is one version of an ITS launcher that I had in my (EJS;) directory on MC:
|
And here is another:
|
Lots of interesting stuff to pick through in the launchers above - thanks! Tried dropping in Confusion's tell-repl.mud instead of TELL (with the definition of NULL removed). This defines working versions of PSTRING/STRINGP, at least. DUNG then fails in the It then crashes somewhere in DUNG between the Riddle Room and Flood Control Dam # 3 with one of several errors from MDL's GC, e.g.
|
I'm copying this TAA comment from #12:
So I'm guessing the BIN files mentioned in build.cmd could have been generated by a compiler. |
I see the Russotto files has a Y2K fix. Might as well apply that to our version. |
Another TAA comment:
So there's reason to be suspicios of the garbage collector in ITS. |
Do we have a MDL compiler, or only the interpreter? Can you run source code through the interpreter, or does it have to be (byte-code) compiled first? In other words, do we actually have what we need to move forward with Zork, or are missing a compiler? |
We don't have a compiler at this point. It looks like MIM (in the separate muddle repo) has a TOPS-20 compiler target, but we haven't done anything with that. Also, I believe (@36bit, please correct me) that when Zork was created, there was an older compiler in use. Maybe named COMBAT? It's unclear whether the MIM compiler would work with the MDL 106/56 runtime. I haven't seen any trace of COMBAT (if indeed that's the right name), but then I haven't looked. |
TAA:
The new implementation would be MIM. |
@eswenson1, the MDL interpreter we have can read source code. At the moment, we can get the interpreter to load quite a lot of Zork, and it's building data structures for objects/rooms correctly, but the interpreter crashes with a GC problem (probably not Zork's fault). One file in the Zork source is a bunch of helper functions written in MDL's assembler, and we don't have the assembler, but we could either replace them with pure-MDL equivalents or translate to MIDAS and compile them into MDL as builtins, so I don't think that's a huge problem. |
Some thoughts on how to proceed with the GC crash:
|
Some progress, which you can find in very messy form on the ats/zork branch. With lots of GC debugging information removed:
This is still without the TELL assembly code; I'm using a bunch of pure-Muddle stubs based on the Confusion versions, hence the wrong date, lack of input, etc. To answer some of the questions above:
I'm now wondering about trying to construct an NBIN file with one of the simpler assembly routines in (e.g. PSTRING). I did find a TOPS-20 ZORK.SAV in the PANDA distribution, which should include similar versions of these routines in assembled form. The manual has a good description of how registers are used in these routines, but the challenge will be figuring out how things like MQUOTE work. |
Way to go! That's fantastic news. I have to share a funny anecdote: just this morning, we got Zork (Dungeon) to run on Multics. We used the Fortran port and had to make lots of changes in order to get it to work -- Multics Fortran lacked some required functionality. So two zork-related news flashes on two obsolete operating systems in the same day. How weird is that? |
So loading the game files and writing out MADADV SAVE works fine when the endgame is excluded? I wonder whether it would be easier to do some hack to create NBIN files, or resurrect a compiler if it could be found. |
We have two save files: MADMAN; MADADV SAVE (1977-12-13) |
Of course I get this:
|
The LCF directory has what appears to be the December 1977 source code for Zork. At this point, it was renamed Dungeon.
|
According to the loader code above (trivia startup) the very first word of the SAVE file is the Muddle version number as an ASCII string. It's 54. |
More of the Muddle compiler and libraries are appearing on ToTS tapes. There are also ready built MADADV SAVE files, and a TS MUD54. I have tried to run them, but they don't work fully. I have a theory that Muddle also needs some of the SAV and/or FIX files from MUDSAV or MUDRST. |
If you've got a TS MUD54, you could try Zork from the ats/zork branch and see if it loads the full game without running out of memory (revert the "Reduce the amount of code" comment, and possibly the XUNAME one as well since that was a MUD56-ism)... |
Various sources refer to Zork sorce code in either the LCF or CFS directory. Which one would be more appropriate here? |
@ZoBoRf tested the new Muddle, and confirms GC is much more stable! |
Two sets of Zork source and binary files from ToTS: |
ToTS tape 9004083 has a file <ZORK>MADADV.ITS-XXFILE:
...
|
Since #1951 provides a runnable Zork, I'd like to repurpose this issue for compiling the 1981 Zork. |
@eswenson1 has made some progress compiling Zork with the Muddle 55 compiler. |
@eswenson1 confirmed the 1981 616-point Zork works and can be played to conclusion. Users (well one: @hesam66) have been asking about getting this version. I think the binary can be put in this repository, even if the tools and build script can not. It can replace the 1978 binary in place now. |
Unfortunately, the binary (MADMAN;MADADV SAVE) is dependent on MDL 55. I compiled the sources with MDL 55, and it uses the MDL 55 interpreter and runtime. Therefore, before we can commit this version of Zork to the Git repository, we'll have to get a release from the MIT archives for its dependencies. |
I’m currently trying to tackle an issue getting the MDL 55 interpreter to run successfully when linked with the latest binaries from MIT. When NPCK (package manager) is loaded it loads LIB (the library system) and gets an error due to a broken implementation of OBLIST?. Taking a fix from MDL 106 (addition of a single HRLI instruction) fixes that problem and allows both NPCK and LIB to load. However, I’m currently only able to load NPCK NBIN and not NPCK FBIN. The latter is what the MUDSYS;NEWMUD > source tries to load when setting up a new MDL. I’m getting a FATAL ERROR ILLEGAL UUO. Trying to find the cause of that. Note: I’ve successfully compiled, loaded, and dumped a ZORK with MDL 55 — but I was using interpreter, assembler, and compiler binaries from ToTS. Now I’m trying to build the interpreter, assembler, compiler, and libraries from source. This is proving difficult. Note 2: Our MDL 56 (from MDL 106) is the bare bones interpreter — it does not include the package system, library system, pure library system, and all the runtime libraries. Before I integrate MDL 55, I’d like to have all that working from source (it works from ToTS binaries and a few recompilations). |
Thanks for the note, @eswenson1. I suggest it would be worthwhile to do a half way pull request to build Zork using the binary versions. It's not that it's urgent, but I'm sure a few intfic fans would be curious to experiment with the game in its original form. |
@heasm66, maybe you want to keep an eye on this. |
Great progress! Are MDL 55 released by MIT now? |
Yes. I don’t know if MIT has prepared (yet) an actual release, but I’ve been given permission to release it as part of the “its” GitHub repo. |
Will both MDL54, 55 & 56 be on the platform at the same time (is that possible?)? |
Yes. I have all three running on my ITS system. However, when I make my update to the repo, it still will be the case that MDL 55 will be full-featured (interpreter, compiler, assembler, package and library system, pure library system, etc.), while MDL 54 and MDL will have their current minimal interpreter support. MDL 54 won’t load NBINs created by the MDL 55 compiler (although MDL 56 will). And the runtime and pure library systems won’t offer support for MDL 54. After getting MDL 55 “in” and working satisfactorily, I will try to get MDL 56 to have all the same functionality as MDL 55 — I may not be successful in this regard as I’ve had limited success so far. I’ll probably be recommending people use MDL 55 for any MUDDLE development, as my MDL 55 on ES has been very functional for months. The other two are simply “toys” due to all the missing support. |
Sounds fantastic! |
I'm closing this since #2150 is almost there. |
Use the MDL interpreter and Zork source code to make a runnable Zork.
The text was updated successfully, but these errors were encountered: