Asynchronous clocks are now built for all simulators which are built with
SIM_ASYNCH_IO defined. The default behavior has asynchronous clocks
disabled since this is still experimental, but it can be enabled with
SET TIMER ASYNC.
Catchup clock ticks are now available, but since they're experimental,
they aren't enabled by default. Catchup ticks are only available if the
simulators clock device calls sim_rtcn_tick_ack to acknowledge processing
of clock ticks. The VAX simulators have been modified to leverage this.
Catchup clock ticks can be enabled with SET TIMER CATCHUP
Additionally, an idle threshold is provided which can be used to
influence when clock calibration may be suppressed. The default is not
to suppress calibration activities.
The various timer behaviors are visible with the SHOW TIMER command.
The state of the operating timer facilities is visible with: SHOW CLOCK
Timer events which are queued are visible with the SHOW QUEUE command.
Reworked all priority adjustment code to leverage a new
sim_os_set_thread_priority API which is coded to use pthreads or OS
priority adjustment APIs as necessary.
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.
Most simulators can now also be compiled with a C++ compiler without
warnings.
Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
If a TPC format tape image has garbage at the end of the image, but the
image contains multiple successive tape marks, then assume that logical
End Of Tape is immediately after the last successive tape marks.
OBSERVATION: Calling "sim_tape_rdrecf" to read a tape record sometimes
returns MTSE_EOM and sets the "position not updated" (PNU) flag, even when
an erase gap precedes the EOM. The correct response should be to return
MTSE_RUNAWAY to indicate that spacing over a gap did not end with a data
record or tape mark. Moreover, PNU should not be set, as the position has
been updated.
CAUSE: The routine attempts to handle this case by returning MTSE_RUNAWAY
if the EOF was detected while reading a buffer of gap markers. However, if
a buffer read ends immediately before an EOM marker or the physical EOF,
the next read attempt will return a zero buffer length. The routine
misinterprets this to mean that no gap was present and returns MTSE_EOM and
sets the PNU flag.
RESOLUTION: Modify "sim_tape_rdlntf" (sim_tape.c) to determine whether the
EOM marker or physical EOF was seen on the first or a subsequent buffer
read, and to return MTSE_EOM with PNU or MTSE_RUNAWAY without PNU,
respectively.
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.
- A -R flag is forced (attach READ ONLY) when TPC formatted tapes are attached. This should avoid updating file modified timestamps by any simh simulator.
- All write operations to TPC formatted tapes will fail with a write protected status.
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.
Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
- Added event debug support to scp and the vax simulator
- Moved external declarations into include files related to modules which define them and removed random externs from modules which referenced them
- Fixed typos in sim_ether
- Fixed sim_disk and sim_tape to properly manage asynchronous threads on an i/o flush
I’ve always wanted to have the option to have simulated devices behave
more naturally with respect to I/O operations. By more naturally I
mean that the current simulator model I/O is either polled (for asynchronous
things link Muxes and Network), or it is performed in the middle of some
instruction execution taking possibly many milliseconds (disk and/or tapes).
The existing model creates quite deterministic behavior which helps to debug
and understand issues, but it trades off potential instruction execution
while performing these I/O operations in between instruction execution.
To address this concept (while still retaining the potential advantages of
the original model), I’ve designed an Asynch I/O model extension for simh.
In order to flesh-out and debug this design, I’ve also refactored several
devices to utilize this capability. Please read the attached
0readmeAsynchIO.txt file for concept details about the approach.
In order to make disk devices easy to implement (within or without the
AsynchIO framework), I’ve created a sim_disk.c library which is modeled
on the sim_tape.c library to generalize disk I/O like tape I/O is
generalized in sim_tape.c. This sim_disk.c library now provides that
natural place to implement support for various disk implementation formats
(just like sim_tape support several formats, and one day will be the place
to add direct physical tape access). The current sim_disk library provides
the framework for direct support of 3 different disk formats:
1) standard simh disk format
2) platform specific physical disk access
and 3) platform independent Virtual Disk format.
The Virtual Disk format is an implementation of the format described in
the ”Microsoft Virtual Hard Disk (VHD) Image Format Specification”. The
VHD specification is available for anyone to implement under the "Microsoft
Open Specification Promise" described at
http://www.microsoft.com/interop/osp/default.mspx.
The VHD implementation includes support for:
1) Fixed sized disks
2) Dynamically expanding disks
and 3) Differencing Disks.
Dynamically expanding disks don’t change their “Virtual Size”, but they
don’t consume disk space on the containing storage until the virtual
sectors in the disk are actually written to (i.e. an RA81 or RA92 VHD
with a VMS installed on it may initially only contain 30+ MB of files,
and the resulting VHD will be 30+ MB). The VHD format contains meta data
which describes the virtual device. Amongst this meta data is the simh
device type which the VHD was originally created as. This metadata is
therefore available whenever that VHD is attached to an emulated disk
device in the future so the device type & size can be automatically be
configured.
Sim_disk_attach is used by device emulations to attach a simh/vhd/raw
device to a simulated device. The following simh command switches
are used by the sim_disk_attach API:
-R Attach Read Only.
-E Must Exist (if not specified an attempt to create the
indicated virtual disk will be attempted).
-F Open the indicated disk container in a specific format
(default is to autodetect VHD defaulting to simh if the
indicated container is not a VHD).
-X When creating a VHD, create a fixed sized VHD (vs a
Dynamically expanding one).
-C Create a VHD and copy its contents from another disk
(simh, VHD, or RAW format).
-D Create a Differencing VHD (relative to an already
existing VHD disk)
Examples:
sim> show rq
RQ, address=20001468-2000146B*, no vector, 4 units
RQ0, 159MB, not attached, write enabled, RD54, autosize, SIMH format
RQ1, 159MB, not attached, write enabled, RD54, autosize, SIMH format
RQ2, 159MB, not attached, write enabled, RD54, autosize, SIMH format
RQ3, 409KB, not attached, write enabled, RX50, autosize, SIMH format
sim> atta rq0 RA81.vhd
sim> show rq0
RQ0, 456MB, attached to RA81.vhd, write enabled, RA81, autosize, VHD format
sim> set rq2 ra92
sim> att rq2 -f vhd RA92.vhd
RQ2: creating new file
sim> sho rq2
RQ2, 1505MB, attached to RA92.vhd, write enabled, RA92, autosize, VHD format
sim> ! dir RA92.vhd
Volume in drive H is New Volume
Volume Serial Number is F8DE-510C
Directory of H:\Data
04/14/2011 12:57 PM 5,120 RA92.vhd
1 File(s) 5,120 bytes
0 Dir(s) 3,074,412,544 bytes free
sim> atta rq3 -c RA92-1.vhd RA92.vhd
sim> atta rq3 -c RA92-1.vhd RA92.vhd
RQ3: creating new virtual disk 'RA92-1.vhd'
RQ3: Copied 1505MB. 99% complete.
RQ3: Copied 1505MB. Done.
sim> sh rq3
RQ3, 1505MB, attached to RA92-1.vhd, write enabled, RA92, autosize, VHD format
sim> ! dir RA92*
Volume in drive H is New Volume
Volume Serial Number is F8DE-510C
Directory of H:\Data
04/14/2011 01:12 PM 5,120 RA92-1.vhd
04/14/2011 12:58 PM 5,120 RA92.vhd
2 File(s) 10,240 bytes
0 Dir(s) 3,074,404,352 bytes free
sim> sho rq2
RQ2, 1505MB, not attached, write enabled, RA92, autosize, VHD format
sim> set rq2 ra81
sim> set rq2 noauto
sim> sho rq2
RQ2, 456MB, not attached, write enabled, RA81, noautosize, VHD format
sim> set rq2 format=simh
sim> sho rq2
RQ2, 456MB, not attached, write enabled, RA81, noautosize, SIMH format
sim> atta rq2 -c RA81-Copy.vhd VMS055.dsk
RQ2: creating new virtual disk 'RA81-Copy.vhd'
RQ2: Copied 456MB. 99% complete.
RQ2: Copied 456MB. Done.
sim> sho rq2
RQ2, 456MB, attached to RA81-Copy.vhd, write enabled, RA81, noautosize, VHD format
sim> det rq2
sim> ! dir RA81-Copy.vhd
Volume in drive H is New Volume
Volume Serial Number is F8DE-510C
Directory of H:\Data
04/14/2011 01:22 PM 178,304,512 RA81-Copy.vhd
1 File(s) 178,304,512 bytes
0 Dir(s) 2,896,097,280 bytes free
sim> ! dir VMS055.dsk
Volume in drive H is New Volume
Volume Serial Number is F8DE-510C
Directory of H:\Data
03/08/2011 01:42 PM 403,663,872 VMS055.dsk
1 File(s) 403,663,872 bytes
0 Dir(s) 2,896,097,280 bytes free
sim>
The makefile now works for Linux and most Unix's. Howevr, for Solaris
and MacOS, you must first export the OSTYPE environment variable:
> export OSTYPE
> make
Otherwise, you will get build errors.
1. New Features
1.1 3.8-0
1.1.1 SCP and Libraries
- BREAK, NOBREAK, and SHOW BREAK with no argument will set, clear, and
show (respectively) a breakpoint at the current PC.
1.1.2 GRI
- Added support for the GRI-99 processor.
1.1.3 HP2100
- Added support for the BACI terminal interface.
- Added support for RTE OS/VMA/EMA, SIGNAL, VIS firmware extensions.
1.1.4 Nova
- Added support for 64KW memory (implemented in third-party CPU's).
1.1.5 PDP-11
- Added support for DC11, RC11, KE11A, KG11A.
- Added modem control support for DL11.
- Added ASCII character support for all 8b devices.
1.2 3.8-1
1.2.1 SCP and libraries
- Added capability to set line connection order for terminal multiplexers.
1.2.2 HP2100
- Added support for 12620A/12936A privileged interrupt fence.
- Added support for 12792C eight-channel asynchronous multiplexer.
2. Bugs Fixed
Please see the revision history on http://simh.trailing-edge.com or
in the source module sim_rev.h.
1. New Features
1.1 3.7-0
1.1.1 SCP
- Added SET THROTTLE and SET NOTHROTTLE commands to regulate simulator
execution rate and host resource utilization.
- Added idle support (based on work by Mark Pizzolato).
- Added -e to control error processing in nested DO commands (from
Dave Bryan).
1.1.2 HP2100
- Added Double Integer instructions, 1000-F CPU, and Floating Point
Processor (from Dave Bryan).
- Added 2114 and 2115 CPUs, 12607B and 12578A DMA controllers, and
21xx binary loader protection (from Dave Bryan).
1.1.3 Interdata
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state.
1.1.4 PDP-11
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state (WAIT instruction executed).
- Added TA11/TU60 cassette support.
1.1.5 PDP-8
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state (keyboard poll loop or jump-to-self).
- Added TA8E/TU60 cassette support.
1.1.6 PDP-1
- Added support for 16-channel sequence break system.
- Added support for PDP-1D extended features and timesharing clock.
- Added support for Type 630 data communications subsystem.
1.1.6 PDP-4/7/9/15
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state (keyboard poll loop or jump-to-self).
1.1.7 VAX, VAX780
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state (more than 200 cycles at IPL's 0, 1, or 3 in kernel mode).
1.1.8 PDP-10
- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
state (operating system dependent).
- Added CD20 (CD11) support.
2. Bugs Fixed
Please see the revision history on http://simh.trailing-edge.com or
in the source module sim_rev.h.
The save/restore format has been updated to improve its reliability.
As a result, save files prior to release 3.0 are no longer supported.
The text documentation files are obsolete and are no longer included
with the distribution. Up-to-date PDF documentation files are
available on the SimH web site.
1. New Features
1.1 3.6-0
1.1.1 Most magnetic tapes
- Added support for limiting tape capacity to a particular size in MB
1.1.2 IBM 7090/7094
- First release
1.1.3 VAX-11/780
- Added FLOAD command, loads system file from console floppy disk
1.1.4 VAX, VAX-11/780, and PDP-11
- Added card reader support (from John Dundas)
1.1.5 PDP-11
- Added instruction history
2. Bugs Fixed
Please see the revision history on http://simh.trailing-edge.com or
in the source module sim_rev.h.