Hi Bryan

You need to install simh v4 from source on GitHub.

Go to https://github.com/simh/simh <https://github.com/simh/simh>

Download a source zip file using the download button on your host (or download 
and transfer to host as necessary)

unzip the source into a directory on your host.

you will need gcc and dev-tools on your host for the next bits:

cd simh (the director you unzipped simh into)
make pdp11

once done, the new binary is at simh/BIN/pdp11

You should now be able to execute pdp11 and use the new script commands.

Quentin

> On 18 Jan 2018, at 16:51, Bryan Davies <[email protected]> wrote:
> 
> Thanks.  I just tried sudo apt-get install simh and it tells me that I am on 
> the latest version (3.8.1-5) .  Is there a newer one, and if so how do I 
> install it?
> 
> On 18 January 2018 at 16:47, Quentin North <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi Bryan
> 
> You need to be on the latest SIMH for expect/send to work within SIMH 
> scripts. Below is an example of how it can be used to boot an HP Access 
> system, which has two processors that need to communicate with each other and 
> it sets the date an time during the boot. Look in particular at the lines 
> that say things like 'go until “EXPRESSION”’ and 'reply “REPLY"'. Hat tip to 
> David Bryan for this script.
> 
> ;              2000 Access System Processor Execution Command File
> ;
> ;
> ; This command file loads the 2000 Access operating system into the System
> ; Processor.  It is invoked as follows:
> ;
> ;    hp2100 sp <cpu>
> ;
> ; ...where <cpu> is "2100" or one of "21MX/21MX-E/1000-M/1000-E".
> ;
> ; As part of the system startup process, this file loads and runs the IOP 
> using
> ; the "iop.sim" command file.  It also uses the "sleep" external command to
> ; provide proper synchronization.
> ; 
> ; The <cpu> parameter determines both the CPU setting and the IOP tape used to
> ; load the I/O Processor.  If "2100" is specified, then the 2100 CPU and 2100
> ; IOP tape are used.  If anything else is specified, then the 21MX IOP tape is
> ; used, and the CPU is set to the parameter verbatim.
> ; 
> ; This file boots the system stored on the "ACCESS-<cpu>.7905.disc" image.
> 
> 
> ; Validate the processor parameter.
> 
> if "%1" == "" echo Must specify the processor parameter.
> if "%1" == "" exit
> 
> 
> ; Ensure that we can pick up the executable path.
> 
> if "%SIM_BIN_PATH%" == "" echo Must use a newer simulator version (10/25/17 
> or later).
> if "%SIM_BIN_PATH%" == "" exit
> 
> 
> ; Capture the operating system console log.
> 
> set -n console log=sp-%1.log
> 
> 
> ; Output the usage notes.
> ; 
> ; The Telnet standard requires CR to be followed by LF or NUL.  The QCTerm
> ; terminal emulator does not comply with this requirement; with AUTO LF turned
> ; off, it sends just a CR.  SIMH complies with the standard and discards a LF 
> or
> ; NULL following a CR, but this means that the TSB speed-sense input of CR LF
> ; (or CTRL+M CTRL+J) won't work.  The workaround is to do CR LF LF or turn 
> AUTO
> ; LF on, press ENTER, and then turn it off again (QCTerm sends CR NUL LF when
> ; AUTO LF is on).
> 
> echo
> echo
> echo The A001 password is "A001".
> echo For QCTerm sessions, type "CR LF LF" for PLEASE LOG IN.
> echo
> echo
> 
> 
> ; Configure the CPU.
> 
> if "%1" == "2100" set CPU %1,32K,FP
> if "%1" != "2100" set CPU %1,32K
> 
> 
> ; Configure the I/O card cage.
> 
> set IPLI SC=10
> set TTY  SC=12
> set TBG  SC=13
> set DS   SC=14
> set MSD  SC=16
> 
> 
> ; Configure the simulation environment.
> 
> set IPLI ENABLED
> 
> set PTR  DISABLED
> set PTP  DISABLED
> set LPT  DISABLED
> set BACI DISABLED
> set MPX  DISABLED
> set DPD  DISABLED
> set DRD  DISABLED
> set MTD  DISABLED
> set PIF  DISABLED
> 
> set DS0 7905
> set MSC 13183
> 
> if "%SIM_MAJOR%" == "3" break after=50000
> if "%SIM_MAJOR%" != "3" expect haltafter=50000; set env reply=send
> 
> 
> ; Connect the Processor Interconnect cables.
> 
> attach -L IPLI 4020
> attach -L IPLO 4021
> 
> 
> ; Load and start the IOP.
> ;
> ; Attach the configured tape for the specified processor.
> 
> if "%1" == "2100" attach -E MSC0 IOPGEN-2100.tape
> if "%1" != "2100" attach -E MSC0 IOPGEN-21MX.tape
> 
> 
> ; Load the IOP cross-loader.
> 
> boot MSC0
> 
> assert T=102077
> 
> 
> ; Start the IOP cross-loader.
> 
> deposit P 002000
> go until "START IOP PROTECTED LOADER.  PRESS RETURN "
> 
> echo
> 
> 
> ; Start the IOP to receive the program.
> ;
> ; The IOP command file is run with the -E switch to cause execution to 
> continue
> ; after errors.  An "I/O Error" occurs when the SP exits and the IPL 
> connection
> ; is broken.  We want the command file to continue to exit the IOP instance
> ; automatically.
> 
> if "%SIM_MAJOR%" == "3" ! %SIM_BIN_PATH% -E ciop %1 &
> if "%SIM_MAJOR%" != "3" ! %SIM_BIN_PATH%    ciop %1 &
> 
> 
> ;; Connect the Processor Interconnect cables.
> ;
> ;attach -L  IPLI 4020
> ;attach -LW IPLO 4021
> 
> 
> ; Wait for the IOP.
> 
> echo Waiting for the IOP...
> set ipli wait
> echo Wait complete.
> 
> 
> ; Reply to "START IOP PROTECTED LOADER.  PRESS RETURN "
> ;
> ; Expect a halt 102077 when the IOP has been loaded.
> 
> reply "\r"
> go
> 
> assert T=102077
> 
> 
> ; Wait for the IOP to start and initialize.
> 
> echo Waiting for the IOP...
> set ipli wait
> echo Wait complete.
> 
> 
> ; The IOP is now up and running.
> ;
> ;; We must delay here to allow the IOP time to initialize before staring the 
> SP.
> ;
> ; ! sleep 1
> 
> 
> ; Attach the TSB system disc.
> 
> attach -E DS0 SPGEN-%1.7905.disc
> 
> 
> ; If the IOP is tracing, it will start up more slowly than otherwise.  The IOP
> ; must initialize before the SP is started.  Therefore, the following "sleep"
> ; command is required only if IOP tracing is enabled.
> 
> ; ! sleep 5
> 
> 
> ; Start a multiplexer terminal session (for convenience).
> 
> ; ! start E:\Simulation\QCTerm\qcterm.exe F:\Simulation\HP 700\Config\mux.qct
> 
> 
> ; Boot the system from the disc.
> ;
> ; Expect halt 102077 for a successful load.
> 
> deposit S 000000
> boot DS0
> 
> assert T=102077
> 
> 
> ; Set up simulator tracing.
> ;
> ; set -n debug sp-trace.log
> ; set ipli debug
> ; set iplo debug
> 
> 
> ; Start the system.
> 
> ;set throttle 30%
> 
> go until "COMMANDS?" ; reply "NO\r"
> go until "DATE?"     ; reply "%DATE_JJJ%/%DATE_YY%\r"
> go until "TIME?"     ; reply "%TIME_HH%%TIME_MM%\r"
> 
> 
> ; The system responds with "HP22687A-<datecode>".  The halt delay is enough
> ; to permit the datecode and trailing CR LF to be output before the simulator
> ; stops.  This means that we do not need to match the datecode explicitly.
> ;
> ; Now SLEEP the system.
> ;
> ; Expect halt 102077 for successful system shutdown.
> 
> ; go until "\r\n"                    ; reply "SLEEP\r"
> ; go until "SYSTEM DUMP OR RELOAD? " ; reply "NO\r"
> 
> go
> 
> ; assert T=102077
> 
> exit
> 
> 
> 
>> On 18 Jan 2018, at 15:40, Bryan Davies <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Many thanks to all for the advice.   Unfortunately I'm still not quite there.
>> 
>> I have written an Expect script which runs Simh and sure enough responds to 
>> the startup prompts.  Unfortunately after it completes the terminal isn't 
>> interactive anymore.  Oddly it still echoes characters to the screen but 
>> with no response - either from RSTS or Rasbian.   If I open another 
>> Terminal, PS shows me the pdp11 emulator running as another process but tty1 
>> is stuck in bash.
>> 
>> I have included a fork and disconnect at the end of the script as suggested 
>> but to no effect.
>> 
>> Expect commands don't seem to work within Simh.  Should they?
>> 
>> 
>> On 18 January 2018 at 09:59, Bryan Davies <[email protected] 
>> <mailto:[email protected]>> wrote:
>> Hi,
>> 
>> I volunteer for a computer museum in Cambridge UK where we would much like 
>> to extend our mini-computer exhibit.   We want to set up a VT100 running 
>> RSTS/E for our visitors to use. As the system needs to start unattended I 
>> need it to boot up RSTS from power up.
>> 
>> I have installed Simh on a Raspberry Pi B and connected the VT100 to the 
>> serial port ttyAMA0.
>> 
>> While I can login to the Pi on the VT100 and boot the emulator manually, 
>> RSTS/E has a number of prompts within the boot dialogue (Date, Time etc) 
>> which need to be answered before it is possible for a User to login.  I have 
>> tried putting these responses in a Shell script, and while that 'works' 
>> insofar as the boot process completes, it doesn't return control to the 
>> terminal after the script ends.
>> 
>> Can anyone advise how to do it?
>> 
>> 
>> 
>> _______________________________________________
>> Simh mailing list
>> [email protected] <mailto:[email protected]>
>> http://mailman.trailing-edge.com/mailman/listinfo/simh 
>> <http://mailman.trailing-edge.com/mailman/listinfo/simh>
> 

_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to