mirror of
https://github.com/PDP-10/its.git
synced 2026-01-11 23:53:12 +00:00
Update KA ITS bootstrap with one more round of SALV and MARK.
This is to accommodate a bootstrap ITS with a disk format different from the target ITS.
This commit is contained in:
parent
233f6fac5b
commit
1c6857fc0f
@ -22,10 +22,9 @@ proc mark_pack {unit pack id} {
|
||||
}
|
||||
|
||||
proc mark_packs {} {
|
||||
# Bootstrap ITS uses just packs 2 and 3.
|
||||
mark_pack "0" "2" "2"
|
||||
mark_pack "1" "3" "3"
|
||||
mark_pack "2" "0" "0"
|
||||
mark_pack "3" "1" "1"
|
||||
}
|
||||
|
||||
proc prepare_frontend {} {
|
||||
@ -34,6 +33,42 @@ proc prepare_frontend {} {
|
||||
proc frontend_bootstrap {} {
|
||||
}
|
||||
|
||||
proc finish_mark {} {
|
||||
global emulator_escape
|
||||
global build
|
||||
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"
|
||||
|
||||
exec -ignorestderr $build/magdmp.sh $out
|
||||
|
||||
respond "*" $emulator_escape
|
||||
quit_emulator
|
||||
start_salv build/pdp10-ka/init2
|
||||
|
||||
mark_pack "0" "2" "2"
|
||||
mark_pack "1" "3" "3"
|
||||
mark_pack "2" "0" "0"
|
||||
mark_pack "3" "1" "1"
|
||||
|
||||
respond "DDT" "tran\033g"
|
||||
respond "#" "0"
|
||||
respond "OK" "y"
|
||||
expect -timeout 300 EOT
|
||||
respond "DDT" $emulator_escape
|
||||
}
|
||||
|
||||
proc its_switches {} {
|
||||
global mchn
|
||||
respond "MACHINE NAME =" "$mchn\r"
|
||||
@ -82,9 +117,17 @@ proc make_dskdmp {} {
|
||||
global emulator_escape
|
||||
global out
|
||||
|
||||
# On-disk @ DSKDMP.
|
||||
respond "*" ":midas dsk0:.;@ dskdmp_system;dskdmp\r"
|
||||
dskdmp_switches "N"
|
||||
expect ":KILL"
|
||||
|
||||
# Paper tape DSKDMP. This is used for booting ITS.
|
||||
respond "*" $emulator_escape
|
||||
punch_tape "$out/dskdmp.rim"
|
||||
type ":midas ptp:_system;dskdmp\r"
|
||||
dskdmp_switches "Y"
|
||||
expect ":KILL"
|
||||
}
|
||||
|
||||
proc dump_switches {} {
|
||||
@ -110,21 +153,8 @@ proc dump_nits {} {
|
||||
respond "\n" "\033u"
|
||||
respond "DSKDMP" "d\033$salv\r"
|
||||
|
||||
# Since we bootstrap with a 2-pack ITS, we need to copy the MFD to
|
||||
# the fresh packs.
|
||||
respond "\n" "$salv\r"
|
||||
respond "\n" "ucop\033g"
|
||||
respond "UNIT #" "0"
|
||||
respond "UNIT #" "2"
|
||||
respond "OK?" "Y"
|
||||
respond "DDT" "ucop\033g"
|
||||
respond "UNIT #" "0"
|
||||
respond "UNIT #" "3"
|
||||
respond "OK?" "Y"
|
||||
respond "DDT" "\033u"
|
||||
|
||||
# Now dump the new ITS.
|
||||
respond "DSKDMP" "t\033its bin\r"
|
||||
respond "\n" "t\033its bin\r"
|
||||
respond "\n" "\033u"
|
||||
respond "DSKDMP" "m\033$salv bin\r"
|
||||
respond "\n" "d\033nits\r"
|
||||
|
||||
@ -42,6 +42,10 @@ proc prepare_frontend {} {
|
||||
proc frontend_bootstrap {} {
|
||||
}
|
||||
|
||||
proc finish_mark {} {
|
||||
shutdown
|
||||
}
|
||||
|
||||
proc its_switches {} {
|
||||
global mchn
|
||||
|
||||
|
||||
@ -94,6 +94,10 @@ proc frontend_bootstrap {} {
|
||||
expect ":KILL"
|
||||
}
|
||||
|
||||
proc finish_mark {} {
|
||||
shutdown
|
||||
}
|
||||
|
||||
proc its_switches {} {
|
||||
global mchn
|
||||
|
||||
|
||||
13
build/magdmp.sh
Executable file
13
build/magdmp.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
out="$PWD/$1"
|
||||
|
||||
mkdir .tmp
|
||||
cp bin/ka10/boot/* .tmp
|
||||
cd .tmp
|
||||
../tools/itstar/itstar xf $out/reboot.tape
|
||||
mv _/salv.bin .
|
||||
../tools/dasm/magfrm magdmp.bin @.ddt salv.bin > $out/magdmp2.tap
|
||||
cd ..
|
||||
rm -rf .tmp
|
||||
exit 0
|
||||
@ -59,6 +59,6 @@ make_dskdmp
|
||||
|
||||
frontend_bootstrap
|
||||
|
||||
shutdown
|
||||
finish_mark
|
||||
start_dskdmp
|
||||
dump_nits
|
||||
|
||||
@ -14,7 +14,7 @@ set dtc dis
|
||||
set dk dis
|
||||
set pd ena
|
||||
set pd on
|
||||
at ptr bin/ka10/boot/dskdmp.rim
|
||||
at ptr out/pdp10-ka/dskdmp.rim
|
||||
at mta0 out/pdp10-ka/sources.tape
|
||||
set mta mpx=7
|
||||
set mta type=b
|
||||
|
||||
@ -2,8 +2,15 @@ set build [pwd]/build
|
||||
set out "out/$env(EMULATOR)"
|
||||
set emulator_escape "\034"
|
||||
|
||||
proc start_salv {} {
|
||||
uplevel #0 {spawn ./tools/sims/BIN/pdp10-ka build/pdp10-ka/init}
|
||||
proc start_salv args {
|
||||
set ini ""
|
||||
if {[llength $args] == 1} {
|
||||
set ini [lindex $args 0]
|
||||
} {
|
||||
set ini "build/pdp10-ka/init"
|
||||
}
|
||||
set foo "spawn ./tools/sims/BIN/pdp10-ka $ini"
|
||||
uplevel #0 $foo
|
||||
setup_timeout
|
||||
respond "MAGDMP\r\n" "l\033ddt\r"
|
||||
respond "\n" "t\033salv bin\r"
|
||||
@ -42,6 +49,11 @@ proc create_tape {file} {
|
||||
}
|
||||
}
|
||||
|
||||
proc punch_tape {file} {
|
||||
respond "sim>" "at ptp $file\r"
|
||||
respond "sim>" "c\r"
|
||||
}
|
||||
|
||||
proc quit_emulator {} {
|
||||
respond "sim>" "q\r"
|
||||
expect eof
|
||||
|
||||
21
build/pdp10-ka/init2
Normal file
21
build/pdp10-ka/init2
Normal file
@ -0,0 +1,21 @@
|
||||
set console wru=034
|
||||
set cpu its
|
||||
set cpu 512k
|
||||
set rpa dis
|
||||
set rpb dis
|
||||
set tua dis
|
||||
set fha dis
|
||||
set dpb dis
|
||||
set lpt dis
|
||||
set cr dis
|
||||
set dc disable
|
||||
set dtc dis
|
||||
set dk dis
|
||||
at mta0 out/pdp10-ka/magdmp2.tap
|
||||
at mta5 out/pdp10-ka/reboot.tape
|
||||
at dpa0 out/pdp10-ka/rp03.2
|
||||
at dpa1 out/pdp10-ka/rp03.3
|
||||
at dpa2 out/pdp10-ka/rp03.0
|
||||
at dpa3 out/pdp10-ka/rp03.1
|
||||
set dpa headers
|
||||
b mta0
|
||||
@ -40,7 +40,7 @@ set imp ip=192.168.2.101/24
|
||||
set imp gw=172.31.1.100
|
||||
set imp host=10.3.0.6
|
||||
at imp tap:tap0
|
||||
at ptr bin/ka10/boot/dskdmp.rim
|
||||
at ptr out/pdp10-ka/dskdmp.rim
|
||||
at dpa0 out/pdp10-ka/rp03.2
|
||||
at dpa1 out/pdp10-ka/rp03.3
|
||||
at dpa2 out/pdp10-ka/rp03.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user