2.11 BSD

Well over on the HECNet mailing list, there has been quite a bit of excitement over the opencores project, that is a PDP11/70 system on a chip.

It’ll run on two FPGA eval boards, and can even boot up 2.11 BSD!

So I figured I’d get into some of the spirit, and see how far I could get with SIMH. Following the great instructions on vak.ru to get a 2.11 BSD tape installed into SIMH. I then spent some time trying to work out a working Ethernet configuration to at least be able to telnet into the VM… It seems the de driver under the PDP-11 suffers the same problem the VAX 11/780 had regarding something being flagged somewhere with errors. I didn’t ‘fix’ the simulator I took the shortcut, and fixed the driver to ignore all errors on the interface, and now I can telnet into it!

I’ve also modified the boot program, and init to auto-boot the kernel, and bring the system up into multi-user automatically.

So I just slapped together a zip file, and placed it on my sourceforge page here for downloading. I didn’t do an installer program this time, as I wanted to build some programs to make it more fun, but it seems that the PDP-11 is limited to 64k data/ 64k instructions for executables, so although I’ve compiled ircII, it will not link. I can verify that you can telnet into the VM (localhost 42323), and the pdp11 executable I’ve enclosed includes my SLiRP patches.

And.. it runs Zork!

I guess for the more adventitious, you could extract out the rest of the source, and apply the some 400+ patches to 2.11 BSD and have a current system. But if anyone knows how to build something like IRC on 2.11 BSD give me a shout.

Oh, and much to my surprise, this version includes zork, and it’s the same RT-11/LSI-11 binary that the VAX loaded up in some RT-11 syscall emulator.

More FORTRAN/PDP11/Dungeon/Zork fun

Thanks to the countless comments on the SIMH list, and the final missing step from Peter Schorn One of the source copies of Dungeon now builds.

If you want to follow along, you’ll need the pdp11 emulator from SIMH, and the following disk images (local mirror):

Then create an ini file like this:

set cpu 256k
set rq0 rx50
set rq1 rx50
set rq2 rx50
set rq3 rx50

att rk0 rtv4_rk.dsk
att rk1 dunsrc.dsk

boot rk0

Then go ahead and run it:

PDP-11 simulator V3.8-1
Disabling CR

RT-11SJ V04.00C

.D 56=5015

.TYPE V4USER.TXT
Welcome to RT-11 Version 4. RT-11 V04 provides new hardware support
and some major enhancements over Version 3B.

Please use the HELP command; it describes the new options in many
of the utilities.

If you are using a terminal that requires fill characters,
modify location 56 with a Deposit command before proceeding with
system installation. LA36 DECwriter II and VT52 DECscope terminals
do NOT require such modification.

.D 56=0

.

Hit Control+E and “insert” the first Fortran disk

Simulation stopped, PC: 156070 (MOV (SP)+,R2)
sim> att rx0 fortran-iv-v021-compiler-files.img
RX: buffering file in memory
sim> c

Then we are going to do the following:

.ASSIGN RK0: OUP

.ASSIGN DX0 INP

.R PIP
*SY:*.*=INP:FORTRA.HLP,DEMO.FOR
*^C

.RUN INP:FORGEN
Answer questions with:
“?” or carriage return (<CR>) for information,
YES(Y) for affirmation, anything else for NO.

A maximum of 56 lines are allowed per listing page.
Is this acceptable? Y
A maximum of 136 characters are allowed in a formatted
(ASCII) record. Is this acceptable? Y
A maximum of 6 channels may be open at a given time.
Is this acceptable? Y
The FORTRAN compiler can compile system-specific OPEN and CLOSE
statement keywords for RT-11, RSX-11, and RSTS/E systems. These
statements are currently compiled for the following system: RT-11
Is this acceptable? Y
FORTRAN can produce inline code for EAE, EIS or FIS hardware,
or it can produce threaded (THR) code which is hardware independent.
Should the compiler produce EAE code? N
Should the compiler produce EIS code? N
Should the compiler produce FIS code? N
Should the compiler produce THR code? Y
The inline compiler can optimize for SPEED or for SIZE. These
optimizations are mutually exclusive. Do you want
the optimization to be for SPEED? N
Do you wish a threaded only compiler? Y
Compiler options selection complete.

.@INP:F4LTHR

.R LINK
*OUP:FORTRA=INP:FROOT///S
*INP:F0,INLINE,OUP:DEFLTS/O:1
*INP:F1/O:1
*INP:F2/O:1
*INP:F3/O:1
*INP:F4/O:1
*INP:F5/O:1
*INP:F6/O:1
*INP:F7/O:1
*INP:F8/O:1
*INP:F9/O:1
*INP:F10/O:1
*INP:LOOP/O:1
*INP:F11/O:1
*INP:F12/O:1
*INP:F13/O:1
*INP:F14/O:1
*INP:F15/O:1
*INP:F16/O:1
*INP:F17/O:1
*INP:CDUMP/O:1//
*^C

.

Ok, now the compiler should be created. We next need to interrupt the emulator again (control+e) and insert the objecttime diskette. We will now build our Fortran library.

Simulation stopped, PC: 151412 (ASL R3)
sim> att rx0 fortran-iv-v021-objecttime-system.img
RX: writing buffer to file
RX: buffering file in memory
sim> c


.R LIBR

*OUP:FORLIB=INP:NHD,OTSCOM,NOVIR,V2NS/G
Global? $ERRS
Global? $ERRTB
Global? $VRINT
Global?
*^C

Now with that out of the way, we build a test program to make sure our compiler & library are working.

.COMPILE DEMO.FOR
.MAIN.

.LINK DEMO,FORLIB

.RUN DEMO
***** RT11 FORTRAN IV V2 DEMONSTRATION TEST *****

INSTALLATION SUCCESSFUL IF NO ERROR MESSAGES
WERE PRINTED ABOVE.

**** FORTRAN DEMONSTRATION TEST COMPLETE *****

Ok everything looks fine! Now onward to Dungeon! First we copy everything to the RK0 disk…

.COPY RK1:*.* *.*
Files copied:
RK1:ACTORS.FTN to DK:ACTORS.FTN
RK1:CLOCKR.FTN to DK:CLOCKR.FTN
RK1:DEMONS.FTN to DK:DEMONS.FTN
RK1:DGAME.FTN to DK:DGAME.FTN
RK1:DINIT.FTN to DK:DINIT.FTN
RK1:DMAIN.FTN to DK:DMAIN.FTN
RK1:DSUB.FTN to DK:DSUB.FTN
RK1:DUNGEO.DOC to DK:DUNGEO.DOC
RK1:DVERB1.FTN to DK:DVERB1.FTN
RK1:DVERB2.FTN to DK:DVERB2.FTN
RK1:GDT.FTN to DK:GDT.FTN
RK1:OBJCTS.FTN to DK:OBJCTS.FTN
RK1:RRND.MAC to DK:RRND.MAC
RK1:RSXTIM.MAC to DK:RSXTIM.MAC
RK1:SVERBS.FTN to DK:SVERBS.FTN
RK1:VERBS.FTN to DK:VERBS.FTN
RK1:VMSRND.MAC to DK:VMSRND.MAC
RK1:BALLOP.FOR to DK:BALLOP.FOR
RK1:DINDX.DAT to DK:DINDX.DAT
RK1:DSO1.FOR to DK:DSO1.FOR
RK1:DSO2.FOR to DK:DSO2.FOR
RK1:DSO3.FOR to DK:DSO3.FOR
RK1:DSO4.FOR to DK:DSO4.FOR
RK1:DSO5.FOR to DK:DSO5.FOR
RK1:DSO6.FOR to DK:DSO6.FOR
RK1:DSO7.FOR to DK:DSO7.FOR
RK1:LIGHTP.FOR to DK:LIGHTP.FOR
RK1:NOBJS.FOR to DK:NOBJS.FOR
RK1:NP.FOR to DK:NP.FOR
RK1:NP1.FOR to DK:NP1.FOR
RK1:NP2.FOR to DK:NP2.FOR
RK1:NP3.FOR to DK:NP3.FOR
RK1:NROOMS.FOR to DK:NROOMS.FOR
RK1:ROOMS.FOR to DK:ROOMS.FOR
RK1:RTTIM.FOR to DK:RTTIM.FOR
RK1:SOBJS.FOR to DK:SOBJS.FOR
RK1:VILLNS.FOR to DK:VILLNS.FOR
RK1:VMSTIM.FOR to DK:VMSTIM.FOR
RK1:D.ODL to DK:D.ODL
RK1:DTEXT.DAT to DK:DTEXT.DAT
RK1:RSTSCB.CTL to DK:RSTSCB.CTL
RK1:RSXBLD.CMD to DK:RSXBLD.CMD
RK1:RSXCMP.CMD to DK:RSXCMP.CMD
RK1:RTBLD.COM to DK:RTBLD.COM
RK1:RTCMP.COM to DK:RTCMP.COM
RK1:VMSBLD.COM to DK:VMSBLD.COM
RK1:VMSCMP.COM to DK:VMSCMP.COM

Then we need to make some space…

.DELETE *.DAT
Files deleted:
DK:DINDX.DAT ? Y
DK:DTEXT.DAT ? Y

Now we can compile the fortran

.@RTCMP

.COM/NOLINE DMAIN.FTN,DGAME.FTN,DSUB.FTN
DUNGEO
GAME
XENDMV
XVEHIC
RSPEAK
RSPSUB
RSPSB2
OBJACT
BUG
NEWSTA
QHERE
QEMPTY
JIGSUP
?FORTRAN-I-[JIGSUP] Errors: 0, Warnings: 4
OACTOR
PROB
RMDESC
RAPPLI

.COM/NOLINE DINIT.FTN
INIT
PROTCT

.COM/NOLINE NP,NP1,NP2,NP3
RDLINE
PARSE
ORPHAN
LEX
SPARSE
?FORTRAN-I-[SPARSE] Errors: 0, Warnings: 1
GETOBJ
?FORTRAN-I-[GETOBJ] Errors: 0, Warnings: 1
SCHLST
?FORTRAN-I-[SCHLST] Errors: 0, Warnings: 2
THISIT
SYNMCH
UNPACK
SYNEQL
TAKEIT
GWIM

.COM/NOLINE/NOVEC GDT.FTN
GDT

.COM/NOLINE VERBS.FTN,OBJCTS.FTN
VAPPLI
?FORTRAN-I-[VAPPLI] Errors: 0, Warnings: 1
CLOCKD
OAPPLI

.COM/NOLINE SVERBS.FTN,DVERB1.FTN,DVERB2.FTN,ACTORS.FTN,DEMONS.FTN,CLOCKR.FTN
SVERBS
TAKE
DROP
PUT
VALUAC
SAVEGM
RSTRGM
WALK
CXAPPL
AAPPLI
THIEFD
?FORTRAN-I-[THIEFD] Errors: 0, Warnings: 3
FIGHTD
BLOW
SWORDD
?FORTRAN-I-[SWORDD] Errors: 0, Warnings: 1
INFEST
CEVAPP
?FORTRAN-I-[CEVAPP] Errors: 0, Warnings: 4
LITINT

.COM/NOLINE ROOMS.FOR,NROOMS.FOR
RAPPL1
?FORTRAN-I-[RAPPL1] Errors: 0, Warnings: 2
RAPPL2
?FORTRAN-I-[RAPPL2] Errors: 0, Warnings: 1
LOOKTO
EWTELL

.COM/NOLINE SOBJS.FOR,NOBJS.FOR,BALLOP.FOR,LIGHTP.FOR,VILLNS.FOR
SOBJS
?FORTRAN-I-[SOBJS ] Errors: 0, Warnings: 1
NOBJS
?FORTRAN-I-[NOBJS ] Errors: 0, Warnings: 2
MIRPAN
BALLOP
LIGHTP
TROLLP
CYCLOP
THIEFP
?FORTRAN-I-[THIEFP] Errors: 0, Warnings: 2

.COM/NOLINE DSO1.FOR,DSO2.FOR,DSO3.FOR,DSO4.FOR,DSO5.FOR,DSO6.FOR,DSO7.FOR
PRINCR
?FORTRAN-I-[PRINCR] Errors: 0, Warnings: 2
INVENT
?FORTRAN-I-[INVENT] Errors: 0, Warnings: 1
PRINCO
MOVETO
SCORE
SCRUPD
FINDXT
FWIM
YESNO
ROBADV
?FORTRAN-I-[ROBADV] Errors: 0, Warnings: 1
ROBRM
?FORTRAN-I-[ROBRM ] Errors: 0, Warnings: 1
WINNIN
FIGHTS
VILSTR
GTTIME
OPNCLS
LIT
?FORTRAN-I-[LIT ] Errors: 0, Warnings: 1
WEIGHT
?FORTRAN-I-[WEIGHT] Errors: 0, Warnings: 1
GHERE
MRHERE
ENCRYP
CPGOTO
?FORTRAN-I-[CPGOTO] Errors: 0, Warnings: 1
CPINFO

.COM/NOLINE RTTIM.FOR
ITIME

.COM RRND.MAC
ERRORS DETECTED: 0

So far so good. Now we can delete the source from our primary disk, take note that we don’t delete the demo program:

.DELETE *.FOR
Files deleted:
DK:DEMO.FOR ? N
DK:BALLOP.FOR ? Y
DK:RTTIM.FOR ? Y
DK:VMSTIM.FOR ? Y
DK:DEMOF1.FOR ? Y
DK:DSO3.FOR ? Y
DK:TEST55.FOR ? Y
DK:GETSTR.FOR ? Y
DK:PUTSTR.FOR ? Y
DK:DSO1.FOR ? Y
DK:DSO2.FOR ? Y
DK:DSO4.FOR ? Y
DK:DSO5.FOR ? Y
DK:DSO6.FOR ? Y
DK:DSO7.FOR ? Y
DK:LIGHTP.FOR ? Y
DK:NOBJS.FOR ? Y
DK:NP.FOR ? Y
DK:NP1.FOR ? Y
DK:NP2.FOR ? Y
DK:NP3.FOR ? Y
DK:NROOMS.FOR ? Y
DK:ROOMS.FOR ? Y
DK:SOBJS.FOR ? Y
DK:VILLNS.FOR ? Y

Next we need to remove the ftn files:

.DEL *.FTN
Files deleted:
DK:ACTORS.FTN ? Y
DK:CLOCKR.FTN ? Y
DK:DEMONS.FTN ? Y
DK:DGAME.FTN ? Y
DK:DINIT.FTN ? Y
DK:DMAIN.FTN ? Y
DK:DSUB.FTN ? Y
DK:DVERB1.FTN ? Y
DK:DVERB2.FTN ? Y
DK:GDT.FTN ? Y
DK:OBJCTS.FTN ? Y
DK:SVERBS.FTN ? Y
DK:VERBS.FTN ? Y

Now we are going to link our executable dungeo.sav . However the default link procedures will not work for us, it’s just easier to paste this entire thing into the console.

.LINK/INCLU/PRO/MAP:NL:/BOT:1200/EXE:DUNGEO DMAIN,DGAME,DSUB,RRND,RTTIM
*DINIT,GDT/O:1
*NP,NP1,NP2,NP3/O:1
*VERBS,OBJCTS/O:1
*SVERBS/O:2
*DVERB1/O:2
*DVERB2/O:2
*ACTORS/O:2
*DEMONS/O:2
*CLOCKR/O:2
*ROOMS/O:3
*NROOMS/O:3
*SOBJS/O:3
*NOBJS/O:3
*BALLOP,LIGHTP,VILLNS/O:3
*DSO1/O:4
*DSO2/O:4
*DSO3/O:4
*DSO4/O:4
*DSO5/O:4
*DSO6/O:4
*DSO7/O:4
*SY:FORLIB//
Library search? $SHORT
Library search?

Now we don’t need the object files anymore they can be deleted. However we are NOT going to delete the system objects so this isn’t a wholesale deletion.

.DEL *.OBJ
Files deleted:
DK:SYSLIB.OBJ ? N
DK:ODT.OBJ ? N
DK:VDT.OBJ ? N
DK:VTHDLR.OBJ ? N
DK:PLOT55.OBJ ? N
DK:DEFLTS.OBJ ? N
DK:FORLIB.OBJ ? N
DK:DEMO.OBJ ? Y
DK:DMAIN.OBJ ? Y
DK:DGAME.OBJ ? Y
DK:DSUB.OBJ ? Y
DK:DINIT.OBJ ? Y
DK:NP.OBJ ? Y
DK:NP1.OBJ ? Y
DK:NP2.OBJ ? Y
DK:NP3.OBJ ? Y
DK:GDT.OBJ ? Y
DK:VERBS.OBJ ? Y
DK:OBJCTS.OBJ ? Y
DK:SVERBS.OBJ ? Y
DK:DVERB1.OBJ ? Y
DK:DVERB2.OBJ ? Y
DK:ACTORS.OBJ ? Y
DK:DEMONS.OBJ ? Y
DK:CLOCKR.OBJ ? Y
DK:ROOMS.OBJ ? Y
DK:NROOMS.OBJ ? Y
DK:SOBJS.OBJ ? Y
DK:NOBJS.OBJ ? Y
DK:BALLOP.OBJ ? Y
DK:LIGHTP.OBJ ? Y
DK:VILLNS.OBJ ? Y
DK:DSO1.OBJ ? Y
DK:DSO2.OBJ ? Y
DK:DSO3.OBJ ? Y
DK:DSO4.OBJ ? Y
DK:DSO5.OBJ ? Y
DK:DSO6.OBJ ? Y
DK:DSO7.OBJ ? Y
DK:RTTIM.OBJ ? Y
DK:RRND.OBJ ? Y

Now with enough disk space free’d we can copy back the database files needed

.COPY RK1:*.DAT *.*
Files copied:
RK1:DINDX.DAT to DK:DINDX.DAT
RK1:DTEXT.DAT to DK:DTEXT.DAT

And now we can run dungeon!

.R DUNGEO
Welcome to Dungeon. This version created 18-JUL-80.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
>HISTORY
Revision history:

18-JUL-80 Transportable data base file (V2.5A).
28-FEB-80 Compressed text file (V2.4A).
15-NOV-79 Bug fixes (V2.3A).
18-JAN-79 Revised DECUS version (V2.2A).
10-OCT-78 Puzzle Room (V2.1A).
10-SEP-78 Endgame (V2.0A).
10-AUG-78 DECUS version (V1.1B).
14-JUN-78 Public version with parser (V1.1A).
4-MAR-78 Debugging version (V1.0A).
>QUIT
Your score would be 0 [total of 585 points], in 2 moves.
This gives you the rank of Beginner.
Do you wish to leave the game?
Y

.

You can always hit control+e to exit SIMH.

Well there you have it, the Fortran installation, compilation, linking & execution of the oldest source version I can find at the moment of Dungeon/Zork. Who knows, maybe someday this may help someone revive other old programs.

Fun links

Well today it’s raining, and I was trying to get my Verizon DSL working… To no avail, they just keep closing tickets saying it works fine, but my modem just blinks… No connection.

Apparently terminating an analog port is beyond them. I’ll have to cancel the thing on Monday as it’s become a complete waste of time.

Anyways I came across this link, of an incredible PDP-11 collection. This guys got quite a set, and even snuck an 11/750 in there. Sadly he’s running VMS on it… Anyways it’s a great source for some pictures!

And this one is not exactly safe for work, so here is the NSFW tag.. lol but anyways this guy seems to be having way too much fun with his PDP-11.

On that note, I got BOCHS to compile, now I just need to rip apart it’s ethernet code and see if I can inject some SLiRP into it…

Announcing Research Unix v1 for Windows

 

Today I have decided that I should make a windows installer for the Unix v1 restoration project’s efforts on getting Unix v1 running.

For windows users this is a simple click & install project. This version of Unix v1 will support up to 8 simultaneous users on the system. Please note that this is a ‘rework’ of the v1 kernel from printouts to run a v2 userland, and the earliest C compiler from somewhere around v3-v4. It is not ‘pure’ per say as almost all v1 Unix documentation, tapes have been lost.

Simply install with all options, then click on the “RUN unixv1” link, and the kernel will load up (quickly!) to a login prompt. Login as root, and you should be good to go. Additional users can telnet into the host PC on port 12323 and they will be prompted to login. You can also use the “attach a pty” link, and it will launch teraterm pro onto the port 12323.

Because of the age of this system lots of commands that you take for granted did not exist back in 1972. A quick survey of my own use led to this:

Sync –doesn’t exist-
Reboot –doesn’t exist-
Vi –doesn’t exist-
Clear –doesn’t exist-
Cd –it’s actually chdir
Finger –doesn’t exist-
UUCP –doesn’t exist-
TCP/IP –doesn’t exist-

Remember it’s on a system with 32kb of ram. Don’t confuse Unix’s humble beginnings with the later v7 on the VAX, or the BSD releases that added TCP/IP networking.

I have included the PDF for the 2nd edition programmers guide. Since the userland is from this generation it is as close as you will get to a system manpage.

To exit the emulator, you can just close the SIMH process window, or hit Control+E then q to quit. I’m not sure of a ‘clean’ way to reset a Unix v1 machine. If there is significant disk corruption, I’d just recommend un-installing this program, then re-installing. It is no doubt the saving grace about running this emulated. As far as I know nobody has run this on a physical PDP-11. You would require an actual 11/20 because of how the multiply / divide instruction is handled. I won’t run on any of the bigger PDP-11’s.

The project page is:

http://sourceforge.net/projects/bsd42/

You can download this release from here:
https://sourceforge.net/project/downloading.php?group_id=204974&filename=Research-unixv1-0.3.exe&a=32102074

Unix v7 for the x86!

Ok so this isn’t exactly emulation, since you can already run Unix v7 via simh’s PDP11 emulator, however you cannot overlook the coolness factor of this. They have ported v7 to the i486 cpu.

http://www.nordier.com/v7x86/index.html

In other news I’ve done a very preliminary port of the SLiRP stack from Qemu to SIMH. What is cool about this, is that it allows user mode networking so that you do not have to configure any drivers on the host. Currently I have 4.3BSD-Reno running under the MicroVAX II simulator. I’m going to add some extra utilities (gzip/gcc/gnumake/ircii-4/lynx?/wget?/apache?), convert the SMM into PDF’s, and make it into an install package, much like the 4.2BSD on sourceforge.

If anyone want’s to alpha test it, let me know, otherwise the next post will most likely be the release of 4.3BSD-RENO with NAT!

Happy Thanksgiving!