diff options
author | edwin <edwin@FreeBSD.org> | 2003-01-19 13:55:28 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2003-01-19 13:55:28 +0000 |
commit | 7dd3fd75b7abd67bac51b38f4e3f43358b8b17e0 (patch) | |
tree | aeeafbfff063d147ec4c8b77a3c886368727147a /emulators | |
parent | 5f5c65aef50fc3020464c2a02f20797cd7015928 (diff) | |
download | FreeBSD-ports-7dd3fd75b7abd67bac51b38f4e3f43358b8b17e0.zip FreeBSD-ports-7dd3fd75b7abd67bac51b38f4e3f43358b8b17e0.tar.gz |
New port of ITS RP06 filesystem image for KLH10 PDP-10 emulator
New port containing an ITS RP06 filesystem image for KLH10
PDP-10 emulator. Now's your chance to see firsthand what
was happening at MIT in the 60s through the early 90s. Run
the original versions of Emacs on TECO and Maclisp, etc.
PR: ports/39912
Submitted by: Ken Stailey <kstailey@speakeasy.net>
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/Makefile | 1 | ||||
-rw-r--r-- | emulators/its/Makefile | 59 | ||||
-rw-r--r-- | emulators/its/distinfo | 1 | ||||
-rw-r--r-- | emulators/its/files/MIT-ITS-papers | 17 | ||||
-rw-r--r-- | emulators/its/files/README.FIRST | 190 | ||||
-rw-r--r-- | emulators/its/files/its-user-install.sh | 216 | ||||
-rw-r--r-- | emulators/its/files/its.sh | 57 | ||||
-rw-r--r-- | emulators/its/files/klh10-kn-freebsd.ini.in | 31 | ||||
-rw-r--r-- | emulators/its/pkg-comment | 1 | ||||
-rw-r--r-- | emulators/its/pkg-descr | 14 | ||||
-rw-r--r-- | emulators/its/pkg-plist | 6 |
11 files changed, 593 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile index 65e81c8..904ba3f 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -29,6 +29,7 @@ SUBDIR += hfsutils SUBDIR += ia64sim SUBDIR += ines + SUBDIR += its SUBDIR += klh10 SUBDIR += kmamerun SUBDIR += libvm68k diff --git a/emulators/its/Makefile b/emulators/its/Makefile new file mode 100644 index 0000000..4b8a4f9 --- /dev/null +++ b/emulators/its/Makefile @@ -0,0 +1,59 @@ +# New ports collection makefile for: its +# Date created: 11 January 2002 +# Whom: kstailey +# +# $FreeBSD$ +# + +PORTNAME= its +PORTVERSION= 1.0 +CATEGORIES= emulators +MASTER_SITES= ftp://ftp.usefulprojects.com/pub/FreeBSD/ports/distfiles/ +DISTNAME= PI-ITS-RP06.0-dbd9 +EXTRACT_SUFX= .bz2 +EXTRACT_ONLY= # none + +MAINTAINER= kstailey@yahoo.com + +BUILD_DEPENDS= kn10-ks:${PORTSDIR}/emulators/klh10 +RUN_DEPENDS= kn10-ks:${PORTSDIR}/emulators/klh10 + +ONLY_FOR_ARCHS= i386 # really KLH10 has this problem. + +NO_WRKSUBDIR= yes +NO_BUILD= yes +NO_PACKAGE= PI ITS RP06 disk image is too big. +NO_CDROM= PI ITS RP06 disk image is too big. + +# KSITS_KLH10_HOME and KSITS_DRIVER_DIR must be set to the same locations +# that the klh10 port uses +KSITS_KLH10_DIR= klh10-ks-its +KLH10_HOME= ${PREFIX}/share/${KSITS_KLH10_DIR} +KSITS_DRIVER_DIR= ${PREFIX}/libexec/${KSITS_KLH10_DIR} +IMAGE_HOME?= ${KLH10_HOME} +IMAGE_NAME= PI-ITS-RP06.0-dbd9 +IMAGE_BZ2= ${IMAGE_NAME}.bz2 +DOCDIR= ${PREFIX}/share/doc/${KSITS_KLH10_DIR} +PLIST_SUB+= IMAGE_HOME=${IMAGE_HOME} + +do-install: + @ ${ECHO} Installing compressed PI ITS RP06 disk image in ${IMAGE_HOME} +.if (${IMAGE_HOME} == ${KLH10_HOME}) + @ ${ECHO} Use IMAGE_HOME=/my/directory to relocate. +.endif + @ ${MKDIR} ${IMAGE_HOME} + @ ${INSTALL_DATA} ${DISTDIR}/${IMAGE_BZ2} ${IMAGE_HOME}/${IMAGE_BZ2} + @ ${INSTALL_DATA} ${FILESDIR}/klh10-kn-freebsd.ini.in ${KLH10_HOME} + @ ${INSTALL_SCRIPT} ${FILESDIR}/its.sh ${PREFIX}/bin/its + @ ${SED} -e "s;@PI-IMG@;${IMAGE_NAME};g" \ + -e "s;@KLH-SHARE@;${KLH10_HOME};g" \ + -e "s;@KLH-LIBEX@;${KSITS_DRIVER_DIR};g" \ + ${FILESDIR}/its-user-install.sh > ${WRKSRC}/its-user-install + @ ${INSTALL_SCRIPT} ${WRKSRC}/its-user-install ${PREFIX}/bin + @ ${INSTALL_MAN} ${FILESDIR}/MIT-ITS-papers ${DOCDIR} + @ ${SED} -e "s;@PREFIX@;${PREFIX};g" \ + ${FILESDIR}/README.FIRST >${WRKSRC}/README.FIRST + @ ${INSTALL_MAN} ${WRKSRC}/README.FIRST ${DOCDIR} + @ ${ECHO} "*** Please read ${DOCDIR}/README.FIRST" + +.include <bsd.port.mk> diff --git a/emulators/its/distinfo b/emulators/its/distinfo new file mode 100644 index 0000000..56521fa --- /dev/null +++ b/emulators/its/distinfo @@ -0,0 +1 @@ +MD5 (PI-ITS-RP06.0-dbd9.bz2) = c575c2b02326b26fd36c732378174cbc diff --git a/emulators/its/files/MIT-ITS-papers b/emulators/its/files/MIT-ITS-papers new file mode 100644 index 0000000..ec08986 --- /dev/null +++ b/emulators/its/files/MIT-ITS-papers @@ -0,0 +1,17 @@ +ITS Status report (includes architecture info) from 1972 +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-238.ps + +ITS reference manual from 1969: +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-161A.ps + +Midas macro assembler documentation from 1965: +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-090.ps + +DDT debugger ("system apex procedure" i.e. "shell") from 1968 +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-147.ps + +Emacs text editor (original ITS version) +ftp://publications.ai.mit.edu/ai-publications/500-999/AIM-519A.ps + +These files may be converted to PDF or gzipped to save space: +$ ps2pdf13 AIM-238.ps AIM-238.pdf diff --git a/emulators/its/files/README.FIRST b/emulators/its/files/README.FIRST new file mode 100644 index 0000000..127ad03 --- /dev/null +++ b/emulators/its/files/README.FIRST @@ -0,0 +1,190 @@ +Consider adding firewall protection for the KLH-10 emulator before +ever running it. See @PREFIX@/share/doc/its/pubits/adm directory for +samples. + +To setup the emulator you must run the its-user-install(1) command. +It takes no arguments. It is best to run it as a regular (non-root) +user. Once that has been done to start ITS run the its(1) command. +It also takes no arguments. + +The first time the ITS boots it will not know the time of day. ITS +will display this message: + +The time could not be set because: +No host responded. +It will be necessary for someone to set the time +manually by logging in and running :PDSET. + +Tell ITS to activate the apex procedure, DDT, by typing a Ctrl-Z. +When you type that you will see: + +KN ITS.1647. DDT.1545. +TTY 0 +You're all alone, Fair share = 0% + +(ITS does not know the date, so messages cannot be reviewed right now.) + +Then run PDSET by typing (colon and all) + +:pdset + +ITS will suggest that you log in but you don't have to. + +(Please Log In) +___002 PDSET IOTLSR + +Now enter the time and save it. First the century: + +20C + +Next the YYMMDD: + +020219D + +Then the HHMMSS (try to time it so you have some lead time because it +will become active when you save it.) + +235115T + +Now save the time: + +!. + +Now exit PDSET + +X + +You will have no feedback from the exit operation except that new +commands will be echoed in lower case. Now bring down ITS so you can +start it without being root: + +:lock +(Please Log In) + LOCK.154 +_ + +the _ is a prompt, do not type it. Type + +5down + +LOCK is very picky about typos so be careful. It does not need the +Enter key so don't use it. + +DO YOU REALLY WANT THE SYSTEM TO GO DOWN? + +Type "y" + +y +___004 + PLEASE ENTER A BRIEF MESSAGE TO USERS, ENDED BY ^C +LOCK SYS DOWN MAIL WRITE 21:13:17 + +Just type Ctrl-C for the message unless you have a burning desire to +talk to yourself via ITS. + +KN ITS going down in 5:00 +CULPRIT = ___004 LOCK 21:13:38 + + +_ +KN ITS 1647 NOT IN OPERATION 21:13:38 +PFTHMG DRAGON CHANNA _DRGN_ TIMES WRITE 21:13:38 +PFTHMG DRAGON CHANNA LOGOUT TIMES DELRNM 21:13:38 + +After the "NOT IN OPERATION" message only very special programs like +the accounting dragon, PFTHMG DRAGON, may run. Be patient and it will +finish with: + +SHUTDOWN COMPLETE +PI LEVEL 7 BUGDDT. TYPE <ALTMODE>P TO CONTINUE. +YOU ARE NOW IN DDT. +BUGPC/ CAIA COFFI4+1 $Q-2/ JRST COFFI7 + +If ITS gets stuck shutting down for more than five minutes just +continue from here: + +At this point type Ctrl-\ to abort KLH10 back to the monitor. + +[HALTED: FE interrupt] +KLH10> + +and quit KLH10 + +KLH10> quit +Are you sure you want to quit? [Confirm]y +Shutting down...Bye! +$ + +ITS uses DEL for erasing characters. ITS defaults to dumb hardcopy +terminal settings. This is a pain so you want to configure ITS to +use something nicer. ITS knows about VT52. If you are using xterm +from XFree86 you can get into VT52 mode by running a script like this: + +#! /bin/sh + +awk 'END {printf "%c[?2l", 27}' </dev/null + +From ITS run +:tctyp vt52 + +On your VT52 mode terminal emulator. + +An alternative is that you can use vt100 mode via the CRTSTY program +which is a bit like window(1) in that you end up on something like a +pty but only one full screen window is available and it does terminal +emulation on it. You will be automatically logged in a second time on +the same terminal as a crufty side-effect. + +:crtsty vt100 speed 9600 + +Run :info and look at the introductory information about the +filesystem. I did not find that it covers directory operations very +well so here is what I have found out. ITS does have a process tree +(try the PEEK command) but does not have a directory tree. There is a +Master File Directory MFD (try DSKUSE * or DIRED and then MFD. Use +"Q" to quit after either of those.) and User File Directories UFDs one +level deep only. The only way to remove a directory is to delete its +contents and run the salvager. The salvager is the ITS equivalent of +fsck and will automatically be run at boot time. To create a new +directory provide certain options to the open UUO (ITS equivalent of +system call; try the DOC UUO command.) Since the PRINT command calls +the open UUO you can create a directory using print: + +:print ..new. (udir) dirnam; + +Where dirnam; is the name of the directory to be created. Directory +names are limited to six characters. + +Missing from this ITS distribution is the INQUIR database. It +contains user information. There were too many personal details in it +and no one has been able to scrub it so it was left out. This means +you cannot have a complete user account yet. The best you can do is +to pick a user name and make yourself a directory with that name and +put a login script in it. In this example the user "user" is created: + +:login user +:print ..new. (udir) user; +:emacs login user +[add startup code like ":tctyp vt52" and ^X^S to save ^X^C to exit] + +You log out with <ALTMODE><ALTMODE>u which is [Esc][Esc]u and +represented in the documentation as $$u + +The ITS equivalent of $PATH is implemented by scanning all +directories for files for files with TS as the first name and +the second name set to the command you issued. By convention +most commands are in the SYS; SYS1; ... SYSN; directories. +ITS supports symlinks via the LINK command and TS name is often +a symlink. + +ITS equivalent of job control works by typing ^Z to interrupt the +current program. To get back to the DDT prompt "*" use $^K + +Don't like DDT as the shell? Try MONMOD to use monitor mode where the +colon is printed for you. DDTMOD gets you back. Or try SHELL to +bring up a UNIX-like shell. + +Zork was developed in MDL (muddle) on an ITS system but apparently it +suffered from being too popular. Try the ZORK command to see what +happened. A scrap of MDL source code is left (:find @muddle) but I +don't know how to MIDAS it. diff --git a/emulators/its/files/its-user-install.sh b/emulators/its/files/its-user-install.sh new file mode 100644 index 0000000..07af966 --- /dev/null +++ b/emulators/its/files/its-user-install.sh @@ -0,0 +1,216 @@ +#! /bin/sh + +# $FreeBSD$ + +# 1) zcat the PI fs image into a user's directory (the compressed +# image location is also configurable via "make install") +# +# 2) copy or lndir the /usr/local/share/klh10-ks-its/* (this location +# is immutable) bits into a user's directory +# +# 3) generate the klh-kn-its-freebsd .ini file for the user +# +# 4) generate ~/.itsrc file for its(1) command so that multple users +# can use its(1) with different filesystem images. + +umask 022 + +# remove symlinks in cleanup()? + +cleanup() { + rm -f $KLH10_HOME/@PI-IMG@ + echo its-install-user: Terminating. + exit 1 +} + +trap cleanup 1 2 3 15 + +validate_ip() { + echo $1 | grep -q -s '[^0-9\.]' + if [ $? != 1 ]; then + echo its-install-user: IP address must be digits and periods only. + return 1 + fi + echo $1 | grep -q -s '\..*\..*\.' + if [ $? != 0 ]; then + echo its-install-user: IP address must have at least three periods. + return 1 + fi + echo $1 | grep -q -s '\..*\..*\..*\.' + if [ $? = 0 ]; then + echo its-install-user: IP address must not exceed three periods. + return 1 + fi + echo $1 | grep -q -s '\.\.' + if [ $? = 0 ]; then + echo its-install-user: IP address must not have consecutive periods. + return 1 + fi + OLDIFS="$IFS" + IFS=. + set $1 + for i in $* ; do + if [ $i -gt 255 ]; then + echo its-install-user: Octets of IP address must not exceed 255. + IFS="$OLDIFS" + return 1 + fi + done + IFS="$OLDIFS" + return 0 +} + +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi + +if [ ! -d @KLH-SHARE@ ]; then + echo its-install-user: Can\'t find the emulator directory. + cleanup +fi + +cd @KLH-SHARE@ + +if [ ! -r @PI-IMG@.bz2 ]; then + echo its-install-user: The compressed PI disk image is missing. + cleanup +fi + +valid_input=false +while [ $valid_input = false ]; do + KLH10_HOME=~/klh10-its-home + echo Where do you want to install the 170MB filesystem image\? + echo -n "[default: $KLH10_HOME]: " + read ans + if [ "$ans" != "" ]; then + KLH10_HOME=$ans + fi + + if [ -e $KLH10_HOME -a ! -d $KLH10_HOME ]; then + echo There already is a non-directory $KLH10_HOME in the filesystem. + continue + fi + if [ ! -d $KLH10_HOME ]; then + echo -n "$KLH10_HOME is not an existing directory. Create it? (y/n) " + read yorn + case "$yorn" in + y|Y) + if ! mkdir -p $KLH10_HOME ; then + echo its-install-user: Can\'t make the target directory. + cleanup + else + valid_input=true + fi + ;; + n|N) + echo Type the interupt key to quit or try again. + ;; + *) + echo "I do not recognize your answer. ($yorn)" + ;; + esac + elif [ ! -w $KLH10_HOME ]; then + if ! chmod u+w $KLH10_HOME || chmod g+w $KLH10_HOME; then + echo its-install-user: Can\'t write in $KLH10_HOME + elif [ ! -w $KLH10_HOME ]; then + echo its-install-user: Can\'t write in $KLH10_HOME + else + valid_input=true + fi + else + valid_input=true + fi +done + +echo Extracting @PI-IMG@.bz2 into $KLH10_HOME +bzcat @PI-IMG@.bz2 > $KLH10_HOME/@PI-IMG@ + +if [ $? != 0 ]; then + echo its-install-user: What a mess--the extract failed. + cleanup +fi + +echo Linking up the emulator support files. +for i in *; do + case $i in + @PI-IMG@.bz2) # exclusions + ;; + *) + rm -f $KLH10_HOME/$i && ln -s @KLH-SHARE@/$i $KLH10_HOME + if [ $? != 0 ]; then + echo its-install-user: Failed to make symlinks. + cleanup + fi + ;; + esac +done +cd @KLH-LIBEX@ +for i in *; do + rm -f $KLH10_HOME/$i && ln -s @KLH-LIBEX@/$i $KLH10_HOME + if [ $? != 0 ]; then + echo its-install-user: Failed to make symlinks. + cleanup + fi +done +cd $KLH10_HOME + +EM_IP=10.134.198.236 +valid_input=false +while [ $valid_input = false ]; do + echo -n "What is the IP address for the emulated PDP-10? [$EM_IP]: " + read ans + if [ "$ans" != "" ]; then + if validate_ip $ans ; then + valid_input=true + EM_IP=$ans + fi + else + valid_input=true + fi +done + +GW_IP=10.0.0.1 +valid_input=false +while [ $valid_input = false ]; do + echo -n "What is the IP address for the gateway' [$GW_IP]: " + read ans + if [ "$ans" != "" ]; then + if validate_ip $ans ; then + valid_input=true + GW_IP=$ans + fi + else + valid_input=true + fi +done + +sed -e "s;@IPADDR@;$EM_IP;g" \ + -e "s;@GWADDR@;$GW_IP;g" \ + -e "s;@KLH-HOME@;$KLH10_HOME;g" \ + < klh10-kn-freebsd.ini.in > klh10-kn-freebsd.ini +if [ $? != 0 ]; then + echo its-install-user: Failed to generate ini file. + cleanup +fi +rm -f klh10-kn-freebsd.ini.in + +rm -f ~/itsrc +echo KLH10_HOME=$KLH10_HOME > ~/.itsrc +echo PI_IMAGE=$KLH10_HOME/@PI-IMG@ >> ~/.itsrc +if [ $? != 0 ]; then + echo its-install-user: Failed to generate rc file. + cleanup +fi diff --git a/emulators/its/files/its.sh b/emulators/its/files/its.sh new file mode 100644 index 0000000..7eb94f4 --- /dev/null +++ b/emulators/its/files/its.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Run KLH10 with KS-ITS hardware configuration and ITS OS configuration +# to bring up MIT Incompatible Timesharing System emulation. + +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi + +if [ ! -r ~/.itsrc ]; then + echo its: My config file '(~/.itsrc)' is missing! + echo its: Did you remember to run its-user-install\? + echo its: Terminating. + exit 1 +fi + +set -e # croak on corrupt config file. +. ~/.itsrc +set +e + +if [ "$KLH10_HOME" = "" ]; then + echo its: KLH10_HOME is missing from my config file. + echo its: terminating. + exit 1 +elif [ ! -d "$KLH10_HOME" ]; then + echo its: $KLH10_HOME is not a directory. + echo its: terminating. + exit 1 +fi + +if [ "$PI_IMAGE" = "" ]; then + echo its: PI_IMAGE is missing from my config file. + echo its: Terminating. + exit 1 +elif [ ! -w "$PI_IMAGE" ]; then + echo its: $PI_IMAGE is not a writable file. + echo its: Terminating. + exit 1 +fi + +cd $KLH10_HOME +exec lockf -t 0 -k $PI_IMAGE kn10-ks klh10-kn-freebsd.ini diff --git a/emulators/its/files/klh10-kn-freebsd.ini.in b/emulators/its/files/klh10-kn-freebsd.ini.in new file mode 100644 index 0000000..cbcfbe4 --- /dev/null +++ b/emulators/its/files/klh10-kn-freebsd.ini.in @@ -0,0 +1,31 @@ +; KLH10 emulator configuration for KN ITS system from FreeBSD ports collection.. + +; Define basic KS10 device config - two RH11s each on its own Unibus + +devdef rh0 ub1 rh11 addr=776700 br=6 vec=254 +devdef rh1 ub3 rh11 addr=772440 br=6 vec=224 + +; Provide one disk, one tape in config ITS expects + +devdef dsk0 rh0.0 rp type=rp06 format=dbd9 path=@KLH-HOME@/PI-ITS-RP06.0-dbd9 iodly=0 +devdef mta0 rh1.0 tm02 fmtr=tm03 type=tu45 + +; ITS wants a 60Hz clock, allow it. Need this until defaults OK. +set clk_ithzfix=60 + +; Define IMP for KN +devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=@IPADDR@ gwaddr=@GWADDR@ + +; Dummy definitions. Only one DZ is still (apparently) needed. +devdef dz0 ub3 dz11 addr=760010 br=5 vec=340 +;devdef dz1 ub3 dz11 addr=760020 br=5 vec=350 +;devdef chaos ub3 ch11 addr=764140 br=5 vec=270 + +; Define new HOST device hackery +devdef idler ub3 host addr=777000 + +; Preload ITS for convenience +load @.its-647kn-u + +; Use "GO 774000" to start DDT, else just "GO" to start ITS + diff --git a/emulators/its/pkg-comment b/emulators/its/pkg-comment new file mode 100644 index 0000000..3f2fb50 --- /dev/null +++ b/emulators/its/pkg-comment @@ -0,0 +1 @@ +Bootable ITS filesystem for KLH-10 PDP-10 emulator diff --git a/emulators/its/pkg-descr b/emulators/its/pkg-descr new file mode 100644 index 0000000..e8cbd4c --- /dev/null +++ b/emulators/its/pkg-descr @@ -0,0 +1,14 @@ +This is an image of a PI (Public ITS) filesystem that can be booted on +the KLH10 PDP-10 emulator. + +The emulator image is about 45MB compressed and 170MB uncompressed. +The installation needs to have a minimum of 45MB in ports/disfiles +plus 45MB in the installation directory which defaults to +/usr/local/share/klh10-ks-its. That's about 90MB total but "make +distclean" will delete 45MB leaving you with only 45MB. After "make +install" you must run the "its-user-install" script as a regular user +to install an uncompressed 170MB RP06 filesystem image and setup +emulator support files. Additional 170MB RP06 filesystem images +may also be installed. + +For more information about ITS see WWW: http://www.its.os.org/ diff --git a/emulators/its/pkg-plist b/emulators/its/pkg-plist new file mode 100644 index 0000000..ec31aac --- /dev/null +++ b/emulators/its/pkg-plist @@ -0,0 +1,6 @@ +bin/its +bin/its-user-install +%%PORTDOCS%%share/doc/klh10-ks-its/MIT-ITS-papers +%%PORTDOCS%%share/doc/klh10-ks-its/README.FIRST +share/klh10-ks-its/klh10-kn-freebsd.ini.in +@unexec rm -f %%IMAGE_HOME%%/PI-ITS-RP06.0-dbd9.bz2 |