Previously auto format detection first attempted a VHD open. If that
failed, it falls back to a SIMH open which uses C RTL fopen, fread, fwrite
and fclose. Now a RAW format open is attempted which will often
succeed, not only on CDROM devices, but most normal files can also
be opened in RAW mode which will to direct OS I/O (open, erad, write
and close or CreateFile, ReadFile, WriteFile, CloseHandle).
As discussed in #533
- Only open RAW CDROM devices in read only mode (UNIT_RO) to avoid
potential write attempts.
- Make sure to properly reopen RAW CDROM devices after media is inserted
into the drive after an attach thas with no media present OR after an Eject.
As discussed in #533
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.