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.
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.
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.
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
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.
Also extended the optional VM supplied routines to include sim_vm_sprint_addr.
Simulators which provide sim_vm_fprint_addr should also provide
sim_vm_sprint_addr with sim_vm_fprint_addr reworked to leverage
sim_vm_sprint_addr internally. sim_vm_sprint_addr is currently only used by
sim_brk_message() which is an API which a simulator may choose to use if
it supports multiple breakpoint types,
- Add detailed error message info while parsing breakpoint commands
- Properly limit breakpoint class values to reflect available mask bits
- Declare globally sim_brk_npc since it is a documented API
- Revise simh_breakpoints.doc to reflect current behavior
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.
This should work on all byte addressable host systems using GCC/clang to build.
The QEMU slirp code has been pried out of QEMU and stubs have been created to solve where the current slirp is entangled with the QEMU code. Ths slirp/simh directory contains all the necessary include and glue files to make this useful. Everything in the slirp directory is unmodified QEMU code.
Prior logic attempted to load the desired file from the current default directory and if that failed wrote the in memory boot code image to the desired file and then retried the desired load..
A user can still explicitly load a ROM image with a "LOAD -R romfile.bin" command prior to a BOOT attempt if they want to test or otherwise run with a different ROM.
Problem was the console storage output buffer was masked with a WMASK instead of a BMASK (it is only a 8 bit register).
Also, the input interrupt processing cleared the output interrupt state instead of the input interrupt state. This would only be a problem when interrupts are actually used instead of polled I/O.
This reverts commit 7c7b44e409.
The prior commit didn't work for static initializers. There are other ASCII dependencies in simh. They should all be solved together or not at all.
- Provide a sim_islower(), sim_isalpha(), sim_isprinit(), sim_isdigit(), sim_isgraph(), sim_isalnum() which make sure that the character being examined as an unsigned char.
- Ignore a UTF_BOM sequence at the beginning of command files.
- Provide a sim_isspace() which makes sure that isspace only considers the character being examined as an unsigned char.
- EXPECT will now tolerate a HALTAFTER=n parameter which delay the simulator stopping execution for n instructions. Unpredictable behavior will happen if multiple EXPECT conditions see matching data before the first actualy halt occurs.
- SEND has an AFTER=n argument which delays the initial stuffed data from being input for at least n instructions. It also has a DELAY=m argument which specifies the minimum number of instructions which must execute between stuffed input data.
- Changed run_cmd() to no longer clear pending breakpoint actions before starting instruction execution.
- Added a -Q switch to the commands which dispatch through run_cmd() (RUN, STEP, NEXT, GO, BOOT, etc.). This switch will suppress status output when execution stops. This will allow sequences of breakpoint action commands to silently execute when needed.