-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add Muddle 54 and Zork #1951
Add Muddle 54 and Zork #1951
Conversation
Found from comparison with a TS MUD54 binary. The Muddle 56/106 source came from TOPS-20 originally, and it had been extracted with newline conversion but not ITS encoding. Most of these are cosmetic, but there are a couple of VALRET strings with embedded \rs -- including the one used to exit initialisation. So successful initialisation now finishes with a *, rather than opening a random location.
Lars has found a couple of examples of TS MUD54 files, and they're the initialised version (with references to internal functions filled in, etc.). TAA's ZORK launcher also expects TS MUDxx to be the initialised version. So it appears that the ITS version didn't generate TS MDLxx. (Why does the initialisation process write out TS MUD56, then, if you're only going to pdump the result over it? Because the last step in initialisation is to invoke the GC, and getting back from the GC to the interpreter requires mapping pages back in from the executable.)
Previously the first XFILE printed out some commands to run after STINK had completed, which is awkward if you're building Muddle repeatedly. This automates the second half of the build process.
This source was reconstructed to match MUDSAV; TS MUD54 from 1977-07-02, using a combination of all the surviving Muddle source files. The memory layout and pure code is the same. No AGC MUD54 has survived, so the AGC code was adjusted to match the TOPS-20 agc.mud104 from Chicago that Rich Alderson provided (the only ITS conditional is the page size). There's a one-instruction difference in the symbol positions, which I've converted into a patch at the end of the code to maintain the original layout on ITS. The INITM code, which doesn't appear in the final executable, is a best guess but it's probably fairly close, since it generates objects in the right order and locations, and the symbol locations match the original. The 1977 executable has a very large number of patches, which I've replicated in MUD54 INIT. The code that the patches were replacing -- marked with "XXX patched" in the source -- is also a best guess. I haven't checked that the TOPS-20 code is correct; it could be adjusted to match mdl104.exe in the future. It would need STENEX, which could be linked from MUDSYS;.
In the DEC Processor Reference Manual, this is documented as "result is indeterminate", and there's a note in the ITS KL microcode implying that the default KL behaviour was different from the KA. Muddle 54 uses this to drop a temporary stack frame from TP in a few places. If it doesn't work properly, one obvious result is that READing bracketed expressions leaves garbage on the TP stack -- e.g. typing <QUIT> at the interpreter will print a FIX instead. Muddle 56 replaces this with MOVE TP,(TP), so do that as a new patch.
These two databases contain pure code routines that Muddle images can refer to. We don't currently have whatever tool was used to maintain them, so this is a MIDAS program that creates and populates them. SAV FILE includes some stubs for functions in the LSRTNS and MUDDLE libraries -- these are the functions that the existing Muddle 54 Zork images need. For the FIELD function in LSRTNS, returning FALSE is equivalent to the user not being found. I have no idea what C-FCN in MUDDLE is for, but very early Zork calls it after a command is entered, and seems happy enough with it doing nothing.
These two files came from the Panda distribution. They appear to be the most recent version of the documentation -- Rich Alderson found a slightly earlier version from UChicago, and there's an even earlier version in the 1978 Zork release.
Hats off to @atsampson! I'm so glad Zork is running now. MKSVFL is written in the DM style, nice touch. |
|
||
I. Getting a ZORK | ||
|
||
a. ITS: Say ZORK^K to DDT rather than :ZORK to get a zork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any clue what the difference between ^K and a colon command would be? When I looked in DDT, I didn't see a difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you already have a ZORK job, ZORK^K will get rid of it before starting a new one. I guess they were worried about people accidentally running multiple copies.
Commit message "Both of these are from MIT's zork-1978-12 release", should be "zork-1978-01". |
Both of these are from MIT's zork-1978-01 release. MADMAN; MADADV SAVE is from 1978-01-28 (it's madadv.save_3 there), and TAA; ZORK 3 is from an archive dated 1978-01-27. Unfortunately this isn't the final version of Zork -- in particular, it doesn't have the endgame. The launcher will also work with the other 1977/78 Zork images MIT have released, provided you copy them to MADMAN; MADADV SAVE. Note that we already have the non-DM fake Zork in SYS3; TS ZORK, but the real Zork was in SYS2; on DM, so the recommended ZORK^K will find it first.
Don't require players to have a home directory or not be playing in business hours, etc. The original code expects TS MUD54 to be in SYS1, but our SYS1 is bursting at the seams already, so make it look at MUDSAV instead.
2d14e83
to
bc05417
Compare
I fixed the "zork-1978-12" commit message. |
I'm monitoring the CI builds. |
@atsampson, would you like to write something to its-hackers? |
Done. |
The overall aim here is to make it possible to run the 1977/8 Zork save files that MIT recently released (#1811) on ITS. These commits:
Fixes #1948. Still doesn't achieve #832 but some of this will help!