diff --git a/.gitignore b/.gitignore index db0f4ea5..22bb1f67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ -out +/out +/build/klh10/stamp diff --git a/.travis.yml b/.travis.yml index b51ed8a2..46df4d30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: c sudo: required +env: + - EMULATOR=simh + - EMULATOR=klh10 install: - sudo add-apt-repository ppa:dns/gnu -y - sudo apt-get update -myq diff --git a/Makefile b/Makefile index d6e5b25c..d7902095 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ out/dskdmp.tape: $(WRITETAPE) $(RAM) $(DSKDMP) $(WRITETAPE) -n 2560 $@ $(RAM) $(DSKDMP) build/klh10/stamp: $(KLH10) - touch $< + touch $@ $(KLH10): cd tools/klh10; \ diff --git a/build/build.tcl b/build/build.tcl index 1cd8e368..76258831 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -1,12 +1,13 @@ proc type s { - sleep .2 + sleep .1 foreach c [split $s ""] { - send $c + send -- $c if [string match {[a-z]} $c] { expect -nocase $c } else { expect "?" } + sleep .03 } } @@ -16,7 +17,8 @@ proc respond { w r } { } proc pdset {} { - respond "YOU MAY HAVE TO :PDSET" "\032" + type "\032" + respond "Fair" ":pdset\r" set t [timestamp] respond "PDSET" [expr [timestamp -seconds $t -format "%Y"] / 100]C @@ -32,6 +34,17 @@ proc pdset {} { expect ":KILL" } +proc maybe_pdset {} { + expect "YOU MAY HAVE TO :PDSET" { + pdset + } "PDTIME OFFSET" { + pdset + } "IT IS NOW" { + type "\032" + expect "Fair" + } +} + proc shutdown {} { global emulator_escape respond "*" ":lock\r" @@ -77,7 +90,9 @@ set dir $expect_out(1,string) type "write\r" respond "Are you sure" "yes\r" respond "Which file" "bt\r" -respond "Input from" ".;bt rp06\r" +expect "Input from" +sleep 1 +respond ":" ".;bt rp06\r" respond "!" "quit\r" expect ":KILL" shutdown @@ -95,7 +110,7 @@ quit_emulator start_its respond "DSKDMP" "its\r" type "\033g" -pdset +maybe_pdset respond "*" $emulator_escape mount_tape "out/sources.tape" diff --git a/build/klh10/@.ddt-u b/build/klh10/@.ddt-u new file mode 100644 index 00000000..7a1c2f73 Binary files /dev/null and b/build/klh10/@.ddt-u differ diff --git a/build/klh10/@.nsalv-260-u b/build/klh10/@.nsalv-260-u new file mode 100644 index 00000000..856bbcc1 Binary files /dev/null and b/build/klh10/@.nsalv-260-u differ diff --git a/build/klh10/build.tcl b/build/klh10/build.tcl new file mode 100644 index 00000000..7802f535 --- /dev/null +++ b/build/klh10/build.tcl @@ -0,0 +1,44 @@ +cd build/klh10 + +set emulator_prompt "KLH10" +set emulator_escape "\034" + +proc start_nsalv {} { + uplevel #0 {spawn ./kn10-ks-its nsalv.ini} + expect "EOF" + respond "KLH10#" "go\r" +} + +proc restart_nsalv {} { + quit_emulator + start_nsalv +} + +proc start_dskdmp {} { + respond "KLH10>" "zero\r" + respond "KLH10>" "load @.ddt-u\r" + respond "KLH10>" "load dskdmp.216bin\r" + respond "KLH10>" "go\r" +} + +proc start_its {} { + uplevel #0 {spawn ./kn10-ks-its dskdmp.ini} + respond "KLH10#" "go\r" +} + +proc mount_tape {file} { + respond "KLH10>" "devmo mta0 ../../$file\r" + respond "KLH10>" "c\r" +} + +proc create_tape {file} { + respond "KLH10>" "devmo mta0 ../../$file create\r" + respond "KLH10>" "c\r" +} + +proc quit_emulator {} { + respond "KLH10>" "quit\r" + respond "Confirm" "y\r" +} + +source ../build.tcl diff --git a/build/klh10/dskdmp.216bin b/build/klh10/dskdmp.216bin new file mode 100644 index 00000000..9eb26e81 Binary files /dev/null and b/build/klh10/dskdmp.216bin differ diff --git a/build/klh10/dskdmp.ini b/build/klh10/dskdmp.ini new file mode 100644 index 00000000..cef1a545 --- /dev/null +++ b/build/klh10/dskdmp.ini @@ -0,0 +1,29 @@ +; 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=../../out/rp0.dsk iodly=0 +devdef mta0 rh1.0 tm02 fmtr=tm03 type=tu45 +;devdef mta1 rh1.1 tm02 fmtr=tm03 type=tu45 +;devmo mta0 ../../out/minsys.tape +;devmo mta1 ../../out/salv.tape + +; ITS wants a 60Hz clock, allow it. Need this until defaults OK. +set clk_ithzfix=60 + +; Define IMP for PI on ITS.JOSS.COM +devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=199.34.53.51 gwaddr=199.34.53.50 + +; 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 + +load @.ddt-u +load dskdmp.216bin diff --git a/build/klh10/nsalv.ini b/build/klh10/nsalv.ini new file mode 100644 index 00000000..ebb45a37 --- /dev/null +++ b/build/klh10/nsalv.ini @@ -0,0 +1,28 @@ +; 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=../../out/rp0.dsk iodly=0 +devdef mta0 rh1.0 tm02 fmtr=tm03 type=tu45 +devdef mta1 rh1.1 tm02 fmtr=tm03 type=tu45 +devmo mta0 ../../out/minsys.tape +devmo mta1 ../../out/salv.tape + +; ITS wants a 60Hz clock, allow it. Need this until defaults OK. +set clk_ithzfix=60 + +; Define IMP for PI on ITS.JOSS.COM +devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=199.34.53.51 gwaddr=199.34.53.50 + +; 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 + +load @.nsalv-260-u