1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +00:00

Move machine-specific KS10 configuration to separate directory.

This commit is contained in:
Lars Brinkhoff 2021-07-05 19:03:40 +02:00
parent 36be2f7530
commit 7ac7598edb
8 changed files with 67 additions and 23 deletions

View File

@ -14,6 +14,7 @@ GIT ?= git
CAT ?= cat
WGET ?= wget
TAR ?= tar
MCHN ?= DB
IMAGES=http://hactrn.org/images/
@ -219,7 +220,7 @@ $(OUT)/bootvt.img: $(OUT)/bootvt.bin tools/dasm/palx
start: build/$(EMULATOR)/start
$(LN) -s $< $*
out/klh10/stamp/pdp10:: $(KLH10) start build/klh10/dskdmp.ini
out/klh10/stamp/pdp10:: $(KLH10) start out/klh10/dskdmp.ini
$(MKDIR) $(OUT)/stamp
$(TOUCH) $@
@ -257,7 +258,7 @@ out/pdp10-kl/system:
$(MKDIR) $(OUT)/system
cp build/pdp10-kl/config.* $(OUT)/system
build/klh10/dskdmp.ini: build/klh10/dskdmp.txt Makefile
out/klh10/dskdmp.ini: build/mchn/$(MCHN)/dskdmp.txt Makefile
cp=';'; ca=''; \
$(TEST) $(CHAOS) != no && cp='' && ca='myaddr=$(CHAOS) $(CHAFRIENDS)'; \
$(SED) -e 's/%IP%/$(IP)/' \

View File

@ -1,12 +1,13 @@
set build [pwd]/build
set out "out/$env(EMULATOR)"
set out "[pwd]/out/$env(EMULATOR)"
cd build/klh10
set emulator_prompt "KLH10"
set emulator_escape "\034"
proc start_salv {} {
uplevel #0 {spawn ./kn10-ks-its nsalv.ini}
global mchn
uplevel #0 "spawn ./kn10-ks-its ../mchn/$mchn/nsalv.ini"
setup_timeout
expect "EOF"
respond "KLH10#" "go\r"
@ -27,27 +28,28 @@ proc start_dskdmp args {
}
#respond "KLH10>" "zero\r"
quit_emulator
uplevel #0 {spawn ./kn10-ks-its dskdmp.ini}
uplevel #0 "spawn ./kn10-ks-its $out/dskdmp.ini"
setup_timeout
expect "EOF"
respond "KLH10#" "devmo mta0 ../../$tape\r"
respond "KLH10#" "devmo mta0 $tape\r"
respond "KLH10#" "go\r"
}
proc start_its {} {
uplevel #0 {spawn ./kn10-ks-its dskdmp.ini}
global out
uplevel #0 "spawn ./kn10-ks-its $out/dskdmp.ini"
setup_timeout
expect "EOF"
respond "KLH10#" "go\r"
}
proc mount_tape {file} {
respond "KLH10>" "devmo mta0 ../../$file\r"
respond "KLH10>" "devmo mta0 $file\r"
respond "KLH10>" "c\r"
}
proc create_tape {file} {
respond "KLH10>" "devmo mta0 ../../$file create\r"
respond "KLH10>" "devmo mta0 $file create\r"
respond "KLH10>" "c\r"
}
@ -65,4 +67,5 @@ proc initialize_comsat {} {
}
source ../ks10/include.tcl
source ../mchn/$mchn/mchn.tcl
source ../build.tcl

View File

@ -40,4 +40,5 @@ while test -n "$1"; do
done
cd build/klh10
ln -s ../../out/klh10/dskdmp.ini .
$SUDO KLH10_NET_DEFAULT_IF=$NET_DEFAULT_IF ./kn10-ks-its dskdmp.ini

View File

@ -1,5 +1,9 @@
#Default ITS name for KS10.
set mchn "DB"
if [info exists env(MCHN)] {
set mchn "$env(MCHN)"
} else {
#Default ITS name for KS10.
set mchn "DB"
}
set cpu "ks10"
set salv "nsalv"
@ -100,7 +104,37 @@ proc prepare_frontend {} {
}
proc finish_mark {} {
shutdown
global emulator_escape
global build
global mchn
global out
# Here's a dance to get around the fact that the bootstrapping ITS
# may have a different disk format from the target. First save
# all files to tape. Next, run the new SALV to mark the disks
# using the target format. Finally load back the files from tape.
respond "*" $emulator_escape
create_tape "$out/reboot.tape"
type ":dump\r"
respond "_" "dump links full\r"
respond "TAPE NO=" "0\r"
expect -timeout 6000 "_"
type "quit\r"
respond "*" $emulator_escape
quit_emulator
start_salv
mark_packs
respond "DDT" $emulator_escape
mount_tape "$out/reboot.tape"
type "tran\033g"
respond "#" "0"
respond "OK" "y"
expect -timeout 300 EOT
respond "DDT" $emulator_escape
}
proc its_switches {} {
@ -126,28 +160,19 @@ proc make_salv {} {
proc make_dskdmp {} {
respond "*" ":midas dsk0:.;_system;dskdmp\r"
expect "Configuration"
respond "?" "ksrp06\r"
respond "Assemble BOOT?" "no\r"
dskdmp_switches "no"
expect ":KILL"
respond "*" ":midas dsk0:.;bt_system;dskdmp\r"
expect "Configuration"
respond "?" "ksrp06\r"
respond "Assemble BOOT?" "yes\r"
dskdmp_switches "yes"
expect ":KILL"
}
proc dump_switches {} {
global mchn
respond "WHICH MACHINE?" "$mchn\r"
}
proc peek_switches {} {
respond "with ^C" "\003"
}
proc dump_nits {} {
global salv

13
build/mchn/DB/mchn.tcl Normal file
View File

@ -0,0 +1,13 @@
proc dskdmp_switches {boot} {
expect "Configuration"
respond "?" "ksrp06\r"
respond "Assemble BOOT?" "$boot\r"
}
proc peek_switches {} {
respond "with ^C" "\003"
}
proc mark_packs {} {
mark_pack "0" "0" "foobar"
}

View File

@ -60,4 +60,5 @@ proc initialize_comsat {} {
}
source build/ks10/include.tcl
source build/mchn/$mchn/mchn.tcl
source build/build.tcl