commit | afb5d6277d8d1ab4052543e1963bb8a052b1f800 | [log] [download] |
---|---|---|
author | Mark Pizzolato <mark@infocomm.com> | Mon Dec 22 05:48:13 2014 -0800 |
committer | Mark Pizzolato <mark@infocomm.com> | Mon Dec 22 05:48:13 2014 -0800 |
tree | f1a117c1787f1f900f5c8294c4fb2603dce8f77e | |
parent | d5f02124f191a27b2e0cfbc53e4316cea1086351 [diff] |
TAPE: Extensive cleanup of tape operations (gap, end of medium, format change, etc.) from Dave Bryan 256. ENHANCEMENT: Add tape runaway support to the simulator tape library. OBSERVATION: The ANSI specifications for NRZI, PE, and GCR tape recording mandate a maximum length of 25 feet for erase gaps. Currently, an erase gap of any length is ignored when reading or spacing. To allow detection of non-compliant tape images, the simulator tape library is enhanced to halt positioning and return tape runaway status if a gap of 25 feet or more is encountered. Runaway detection is enabled by calling the tape library to set the tape density in bits per inch. If this call is not made, erase gaps present in a tape image are effectively ignored. Also, with the addition of a separate "set density" call, it is no longer necessary to supply the density when writing erase gaps. RESOLUTION: Modify "sim_tape_rdlntf" and "sim_tape_rdlntr" (sim_tape.c) to detect tape runaway, and add a new MTSE_RUNAWAY status to sim_tape.h. Add new "sim_tape_set_dens" and "sim_tape_show_dens" functions to set and show the bits per inch for a unit, respectively, and eliminate the "bpi" parameter to "sim_tape_wrgap" in preference to using the density established by a previous "sim_tape_set_dens" call. Add named constants to "sim_tape.h" that specify the density. 257. ENHANCEMENT: Improve performance when reading or spacing over erase gaps. OBSERVATION: Performance when reading or spacing over erase gaps is poor, especially in the reverse direction. Currently, each 4-byte gap marker is read individually, and in the reverse direction, each read is preceded by a seek to move the file pointer backward. This combination causes stream cache invalidation and a physical disc access for each gap marker. As a single gap consists of over 1000 markers, performance is far worse than if a gap was read as a block. RESOLUTION: Modify "sim_tape_rdlntf" and "sim_tape_rdlntr" (sim_tape.c) to buffer reads of gap markers. Using a 128-element buffer, performance improves about thirty-fold. 258. PROBLEM: Writing an end-of-medium positions the tape image after the mark. OBSERVATION: The "sim_tape_wreom" simulator tape library function writes an end-of-medium marker on the tape image. The intent is to erase the remainder of the tape. The "SIMH Magtape Representation and Handling" document states that the tape position is not updated by this function. However, the function leaves the tape positioned after the marker. A subsequent read would stop at the EOM marker. However, writing a new marker over that one would then allow reading of the data following the EOM that supposedly had been erased by the original "sim_tape_wreom" call. CAUSE: The tape position is updated by the internal "sim_tape_wrdata" call that is used to write the EOM marker, but it is not reset afterward by the function. RESOLUTION: Modify "sim_tape_wreom" (sim_tape.c) to reset the tape position to point at the EOM marker before returning. This prevents reading past an EOM marker, and a subsequent write will overwrite the marker rather than embed it between data records. 259. PROBLEM: Reading through an erase gap in reverse may return EOM status. OBSERVATION: A reverse read or spacing operation through an erase gap may return end-of-medium status. Reading or spacing forward through the same gap works properly. CAUSE: Writing an erase gap over existing records may produce a gap that is longer than requested. This occurs when truncating the last record to be overlaid by the gap would leave a record that is shorter than the minimum size allowed (eight bytes for the length words plus two bytes for the data). In this case, the gap is lengthened to overlay the entire record. If the new gap size is not evenly divisible by four, a half-gap is metadata marker of value 0xFFFF added to the beginning of the gap. If a gap that begins with a half-gap marker is written immediately after a previous gap, the "seam" between gaps will contain the bytes FE FF FF FF ( FF FF ) FE FF FF FF.... Reading forward across this seam will yield a metadata value of 0xFFFEFFFF, which is recognized and handled by seeking two bytes back to resynchronize reading. However, reading in reverse will yield the value 0xFFFFFFFF, which is interpreted as end-of-medium. RESOLUTION: Modify "sim_tape_rdlntr" (sim_tape.c) to recognize 0xFFFFFFFF as a half-gap marker and resynchronize in response. End of medium cannot occur when reading in reverse, as it is impossible to position the tape image beyond an EOM marker. Therefore, any 0xFFFFFFFF value encountered must be a half-gap "seam" originating as above. 260. PROBLEM: sim_tape_wrgap fails when format is changed from SIMH format. OBSERVATION: The HP 2100 magnetic tape simulator supports erase gaps and calls sim_tape_wrgap when commanded to write a gap. However, if a tape format other than SIMH format is selected, the call fails with MTSE_FMT. CAUSE: Erase gaps are not supported in formats other than SIMH, but the call should not fail. Instead, the call should be a "no-operation" if the underlying format does not support gaps. RESOLUTION: Modify "sim_tape_wrgap" (sim_tape.c) to return MTSE_OK with no action performed if a tape format other than SIMH is selected. 261. PROBLEM: The magnetic tape format of an attached unit may be changed. OBSERVATION: The magnetic tape library supports several tape image formats. The format to use may be specified either by an "ATTACH -F" command or by a "SET <unit> FORMAT" command. The latter calls the "sim_tape_set_fmt" function, which allows the format of a file currently attached to be changed. However, the format is an intrinsic property of the tape image file, so changing it once the file has been attached makes no sense. CAUSE: Oversight. RESOLUTION: Modify "sim_tape_set_fmt" (sim_tape.c) to return an error (SCPE_ALATT, "Unit already attached") if the unit is attached.
VAX/11 730 VAX/11 750 VAX 8600/8650 MicroVAX I & VAXStation I MicroVAX II & VAXStation II rtVAX 1000 (or Industrial VAX 620)
A new capability has been added which allows a TELNET Connection to a user designated port so that some out of band commands can be entered to manipulate and/or adjust a running simulator. The commands which enable and control this capability are SET REMOTE TELNET=port, SET REMOTE CONNECTIONS=n, SET REMOTE TIMEOUT=seconds, and SHOW REMOTE.
The remote console facility has two modes of operation: 1) single command mode. and 2) multiple command mode.
In single command mode you enter one command at a time and aren‘t concerned about what the simulated system is doing while you enter that command. The command is executed once you’ve hit return. In multiple command mode you initiate your activities by entering the WRU character (usually ^E). This will suspend the current simulator execution. You then enter commands as needed and when you are done you enter a CONTINUE command. While entering Multiple Command commands, if you fail to enter a complete command before the timeout (specified by “SET REMOTE TIMEOUT=seconds”), a CONTINUE command is automatically processed and simulation proceeds.
A subset of normal simh commands are available for use in remote console sessions. The Single Command Mode commands are: ATTACH, DETACH, PWD, SHOW, DIR, LS, ECHO, HELP The Multiple Command Mode commands are: EXAMINE, IEXAMINE, DEPOSIT, EVALUATE, ATTACH, DETACH, ASSIGN, DEASSIGN, STEP, CONTINUE, PWD, SAVE, SET, SHOW, DIR, LS, ECHO, HELP
A remote console session will close when an EOF character is entered (i.e. ^D or ^Z).
RQ has new disk types: RC25, RCF25, RA80 RQ device has a settable controller type (RQDX3, UDA50, KLESI, RUX50) RQ disks default to Autosize without regard to disk type RQ disks on PDP11 can have RAUSER size beyond 2GB DMC11/DMR11 DDCMP DECnet device simulation. Up to 8 DMC devices are supported. Packet transport is via TCP or UDP connections. KDP11 on PDP11 for DECnet DUP11 on PDP11 for DECnet connectivity to talk to DMC, KDP or other DUP devices DZ on Unibus systems can have up to 256 ports (default of 32), on Qbus systems 128 port limit (default of 16). DZ devices optionally support full modem control (and port speed settings when connected to serial ports). DHU11 (device VH) on Unibus systems now has 16 ports per multiplexer. XQ devices (DEQNA, DELQA and DELQA-T) are bootable on Qbus PDP11 simulators XQ and XU devices (DEQNA, DELQA, DELQA-T, DEUNA and DELQA) devices can now directly communicate to a remote device via UDP (i.e. a built-in HECnet bridge). MicroVAX 3900 and MicroVAX II have SET CPU AUTOBOOT option MicroVAX 3900 has a SET CPU MODEL=(MicroVAX|VAXServer) command to change between system types MicroVAX I has a SET CPU MODEL=(MicroVAX|VAXSTATION) command to change between system types MicroVAX II has a SET CPU MODEL=(MicroVAX|VAXSTATION) command to change between system types
KDP11 (from Timothe Litt) for DECnet connectivity to simulators with DMC, DUP or KDP devices DMR11 for DECnet connectivity to simulators with DMC, DUP or KDP devices on TOPS10.
Support for SDS internal ASCII character encoding during display and data entry. Allow breakpoints to be qualified by normal, monitor or user mode. Fix CPU, RAD, MUX and I/O bugs that prevented SDS Time Share System Monitor and Executive from executing properly.
Added support for TCP connections using IPv4 and/or IPv6. Logging - Traffic going out individual lines can be optionally logged to files Buffering - Traffic going to a multiplexor (or Console) line can optionally be buffered while a telnet session is not connected and the buffered contents will be sent out a newly connecting telnet session. This allows a user to review what may have happened before they connect to that session. Serial Port support based on work by J David Bryan and Holger Veit Serial Console Support Separate TCP listening ports per line Outgoing connections per line (virtual Null Modem cable). Packet sending and reception semantics for simulated network device support using either TCP or UDP transport.
* Disk and Tape I/O can be asynchronous. Asynchronous support exists for pdp11_rq, pdp11_rp and pdp11_tq devices (used by VAX and PDP11 simulators). * Multiplexer I/O (Telnet and/or Serial) can be asynchronous. Asynchronous support exists for console I/O and most multiplexer devices. (Still experimental - not currently by default)
RAW Disk Access (including CDROM) Virtual Disk Container files, including differincing disks
Simulators which have boot commands which load constant files as part of booting have those files imbedded into the simulator executable. The imbedded files are used if the normal boot file isn't found when the simulator boots. Specific examples are: VAX (MicroVAX 3900 - ka655x.bin), VAX8600 (VAX 8600 - vmb.exe), VAX780 (VAX 11/780 - vmb.exe), VAX750 (VAX 11/750 - vmb.exe), VAX730 (VAX 11/730 - vmb.exe), VAX610 (MicroVAX I - ka610.bin), VAX620 (rtVAX 1000 - ka620.bin), VAX630 (MicroVAX II - ka630.bin)
The following extensions to the SCP command language without affecting prior behavior:
GOTO <Label> Command is now available. Labels are lines in which the first non whitespace character is a ":". The target of a goto is the first matching label in the current do command file which is encountered. Since labels don't do anything else besides being the targets of goto's, they could be used to provide comments in do command files, for example (":: This is a comment") SET ON Enables error trapping for currently defined traps (by ON commands) SET NOON Disables error trapping for currently defined traps (by ON commands) RETURN Return from the current do command file execution with the status from the last executed command RETURN <statusvalue> Return from the current do command file execution with the indicated status. Status can be a number or a SCPE_<conditionname> name string. ON <statusvalue> commandtoprocess{; additionalcommandtoprocess} Sets the action(s) to take when the specific error status is returned by a command in the currently running do command file. Multiple actions can be specified with each delimited by a semicolon character (just like breakpoint action commands). ON ERROR commandtoprocess{; additionalcommandtoprocess} Sets the default action(s) to take when any otherwise unspecified error status is returned by a command in the currently running do command file. Multiple actions can be specified with each delimited by a semicolon character (just like breakpoint action commands). ON <statusvalue> ON ERROR Clears the default actions to take when any otherwise unspecified error status is returned by a command in the currently running do command file.
Error traps can be taken for any command which returns a status other than SCPE_STEP, SCPE_OK, and SCPE_EXIT.
ON Traps can specify any status value from the following list: NXM, UNATT, IOERR, CSUM, FMT, NOATT, OPENERR, MEM, ARG, STEP, UNK, RO, INCOMP, STOP, TTIERR, TTOERR, EOF, REL, NOPARAM, ALATT, TIMER, SIGERR, TTYERR, SUB, NOFNC, UDIS, NORO, INVSW, MISVAL, 2FARG, 2MARG, NXDEV, NXUN, NXREG, NXPAR, NEST, IERR, MTRLNT, LOST, TTMO, STALL, AFAIL. These values can be indicated by name or by their internal numeric value (not recommended).
Interactions with ASSERT command and “DO -e”: DO -e is equivalent to SET ON, which by itself it equivalent to “SET ON; ON ERROR RETURN”. ASSERT failure have several different actions: If error trapping is not enabled then AFAIL causes exit from the current do command file. If error trapping is enabled and an explicit “ON AFAIL” action is defined, then the specified action is performed. If error trapping is enabled and no “ON AFAIL” action is defined, then an AFAIL causes exit from the current do command file.
Other related changes/extensions: The “!” command (execute a command on the local OS), now returns the command's exit status as the status from the “!” command. This allows ON conditions to handle error status responses from OS commands and act as desired.
The EXPECT command now exists to provide a means of reacting to simulator output and the SEND command exists to inject data into programs running within a simulator.
EXPECT {HALTAFTER=n,}"\r\nPassword: " SEND {AFTER=n,}{DELAY=m,}"mypassword\r" or EXPECT {HALTAFTER=n,}"\r\nPassword: " SEND {AFTER=n,}{DELAY=m,}"mypassword\r"; GO
HELP dev HELP dev ATTACH HELP dev SET (aka HELP SET dev) HELP dev SHOW (aka HELP SHOW dev) HELP dev REGISTERS
SET ENVIRONMENT Name=Value Set Environment variable SET ASYNCH Enable Asynchronous I/O SET NOASYNCH Disable Asynchronous I/O SET VERIFY Enable commang display while processing DO command files SET NOVERIFY Enable commang display while processing DO command files SET MESSAGE Enable error message output when commands complete (default) SET NOMESSAGE Disable error message output when commands complete SET QUIET Set minimal output mode for command execution SET NOQUIET Set normal output mode for command execution SET PROMPT Change the prompt used by the simulator (defaulr sim>) SET THROTTLE x/t Throttle t ms every x cycles SET REMOTE TELNET=port Specify remote console telnet port SET REMOTE NOTELNET Disables remote console SET REMOTE CONNECTIONS=n Specify the number of concurrent remote console sessions SHOW FEATURES Displays the devices descriptions and features SHOW ASYNCH Display the current Asynchronous I/O status SHOW SERIAL Display the available and/or open serial ports SHOW ETHERNET Display the available and/or open ethernet connections SHOW MULTIPLEXER Display the details about open multiplexer devices SHOW CLOCKS Display the details about calibrated timers SHOW REMOTE Display the remote console configuration SHOW ON Display ON condition dispatch actions SET ON Enable ON condition error dispatching SET NOON Disable ON condition error dispatching GOTO Transfer to lable in the current DO command file CALL Call subroutine at indicated label RETURN Return from subroutine call SHIFT Slide argument parameters %1 thru %9 left 1 NOOP A no-op command ON Establish or cancel an ON condition dispatch IF Test some simulator state and conditionally execute commands CD Change working directory SET DEFAULT Change working directory PWD Show working directory SHOW DEFAULT Show working directory DIR {path|file} Display file listing LS {path|file} Display file listing NEXT Step across a subroutine call or step a single instruction. EXPECT React to output produced by a simulated system SEND Inject input to a simulated system's console
Built In variables %DATE%, %TIME%, %DATETIME%, %LDATE%, %LTIME%, %CTIME%, %DATE_YYYY%, %DATE_YY%, %DATE_YC%, %DATE_MM%, %DATE_DD%, %DATE_D%, %DATE_WYYYY%, %DATE_WW%, %TIME_HH%, %TIME_MM%, %TIME_SS%, %STATUS%, %TSTATUS%, %SIM_VERIFY%, %SIM_QUIET%, %SIM_MESSAGE% Command Aliases
Token “%0” expands to the command file name. Token %n (n being a single digit) expands to the n'th argument Tonen %* expands to the whole set of arguments (%1 ... %9)
The input sequence “%” represents a literal “%”, and “\” represents a literal "". All other character combinations are rendered literally.
Omitted parameters result in null-string substitutions.
A Tokens preceeded and followed by % characters are expanded as environment variables, and if one isn't found then can be one of several special variables:
%DATE% yyyy-mm-dd %TIME% hh:mm:ss %DATETIME% yyyy-mm-ddThh:mm:ss %LDATE% mm/dd/yy (Locale Formatted) %LTIME% hh:mm:ss am/pm (Locale Formatted) %CTIME% Www Mmm dd hh:mm:ss yyyy (Locale Formatted) %DATE_YYYY% yyyy (0000-9999) %DATE_YY% yy (00-99) %DATE_MM% mm (01-12) %DATE_DD% dd (01-31) %DATE_WW% ww (01-53) ISO 8601 week number %DATE_WYYYY% yyyy (0000-9999) ISO 8601 week year number %DATE_D% d (1-7) ISO 8601 day of week %DATE_JJJ% jjj (001-366) day of year %TIME_HH% hh (00-23) %TIME_MM% mm (00-59) %TIME_SS% ss (00-59) %STATUS% Status value from the last command executed %TSTATUS% The text form of the last status value %SIM_VERIFY% The Verify/Verbose mode of the current Do command file %SIM_VERBOSE% The Verify/Verbose mode of the current Do command file %SIM_QUIET% The Quiet mode of the current Do command file %SIM_MESSAGE% The message display status of the current Do command file
Environment variable lookups are done first with the precise name between the % characters and if that fails, then the name between the % characters is upcased and a lookup of that valus is attempted.
The first Space delimited token on the line is extracted in uppercase and then looked up as an environment variable. If found it the value is supstituted for the original string before expanding everything else. If it is not found, then the original beginning token on the line is left untouched.
commands can be aliases with environment variables. For example:
sim> set env say=echo sim> say Hello there Hello there
The SHIFT command will shift the %1 thru %9 arguments to the left one position.
Simulators for the Windows platform are built and made available on a regular basis (at least once a week if changes have been made to the codebase).
The prebuilt Windows binaries will run on all versions of Microsoft Windows from Windows XP onward.
They can be accessed at https://github.com/simh/Win32-Development-Binaries
Several relatively recent versions should be available which you can download and use directly.
First download the latest source code from the github repository's master branch at https://github.com/simh/simh/archive/master.zip
Depending on your host platform one of the following steps should be followed:
If you are interested in using a simulator with Ethernet networking support (i.e. one of the VAX simulators or the PDP11), then you should make sure you have the correct networking components available. The instructions in https://github.com/simh/simh/blob/master/0readme_ethernet.txt describe the required steps to get ethernet networking components installed and how to configure your environment.
See the 0readme_ethernet.txt file for details about the required network components for your platform. Once your operating system has the correct networking components available the following command will build working simulators:
$ make {simulator-name (i.e. vax)}
Compiling on windows is supported with recent versions of Microsoft Visual Studio (Standard or Express) and using GCC via the MinGW environment. Things may also work under Cygwin, but that is not the preferred windows environment. Not all features will be available as well as with either Visual Studio or MinGW.
The file https://github.com/simh/simh/blob/master/Visual%20Studio%20Projects/0ReadMe_Projects.txt describes the required steps to use the setup your environment to build using Visual Studio.
The file https://github.com/simh/simh/blob/master/Visual%20Studio%20Projects/0ReadMe_Projects.txt describes the required steps to use the setup your environment to build using MinGW.
Download the latest source code as a zip file from: https://github.com/simh/simh/archive/master.zip
Unzip it in the directory that you want SIMH to reside in. Unpack it and set the file attributes as follows:
$ unzip simh-master.zip $ set default [.simh-master] $ set file/attri=RFM:STM makefile,*.mms,[...]*.c,[...]*.h,[...]*.txt
Simulators with ethernet network devices (All the VAX simulators and the PDP11) can have functioning networking when running on Alpha or IA64 OpenVMS.
In order to build and run simulators with networking support, the VMS-PCAP package must be available while building your simulator. The simh-vms-pcap.zip file can be downloaded from https://github.com/simh/simh/archive/vms-pcap.zip
This link will return a file called simh-vms-pcap.zip which should be unpacked as follows:
$ unzip -aa simh-vms-pcap.zip $ rename [.simh-vms-pcap]pcap-vms.dir []
The PCAP-VMS components are presumed (by the descript.mms file) to be located in a directory at the same level as the directory containing the simh source files. For example, if these exist here:
[]descrip.mms []scp.c etc.
Then the following should exist: [-.PCAP-VMS]BUILD_ALL.COM [-.PCAP-VMS.PCAP-VCI] [-.PCAP-VMS.PCAPVCM] etc.
To build simulators:
On a VAX use:
$ MMx
On a Alpha & IA64 hosts use:
$ MMx ! With Ethernet support $ MMx/MACRO=(NONETWORK=1) ! Without Ethernet support
UNZIP can be found on the VMS freeware CDs, or from www.info-zip.org MMS (Module Management System) can be licensed from HP/Compaq/Digital as part of the VMS Hobbyist program (it is a component of the DECSET product). MMK can be found on the VMS freeware CDs, or from http://www.kednos.com/kednos/Open_Source/MMK DEC C can be licensed from HP/Compaq/Digital as part of the VMS Hobbyist program.
If you find problems or have suggestions relating to any simulator or the simh package as a whole, please report these using the github “Issue” interface at https://github.com/simh/simh/issues.
Problem reports should contain;