Also:
- Added more statistics
- Made sleep measurements more precise
- Correct idle sleep decision logic without regard to host tick size
- Fix calibration setup/teardown when host tick size is large (>10ms)
- Generalized large host tick test capability (MS_MIN_GRANULARITY)
- Fixed Windows sim_os_msec() to always use timeGetTime()
- Fixed coschedule routines (that don't mentoin a tmr) to default to
timer 0 and fallback to the internal timer otherwise.
- Removed dependency on sizeof(tv_sec) in timespec structure for MinGW
As reported by Josh Dersch in #358
Read hardware notes:
- While the TCCM error bit is a real flop, it is supposed to reflect
the OR of the TCST error bits at all time, so it is updated on read.
- A read of TCDT while the function is RALL clears DONE.
Write hardware notes:
- The TC11 behaves much more like a traditional DECtape controller
than a typical PDP11 peripheral. In particular, execution is
initiated/controlled by any write to TCCM, rather than setting
the GO (DO) bit. Unless the function is STOP or STOP ALL, writing
TCCM will put the selected tape in motion.
- Writing GO (DO) clears DONE (READY) and the error flops in TCST.
- Writing a 0 to ERROR clears the error flops in TCST. Because it
is write 0 to clear (later controllers used write 1 to clear),
the simulator has to know whether ERROR is actually written.
- STOP ALL ignores select errors. Every other function is rejected
if there is a select error.
- An illegal operation (setting ILO) will stop the selected tape.
- A write of TCDT while the function is RALL, WALL, or WTMK clears
DONE (READY). RALL should not be included, but it saved a gate
not to prevent it.
- Because DONE (READY) may not be clear when an operation completes
and DONE (READY) is set, the DT_SETDONE must test for DONE (READY)
not being already set.
Previously only the actual size of the container file was used when
attaching a disk. This was correct only when the size of the container
file actually aligned with the simulated disk drive. disks created with
sim_disk_attach automatically write to the last sector of a simulated
disk file when the disk is created. Therefore, auto sizing worked correctly
for any disk created with sim_disk_attach.
Disk images created with simh prior to 4.X would only write to the
portions of the disk drive when the simulated system writes data. These
disk images would only be properly sized if the simulated operation of
the disk had actually written to the last block of the disk. Auto sizing of
these disks would usually size the resulting disk incorrectly and strange
behaviors might occur when using such an incorrectly auto sized disk.
Fixes#357
Clock devices which call sim_register_clock_unit or sim_register_clock_unit_tmr
are best behaved if they use sim_activate_after to schedule their tick events.
The RUN command implicitly resets all devices which may have unexpected
consequences for a novice user.
The logic now produces a warning about this side effect when more than one
RUN command is executed in the same simulator session.
An explicit RESET command suppresses this warning for a subsequent RUN
command.
A RUN command with the -Q switch also suppresses this warning.
When the timer subsystem hasn't gotten fully initialized, devices may
attempt to coschedule schedule events before the clock has gotten
far enough along to be fully initialized. When this happens we now
make sure to avoid the potential for a zero delay which will may cause
an infinite scheduling loop.
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.
Polling is now done at least every 500ms even if the prior input
character hasn't been processed yet. This allows ^E to provide a way
to exit a simulator which otherwise isn't reading from the console port.