Commit graph

142 commits

Author SHA1 Message Date
Mark Pizzolato
c7b0928b33 SCP: Avoid potential buffer overruns by using strlcpy() and strlcat() 2019-03-08 12:31:01 -08:00
Mark Pizzolato
75d18d4db0 SCP: Removed redundant SCPE_NOTATT which duplicates SCPE_UNATT 2019-02-01 16:07:12 -08:00
Mark Pizzolato
cb9876ce65 SCP: Cleanup gcc compiler flagged potential issues
Compiler warnings about undeclared case fall throughs, and potential
buffer overruns,
2019-01-21 16:43:17 -08:00
Mark Pizzolato
3cca0cf90b SCP: Cleanup MinGW compile warnings 2019-01-21 02:36:42 -08:00
Mark Pizzolato
0e544b71ff SCP: Fix various compiler warnings 2018-09-28 18:05:39 -07:00
Mark Pizzolato
928193d463 SCP: Fix EXPECT regular expression match environment variable names
- Use sim_messagef for consistency
2018-09-27 06:24:31 -07:00
Mark Pizzolato
0daa80e03d SCP: Add support for library unit test routines 2018-08-26 18:15:30 -07:00
Mark Pizzolato
6070692581 SCP: Add unit to AIO_VALIDATE context message 2018-08-08 11:51:54 -07:00
Mark Pizzolato
4487646946 DISK: Fix auto sizing and non auto sizing logic checks
As reported in #581 and #565
2018-07-19 23:33:09 -07:00
Mark Pizzolato
83234f1e9d DISK: Add Linux host support for direct CDROM access 2018-05-26 12:33:50 -07:00
Mark Pizzolato
2363300e64 DISK: Fix Coverity identified error path problems 2018-05-15 07:32:24 -07:00
Mark Pizzolato
5ee2944f40 DISK: Properly parenthesize logical expression for clarity avoid clang warning 2018-05-09 13:30:26 -07:00
Mark Pizzolato
e266271612 DISK: Fix auto format detection when attaching VHD disk images 2018-05-07 12:22:33 -07:00
Mark Pizzolato
15e86fb4ed SCP, DISK: Fix Coverity identified debug path null pointer dereferences 2018-04-17 23:51:39 -07:00
Mark Pizzolato
d6a5268d97 DISK: Properly open in RAW mode on *nix 2018-04-11 04:20:17 -07:00
Mark Pizzolato
8bec55b976 DISK: Properly fail an attempt to access to a non-existent file in raw mode 2018-04-10 11:45:22 -07:00
Mark Pizzolato
6667f651a3 DISK: Add explicit AUTO detect disk format mode 2018-04-10 11:43:43 -07:00
Mark Pizzolato
6263378df4 DISK: Change auto disk format open logic to include RAW
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
2018-04-07 22:15:14 -07:00
Mark Pizzolato
28e4311039 SCP: Extended debugging to allow for unit specific debug for disk and tape 2018-04-07 21:38:26 -07:00
Mark Pizzolato
669d07ba3e SCP: Fix compile WIN32 MinGW warnings 2018-03-07 13:20:14 -08:00
Mark Pizzolato
335b4ef210 DISK: Add support for reporting OS specific error messages when using RAW I/O 2018-02-27 13:32:20 -08:00
Mark Pizzolato
70d8f759c6 DISK: Fix RAW device (CDROM) access behaviors
- 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
2018-02-24 17:38:20 -08:00
Mark Pizzolato
d91d47d1f4 SCP: Silence compiler warnings 2018-02-13 12:27:18 -08:00
Mark Pizzolato
ce8aea13bc MINGW: Reorder windows include files to avoid future complications 2018-02-12 20:48:39 -08:00
Mark Pizzolato
49911369d0 DISK: Don't auto size to shrink a disk when file system data size is unknown
Fix report in #524
2018-02-05 11:23:06 -08:00
Mark Pizzolato
b45b9426c6 makefile: Tolerate changing MinGW include file changes
Fix #487
2017-11-11 10:52:29 -08:00
Mark Pizzolato
3d1f092573 SCP: Provide command context for messages emitted during ATTACH and DETACH
Context and non error messages will be suppressed in quiet mode or when -Q
switch is explicitly supplied on command line
2017-10-22 08:33:21 -07:00
Mark Pizzolato
064c8e54a8 SCP: Silence Coverity warnings 2017-03-31 18:54:18 -07:00
Mark Pizzolato
773cc1c319 SCP: Minor Coverity cleanup 2017-03-30 07:55:13 -07:00
Mark Pizzolato
2b0acc301a DISK: Ignore potential cleanup errors and avoid sign extension byte swapping 2017-03-29 08:19:17 -07:00
Mark Pizzolato
8df467835a DISK: generalized data debug routine for use by devices that don't use sim_disk 2017-03-11 00:13:34 -08:00
Mark Pizzolato
9f929ae312 DISK: Fix Coverity identified problems
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
2017-03-10 15:59:37 -08:00
Mark Pizzolato
760ce434f6 DISK: Add 256 byte sector support to Ultrix file system detection logic 2017-02-08 11:08:46 -08:00
Mark Pizzolato
5a0970fefb DISK: Support file system type/size checking for disks without 512 byte sectors 2017-02-07 16:28:01 -08:00
Mark Pizzolato
76dda8a01e PDP11, VAX: Fix SET RPn BADBLOCK behavior and auto sizing.
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.
2017-02-07 13:02:21 -08:00
Mark Pizzolato
7050a1aef5 DISK: Added disk auto size detection for DEC ODS1 structured disks 2017-02-06 00:04:53 -08:00
Mark Pizzolato
f006aaa398 DISK: Added Ultrix disk partition detection to auto size RQ or RP disks.
Thanks to Henry Bent for info that made this possible.
2017-02-04 19:56:54 -08:00
Mark Pizzolato
0461008991 DISK: Always autosize disk to exactly the size of known file system data
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.
2017-01-08 15:28:17 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
9a69fa8b49 DISK: Remove $ from all variable names for clean compiles on all gcc versions 2016-12-02 15:05:53 -08:00
Mark Pizzolato
b98ece819b DISK: Extended and corrected autosize logic for disk attach.
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
2016-11-29 18:53:52 -08:00
Mark Pizzolato
165c37acee DISK: Add -U attach option, to fix VHD differencing inconsistencies
-O allows overriding for testing purposes.
-U allows overridden checks to update and fix the inconsistencies

As discussed in #352
2016-11-28 03:35:01 -08:00
Mark Pizzolato
df3fbc3fb4 DISK: Fix -O option for differencing disks 2016-11-26 15:41:10 -08:00
Mark Pizzolato
3511b5e4e3 DISK: Fix -O functionality to override VHD differencing disk consistency checks 2016-11-26 07:06:19 -08:00
Mark Pizzolato
4f1f439174 DISK: Fix auto detect format attach logic for non VHD disks #356 2016-11-25 16:25:43 -08:00
Mark Pizzolato
df80f22152 DISK: Add better error reporting when differencing VHD attach fails 2016-11-21 21:30:46 -08:00
Mark Pizzolato
39d2944ede TIMER: Add support for catchup clock ticks and cleaned up asynchronous clocks
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.
2016-11-16 23:50:53 -08:00
Mark Pizzolato
a24aba69ae VIDEO: Added priority boost to thread performing SDL processing and updates
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.
2016-06-11 09:52:33 -07:00
Mark Pizzolato
7a7b4de971 DISK: Fix MinGW build when compiling under g++ 2016-05-18 15:36:13 -07:00
Mark Pizzolato
e8ce83073f DISK: Allow building with g++ on Windows with MinGW 2016-05-17 22:58:32 -07:00