Replace memcpy with memmove for overlapping buffer moves.
VHD differencing disk parent filename fix
fix sizing of SIMH format disk drives
Fix memory leak after initializing a disk with a pattern
Fix bad 144 block initialization for RB and CS devices
BAD144 info was written correctly if the user answered Y when the disk
image was created, but would not work if SET RPn BADBLOCK was
entered later.
Auto sizing would be potentially wrong if a disk had been created
without writing the BAD144 data. Now, if the disk contains a file system
that information along with the physical container's size is used to
properly auto size the disk.
Previously, disk capacity was increased if the drive was smaller than the
contained file system(s). Now the drive capacity will be increased or
decreased to reflect the contained file system(s) size.
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
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.
When creating a new disk image the new disk image can be populated with
unique data in each sector. The data is the logical block address of the sector
in a 4 byte little-endian value. This is enabled when the -I switch is specified
on the ATTACH command. To leverage this, a -K flag is interpreted on the
ATTACH command which will validate the entire disk contents actually
contains the expected value at attach time and also will validate that any data
written to the disk during simulator operation also contains the same logical
block address values.
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().
- Avoid assignments of void * values. Cast all memory allocation return values to appropriate types.
- Add output to sim_log where missing in various places.
- Fixed issue with lost file positions after a restore for devices which leverage the UNIT_SEQ flag.