;======================================================
; SEL32 System Engineering Labs 32 bit computer
; MPX - Ver 3.4 hardware configuration
; CPU - 32/67 8M Sel32 Concept/32
; IOP - 7e00 Model 8001 IOP Processor Controller
; MFP - 7600 Model 8002 Multi Function Processor
; SBA - 7600 MFP SCSI Disk Controller
;            sba0 SD300 Model 8828 300MB MHD
;            sba0 <-> dsk/mpx3xsba0.dsk
; SBA - 7640 MFP SCSI Disk Controller
;            sbb0 SD300 Model 8828 300MB MHD
;            sbb0 <-> dsk/mpx3xsbb0.dsk
; LPR - 7ef8/7ef9 Model 924X High Speed Line Printer
; COM - 7ec0 8512 8-line async communications
; CON - 7efc/7efd Console Terminal
; RTC - 7f06 60 HZ Real-Time clock
; ITM - 7f04 38.4MS Interval timer
; MT  - 1000 8051 Buffered Tape Processor
;            mta0 <- tapes/mpxsdt69.tap
; EC  - 0e00 Model 8516 Ethernet (not supported)
;======================================================
; Set HOST simulator
set env HOST=sel32
; Set local IP address
; set env IP=192.168.1.5 (N/U)
;======================================================
; Set directory for disk images
mkdir dsk
mkdir tapes
; Set tape image filename
set env FILE=mpxsdt69.tap
; Set github.com URL for downloading files
set env GITURL=https://github.com/AZBevier/SEL32-installs/raw/main/tapes/
if exist "tapes/%FILE%" goto exists
if not exist "tapes/%FILE%" echof "file %FILE% missing, trying %FILE%.tgz"
cd tapes
if exist "%FILE%.tgz" goto nocurl
echof "fetching %FILE%.tgz file from github.com\n"
curl -LJO %GITURL%/%FILE%.tgz
if not exist "%FILE%.tgz" echof "FAILED - file %FILE% not available"; exit 1
:nocurl
echof "untar %FILE%.tgz file\n"
tar -xzf %FILE%.tgz
cd ..
:exists
echof "file %FILE% present, doing install"
;
; Set directory for disk
mkdir dsk
; Set debug output
; set debug -n sel.log
;
; CPU type and memory size
set CPU 32/67 8M
;set CPU 32/97 8M
;
; RTC realtime clock at 7f06
set RTC 60
set RTC enable
;
; ITM interval timer at 7f04
set ITM 3840
;
; IOP at channel 7e00
set iop enable
set iop0 dev=7e00
;
; MFP at channel 7600
set mfp enable
set mfp0 dev=7600
;
; COM 8-Line at 7ec0
set coml enable
set coml0 dev=7ec0
set coml0 enable
set coml1 enable
set coml2 enable
set coml3 enable
set coml4 enable
set coml5 enable
set coml6 enable
set coml7 enable
;
; Enable telnet sessions on port 4747
set comc enable
at comc 4747
;
; LPR0 at 7ef8
set lpr enable
; LPR output file
;at lpr lprout
;
; EC ethernet at 0e00
; Support not available yet
;set ec enable
;set ec mode=2
;set ec0 dev=0e00
;at ec tap:tap0
; set mac address to cause ec to be attached
;set ec MAC=08:00:5D:01:01:20
;
; CON Console at 7efc
set con enable
set con0 dev=7efc
;
; MTA Buffered tape processor at 1000
set mta enable
set mta0 dev=1000
; Attach install sdt tape file
set mta0 locked
at mta0 tapes/mpxsdt69.tap
;
; SBA MFP SCSI buss 1 disk processor at 7600
set sba enable
; set disk chan to 7600
set sba0 dev=7600
set sba0 type=SD300
; Attach diskfile
at sba0 -i dsk/mpx3xsba0.dsk
;
; SBB MFP SCSI buss 2 disk processor at 7640
set sbb enable
set sbb0 dev=7640
set sbb0 type=SD300
; Attach diskfile
at sbb0 -i dsk/mpx3xsbb0.dsk
;
; set console switches
deposit CSW 0
;
; allow cpu idle
set cpu idle
;
; wait for expected output from simulator, then enter this text
expect "ENTER" send " %DATE_MM%/%DATE_DD%/%DATE_YY%,%TIME_HH%:%TIME_MM%:%TIME_SS%\r"; continue
expect "FMT>" send "INITIALIZE DEVICE=DM7600 DEST=Y DISC=DM0300 CON=N\r"; continue
expect "FMT>" send "FORMAT DEVICE=DM7600 VOLUME=SYSTEM MAXRES=7000 CON=N\r"; continue
expect "ENTER SYSTEM VOLUME CHANNEL AND SUBADDRESS: " send "7600\r"; continue
expect "VOL>" send "CREATE D SYSTEM ENTRIES=2000\r"; continue
; restore system
expect "VOL>" send "RESTORE VOL=SYSTEM\r"; continue
; restore object, object_e, oldobj
expect "VOL>" send "RESTORE VOL=SYSTEM\r"; continue
; restore bin, doc, nblib, sample
expect "VOL>" send "RESTORE VOL=SYSTEM\r"; continue
expect "VOL>" send "REWIND\r"; continue
expect "VOL>" send "EXIT\r"; continue
; initialize 2nd disk
;expect "SYSTEM READY... PRESS ATTENTION FOR TSM..." send "@@A"; continue
expect "SYSTEM READY... PRESS ATTENTION FOR TSM..." send after=500000 delay=6000 "HIT @@A"; continue
;expect "" send after=1500000, delay=4000, " HIT @@A"; continue
expect "ENTER YOUR OWNERNAME:" send "SYSTEM\r"; continue
expect "TSM>" send "WHO\r"; continue
expect "TSM>" send "@SYSTEM(SYSTEM)J.VFMT\r"; continue
expect "FMT>" send "INITIALIZE DEV=DM7640 DES=Y DIS=DM0300 CON=N\r"; continue
expect "FMT>" send "FORMAT DEV=DM7640 VOL=WORK MAXRE=7000 CON=N\r"; continue
expect "TSM>" send "MOUNT WORK ON DM7640 OPTI=PUBLIC\r"; continue
expect "TSM>" send "VOLMGR\r"; continue
expect "VOL>" send "CREATE D @WORK^SYSTEM ENTRIES=1000\r"; continue
expect "VOL>" send "EXIT\r"; continue
expect "TSM>" send "!STAT VOL\r"; continue
;;expect "TSM>" send "WHO\r"; continue
expect "TSM>" send "EXIT\r"; continue
expect "RING IN FOR SERVICE" send "\r^E"
; Boot from mag tape
bo mta0
det all
quit
