This allows a device simulator to specifically name the units that it uses
for different purposes. This info is visible in the output of SHOW QUEUE
and debug output.
Once specified or dynamically determined (as previously occurred with
each call to sim_uname()), that name is saved for fast delivery on subsequent
calls. This will remove some overhead when running with debugging on.
The fprintf substitute function Fprintf can call tmxr_linemsgvf which may
internally produce debug output thus producing an infinite recursion.
All writes to the debug file are now done by explicit calls to fwrite() OR the
Fprintf socket destination is saved and cleared during all calls to fprintf.
Add consistent debug options to track TODR activities and the values which
are set. Debug data will display the VMS time related to the values set and
read.
Added debug CHECK option to the sim_timer_activate_after() to verify
that coscheduled events actually have sim_activate_time_usecs() results
which are consistent with each other.
Additionally, coschedule tick processing now properly counts down
pending coschedule queued activities.
- Add support to query remaining usecs on pending events.
- Generalized the sim_interval adjustment in sim_idle to allow more than
a single decrement.
- More overhead reduction when idling.
- Carry usec values as double through out to fully support long wall clock
delays.
- Support for arbitrary long wait intervals in sim_activate_after with
precisely correct delays aligned with the calibrated clock once
per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
that are shorter than the currently shortest scheduled event
commit ef6528bf32 added support for automatic WRU detection for simulators
that don't have a console port, but it was never documented and the addition of
that support potentially interfered with SAVE/RESTORE behavior.
The console connection state is now automatically saved and restored.
Also:
- allow a timer to dynamically stop itself (by calling sim_rtcn_calb
with tps=0), and then to start the internal timer to provide a calibration
baseline if necessary.
- Fix coschedule interval computation when the queue is empty.
- Properly select the correct timer for coscheduling without a specific tmr
- Properly adjust the coschedule queue's next time value when entries are
canceled.
- Cleaned up throttling to behave well with all potential throttling rates and
to make visible what is happening when boundaries are reached.
Historically, hosts which have a tick size slower than the tick a simulator
wants to implement can't idle effectively and keep good time.
This change allows simulators which call sim_rtcn_tick_ack() to provide
useful idling behavior while still keeping the passage of wall clock time
to time in the simulator accurate.
The output of remote console commands gets truncated at the configured
buffer size. The default has been raised from 1400 to 8192.
Common remote console usage is from the same host as the simulator and
as such localhost TCP traffic is delivered in chunks at least 8192 so no extra
packets will be involved in transporting the potential extra data and no
transmission delays on the send() call.
The minumum size is now 1400 (which was the prior default).
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.
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.
When sim_brk_type_desc isn't populated, the matching breakpoint switches
and matching address are displayed. Fix to use the optional VM provided
address formatting function sim_vm_sprint_addr.