Now that TOPS-10 and BCPL is fully operational, the next step is to wade into the MUD.
MUD is provided as a set of source files in a mix of BCPL and MACRO-10. Having downloaded the tape from GitHub and restored it on to my TOPS-10 system, I found that apart from the source there is little or no documentation.
Fortunately I did find a file which summarised what the files that make up the package are:
mud.sub ;This file!
mud.mic ;A mic file to compile it
mud.box ;Improvements/things to do/bugs to be found
dungen.get ;Main getfile
mudlib.get ;Another getfile
dbase.bcl ;Database loader
mud0.bcl ;Database interpreter statics
mud1.bcl ;Start, Check.stuff, parsing things
mud2.bcl ;demon stuff and Move
mud3.bcl ;general support routines
mud4.bcl ;communication parts
mud5.bcl ;Special and Action
mud6.bcl ;Drop, Get and description components
mud7.bcl ;Special's supporting routines
mud8.bcl ;Interact
mudlib.bcl ;Library routines and various other annoying bits and pieces
mboots.mac ;The start address stuff for initialisation
power.bcl ;For producing specified
dbadat.mac ;High segment skeleton of database
Unfortunately it seems that there is some key files missing, notably the MUD.MIC file which contains the script to compile MUD. If this was a simple program it probably would not matter, but it is likely that some special parameters will be needed to compile this and those would have been in the MUD.MIC file.
To remedy the missing file I contacted Richard Bartle who had the original MUD.MIC but only as a printout. Some scanning and re-keying later I had MUD.MIC on my TOPS-10 system, albeit probably with some errors as the printouts were quite faded and not 100%.
Now that I had the MUD.MIC, and corrected a few obvious typos from where I entered it in, it was time to give it a run. The comments in the MUD.MIC helpfully gave instructions on the parameters to pass to get MUD to build. So, lets DO MUD ALL.
.do mud all
.noerror
.if ($A#"") .goto all
.
.r macro
*dbadat=dbadat
Assembling Database for MUD version 3
NO ERRORS DETECTED
HI-SEG. BREAK IS 403411
PROGRAM BREAK IS 000000
CPU TIME USED 00:00.032
10P CORE USED
*mboots=mboots
% .SGPPN will be obsolete; please use GETTAB .GTRDI instead.
% .SGDEV will be obsolete; please use GETTAB .GTRDV instead.
NO ERRORS DETECTED
HI-SEG. BREAK IS 400160
PROGRAM BREAK IS 000206
CPU TIME USED 00:00.133
36P CORE USED
*^Z
.
.r bcpl
*mud0/o
BCPL: MUD0 400501/400
*mud1
BCPL: MUD1 403343/21
*mud2
BCPL: MUD2 404030/14
*mud3
BCPL: MUD3 402677/42
*mud4
BCPL: MUD4 402336/30
*mud5
BCPL: MUD5 422144/11
*mud6
BCPL: MUD6 407277/67
*mud7
BCPL: MUD7 403653/15
*mud8
BCPL: MUD8 410477/13
*mudlib
BCPL: MUDLIB 417106/1471
*^Z
EXIT
.
.r link
*mud0,mud1,mud2,mud3.mud4.mud5.mud6.mud7.mud8.mudlib,mboots/counter/set:.high.:5
01501
?SCNDEX Double extension illegal MUD5
*dbadat/o
?SCNABS Ambiguous switch O
*^C
.ssa
LINK saved
.if ($A="all") .goto DB
.
.r bcpl
*dbase/o
BCPL: DBASE
get "bcl:rfs"
^
(E36-15) Unable to get GETFILE
(E53-396) Non 'MANIFEST' name in constant
AC
(E53-397) Non 'MANIFEST' name in constant
AC
(E53-1718) Non 'MANIFEST' name in constant
ONE
(E53-1719) Non 'MANIFEST' name in constant
P
(E53-1720) Non 'MANIFEST' name in constant
AC
(E53-1720) Non 'MANIFEST' name in constant
P
(E53-1721) Non 'MANIFEST' name in constant
AC
(E53-1722) Non 'MANIFEST' name in constant
AC
(E53-1726) Non 'MANIFEST' name in constant
P
420213/2770
% 10 Errors
*^C
.r link
*/set:.high.:430000
*dbase,sys:bcplib/search/set:.high.:501501,dbadat/g
EXIT
.nsa
?nsa?
.mic exit
This looks surprisingly good for how it could have gone. Immediately obvious issues are that there is a missing library header RFS plus what I am guessing are one or two typos. Of course, whether the outputs produced are any good is another matter.
Probably the biggest issue is the RFS library, because if we haven’t got that we are stuck as everything else should be fixable. After inspecting my BCL: directory and the original BCPL supplied tape files there area few library headers that are missing. The files appear in the the BCPLIB.MAS archived source and in the directory which I restored BCPL to, but were not copied over to the libraries when installing BCPL using the BUILD.CTL batch job file. This is easily remedied by copying the missing libraries and headers to BCL:.
.cop bcl:=*.get[10,7,bcpl]
.cop bcl:=*.rel[10,7,bcpl]
.dir bcl:
ACS GET 1 <055> 2-Nov-77 DSKB: [5,24]
BCPLIB GET 2 <055> 23-Oct-75
BITS GET 2 <055> 25-Feb-75
ERRORS GET 2 <055> 8-Jun-78
IOLIB GET 1 <055> 23-Oct-75
IOPACK GET 1 <055> 7-Oct-78
IOUUO GET 1 <055> 7-Feb-75
JOBDAT GET 1 <055> 7-Feb-75
SCB GET 5 <055> 21-Feb-78
USEFUL GET 1 <055> 7-Oct-78
KERNEL GET 1 <055> 7-Oct-78
BCPLIB MAS 227 <055> 12-Feb-80
GLOBAL REL 83 <055> 13-Mar-75
LOWLIB REL 131 <055> 8-Feb-80
ARRLIB GET 1 <055> 15-Aug-75
CMDLIB GET 1 <055> 10-Sep-75
COROUT GET 3 <055> 20-Nov-75
DICLIB GET 3 <055> 23-Jul-76
RFS GET 3 <055> 15-Sep-75
RFSLIB GET 1 <055> 19-Sep-75
ARRLIB REL 3 <055> 15-Aug-75
BCPLDT REL 97 <055> 23-Mar-76
CMDLIB REL 6 <055> 21-Feb-78
COROUT REL 5 <055> 26-Jan-77
DICLIB REL 12 <055> 23-Jul-76
RFSLIB REL 28 <055> 19-Feb-76
SYNLIB REL 10 <055> 15-Apr-75
Total of 632 blocks in 27 files on DSKB: [5,24]
Note that you should not need BCPLIB in BCL: as it is copied to SYS: by the BUILD.CTL install job. For completeness, I deleted BCPLIB.REL in BCL:.
There were also some typos in the MUD.MIC, particularly on the linker line where I put full stops instead of commas between the various object files. Additionally the 7.04 monitor on my TOPS-10 system does not support NSAVE command as this seems to not be required. A quick substitute in SOS fixed that plus a few other typos. The corrected MUD.MIC is now uploaded to the PDP10/MUD1 GitHub repo.
With the libraries in place and the corrections made, now when we DO MUD ALL, we get the following output:
.do mud all
.noerror
.if ($A#"") .goto all
.
.r macro
*dbadat=dbadat
Assembling Database for MUD version 3
NO ERRORS DETECTED
HI-SEG. BREAK IS 403411
PROGRAM BREAK IS 000000
CPU TIME USED 00:00.017
10P CORE USED
*mboots=mboots
% .SGPPN will be obsolete; please use GETTAB .GTRDI instead.
% .SGDEV will be obsolete; please use GETTAB .GTRDV instead.
NO ERRORS DETECTED
HI-SEG. BREAK IS 400160
PROGRAM BREAK IS 000206
CPU TIME USED 00:00.016
36P CORE USED
*^Z
.
.r bcpl
*mud0/o
BCPL: MUD0 400501/400
*mud1
BCPL: MUD1 403343/21
*mud2
BCPL: MUD2 404030/14
*mud3
BCPL: MUD3 402677/42
*mud4
BCPL: MUD4 402336/30
*mud5
BCPL: MUD5 422144/11
*mud6
BCPL: MUD6 407277/67
*mud7
BCPL: MUD7 403653/15
*mud8
BCPL: MUD8 410477/13
*mudlib
BCPL: MUDLIB 417106/1471
*^Z
EXIT
.
.r link
*mud0,mud1,mud2,mud3,mud4,mud5,mud6,mud7,mud8,mudlib,mboots/counter/set:.high.:5
01501
[LNKRLC Reloc. ctr. initial value current value limit value
.LOW. 0 2716 1000000
.HIGH. 400000 502644 1000000]
%LNKDRC Decreasing relocation counter .HIGH. from 502644 to 501501
*dbadat/g
?
?Illegal memory reference at user PC 602205
.ssa
LINK saved
.if ($A="all") .goto DB
.
.r bcpl
*dbase/o
BCPL: DBASE 420112/2770
*^C
.r link
*/set:.high.:430000
*dbase,sys:bcplib/search/set:.high.:501501,dbadat/g
EXIT
.replaced NSA with SAVE for 7.04 monitor
save
DBASE saved
.mic exit
Whilst much seems to work the output suggests that there is still an issue with linking the program together as highlighted below.
.r link
*mud0,mud1,mud2,mud3,mud4,mud5,mud6,mud7,mud8,mudlib,mboots/counter/set:.high.:5
01501
[LNKRLC Reloc. ctr. initial value current value limit value
.LOW. 0 2716 1000000
.HIGH. 400000 502644 1000000]
%LNKDRC Decreasing relocation counter .HIGH. from 502644 to 501501
*dbadat/g
?
?Illegal memory reference at user PC 602205
So what is causing this illegal memory reference?
To my stunned amazement, following another helpful comment from John Forecast I have discovered that the MUD.TAP tape file on GitHub contains a compiled working version of MUD1 rather than the just the source files, which is what I had assumed. Let that be the lesson! So I can jump ahead by skipping the whole build form source stage and get to:
.ru mud
You shouldn't run MUD privileged!
I don't seem to be able to access :F.MUD[166055000000,0], it's
not your fault, sorry.
However, I think that this journey is not complete if I don’t build from scratch and the suggestion is that the MUD.MIC file that I have transcribed is still not quite right for target all. The next step then is to explode the MUD.MAS file which contains the source from the tape to see what lies within.
It looks like there’s a mismatch between the MUD.MIC you transcribed and the source tree – the high segment is possibly getting truncated by the /SET:… switch. If you use the MUD.MIC from MUD.tap it will build without the error message. You will have to make a few changes:
r dskf:bcpl[1,4] => r bcpl
.nsa => save
.nss => ssave
Now when I run MUD I get:
.run mud
isn’t available at the moment. Try again tomorrow?
I have DECnet running on the PDP-10 and also a Raspbian installation on a Raspberry Pi so I think I’ll copy the source over so I can use some more modern tools, like grep!
Cheers John. I didn’t realise there was a mud.mic in the MUD.TAP as I got the source files only. I’ll give it a go.
I restored the MUD.tap above (github), but there are no such file inside. Is there a new link ?
.do mud all
?MICCOF Cannot open file MIC:MUD.MIC – in “DO” command
.dir mud*
MUD MAS 476 28-Feb-84 DSKB: [1,2]
MUD TXT 483 28-Feb-84
MUDTXT MAS 141 28-Feb-84
MUD EXE 552 28-Feb-84
MUD .RM 134 21-Feb-84
MUD .TM 134 28-Feb-84
MUD .OM 39 28-Feb-84
MUD .MM 4 21-Feb-84
Total of 1963 blocks in 8 files on DSKB: [1,2]
From the tape you only need to DO MUD ALL if you are building from source. Looking at your directory you have not unpacked the source code which is in the file MUD.MAS. You will need to use the SUBFIL utility to unpack MUD.MAS. I recommend that you do that in a separate directory or account from the executables as it will be alot of files and there will be a lot of fiddling around to get to a point where it compiles and links.
As it stands, with the files in the directory as you have it above, if you move them (ignoring the .MAS files which you don’t need to runtime game) to [2011,2011] you should be able to just RU MUD and it should probably work. A functioning MUD directory looks like below:
1 DBA 4 <022> 25-Jan-84 DSKB: [2011,2011]
2 DBA 6 <022> 19-Jan-84
5 DBA 2 <022> 25-Jan-84
6 DBA 2 <022> 14-Feb-84
7 DBA 2 <022> 21-Nov-83
LOGBOO DBA 1 <022> 27-Jan-19
ALMANA DBA 2 <022> 25-Feb-19
BOOK DBA 1 <022> 23-Feb-84
MUD .RM 144 <055> 14-Jan-19
MUD .TM 154 <055> 14-Jan-19
MUD .OM 46 <055> 14-Jan-19
MUD .MM 4 <055> 14-Jan-19
MUD .CM 5 <055> 14-Jan-19
MUD .GM 40 <055> 14-Jan-19
MUD EXE 492 <055> 16-Feb-19
READ MUD 2 <057> 1-Mar-84
READ ME 1 <057> 1-Mar-84
POWER EXE 72 <057> 12-Jan-19
MUD WIZ 1 <055> 12-Jan-19
VALLEY .RM 43 <055> 14-Jan-19
VALLEY .TM 29 <055> 14-Jan-19
VALLEY .OM 8 <055> 14-Jan-19
VALLEY .MM 1 <055> 14-Jan-19
VALLEY .CM 5 <055> 14-Jan-19
VALLEY .GM 20 <055> 14-Jan-19
VALLEY EXE 368 <055> 18-Feb-19
MUD .PM 4 <422> 24-Jan-22