1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

237 Commits

Author SHA1 Message Date
Mark Pizzolato
2f1ab2ec6b DISK: Polishing various functionality 2023-08-30 06:17:35 -10:00
Mark Pizzolato
63028863e4 SCP: Default to dynamically loading LIBEDIT, LIBPCRE and LIBPNG 2023-07-27 06:28:53 -10:00
Mark Pizzolato
79714192b4 SCP: Define and use a global macro to stringify macro values 2023-07-21 04:13:35 -10:00
Mark Pizzolato
8f4d4d6d0a DISK: Add drive type option to defer autosize meta data addition to detach 2023-06-29 14:05:38 -10:00
Mark Pizzolato
2d2b8baa4f DISK: Cleanup generated MTAB entries for best ordering and single unit support
Much better HELP <dev> SET and HELP <dev> SHOW results.
2023-06-27 11:39:34 -10:00
Mark Pizzolato
a1fb87a026 DISK: Assure that UNIT_MUSTBUF buffered data reflects the actual unit size 2023-06-27 11:37:44 -10:00
Mark Pizzolato
c73235d8ef DISK: Assure that unit flags in proper state on an explicit attach or detach
- Make sure unit isn't queued when detached.
- Properly allow (or reject) EXAMINE or DEPOSIT to disks unless format is
- correct.
2023-06-27 11:37:44 -10:00
Mark Pizzolato
d0a1b135a7 DISK: Make sure RAW device unload actually detaches from unit 2023-04-30 15:14:54 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- Add common system includes used in may places which are allowed
  and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
  for use only by SCP library routines into sim_scp_private.h.
2023-03-04 17:51:49 -10:00
Mark Pizzolato
0d0d4a0525 DISK: Issue message, don't abort when container identifies as a CDROM but isn't 2023-02-09 12:10:17 -10:00
Mark Pizzolato
be4552c509 DISK: Fix read only container v0 attach logic SCSI<->MSCP size adjustment 2023-02-04 20:21:20 -10:00
Mark Pizzolato
55c446fa0f DISK: Properly re-establish disk context reference after metadata update 2022-12-08 18:23:19 -10:00
Mark Pizzolato
c7156d2eff DISK: Avoid attaching a container which is already attached to another unit 2022-12-02 09:19:31 -10:00
Paul Koning
d87bd32653 DISK: rename CreateVirtualDisk
This fixes issue #52, name conflict when building in MinGW.
2022-11-29 12:03:10 -05:00
Mark Pizzolato
2c7f44d9f7 TAPE: Add support for reading partial fixed sized records.
Partial reading is needed to properly read common archive images found
on bitsavers and elsewhere which were made from QIC devices which must
read multiples of 512 bytes at a time.
2022-11-07 10:46:15 -10:00
Mark Pizzolato
c3e306d2c3 DISK: Better support for SCSI device changing between disk<->tape device types
- Produce reasonable SHOW output for each respective type
- Changing a device disk<->tape sets disk and tape format to default values
- Don't allow disk oriented modes to be set for tapes (autosize, autozap
2022-11-06 13:07:05 -10:00
Mark Pizzolato
0c2d33727b DISK: Extend documentation for metadata management
- Update README to describe differences with open-simh
- Allow SET NOAUTOSIZE and SET AUTOSIZE
- Document deprecation and possibly non functionality of MinGW
  Windows build support
2022-10-07 08:39:25 -10:00
Mark Pizzolato
5ccefb4163 DISK: Add AUTOZAP as a global and per unit option
This removes disk metadata on disk container files at detach time.
2022-10-02 18:32:35 -10:00
Mark Pizzolato
995007dd0f DISK: Silence clang compiler warning 2022-07-31 07:33:31 -10:00
Mark Pizzolato
107813b11b SCP: Change sim_abort to SIM_SCP_ABORT macro.
SIM_SCP_ABORT is ONLY for use in scp support libraries
2022-07-30 11:18:08 -10:00
Mark Pizzolato
81fd92e4ee DISK: Assure that all sim_disk using devices properly honor NOAUTOSIZE 2022-07-28 14:45:55 -07:00
Mark Pizzolato
bc98e1c609 SCP: Be sure to flush output files when aborting.
Emit a last gasp message prior to flushing files before aborting.
2022-07-17 13:01:25 -10:00
Mark Pizzolato
c3a71713ca DISK: Properly handle metadata fixup for empty container files
- Silently allow containers that are the precise unit size even if no
  file system is detected.
2022-07-06 15:36:40 -10:00
Mark Pizzolato
05d3d2c320 DISK: Allow clean container copy upon attach
- Source disk is attached read-only
- Copy reads the minimum of the source or destination container sizes
2022-07-05 16:45:05 -10:00
Mark Pizzolato
4cf86e0e64 SCP: Add NOAUTOSIZE status to the output of SHOW VERSION 2022-06-18 16:08:40 -07:00
Mark Pizzolato
50b969e519 DISK, SCSI: Add framework of support for different device sharing of containers
- More robust and reasonable behaviors when NOAUTOSIZE is enabled
- Repair/extension of disk metadata when AUTOSIZE is enabled
- MediaID support when device presents it
- Automatic MTAB generation when DEVICE provides a DRVTYPE list
2022-06-15 15:51:19 -07:00
Mark Pizzolato
1a02b4df26 DISK: Add MediaId encode and decode routines 2022-06-15 15:51:19 -07:00
Mark Pizzolato
0065f05336 DISK: Allow Control-C to cancel ZAP command 2022-06-15 15:51:18 -07:00
Mark Pizzolato
5448965f70 DISK: Add 2.11 BSD and Net BSD file system recognizers
Both NetBSD and OpenBSD have identical partition information
Report both names when such a file system is found
2022-06-15 15:51:18 -07:00
Mark Pizzolato
9ca26e5b47 DISK: Read Only open while gathering details for DISKINFO command 2022-06-15 15:51:18 -07:00
Mark Pizzolato
b8015349e2 DISK: Add progress indications for ZAP -Z 2022-04-01 12:37:11 -07:00
Mark Pizzolato
6cac5c9eae DISK: Force Read Only for all ISO container attach operations
ISO files and real CDs exist which don't have ISO 9660 file structure.
These do contain ODS2 file systems since they were produced before
ISO 9660 was standardized and certainly before OS support for ISO
9660 was added.  As such, any file named .iso or .ISO will always be
attached read-only since CDs are never naturally writable devices.
2022-03-25 16:25:28 -07:00
Paul Koning
44bdb8a9d6 DISK: Fix off by one error in reporting RSTS file structure info
Updates the previous commit to do it better, by not changing
the return value of get_rsts_filesystem_size -- it still returns
the size, at least our best guess of it (for RSTS it's not possible
to get it correct in every case, but it will be correct for
most scenarios).
2022-03-21 17:08:36 -04:00
Paul Koning
efb83fa831 DISK: Fix off by one error in reporting RSTS file structure info
This fixes issue #1106 -- the last sector number reported was
off by one (sector past the last free sector).
2022-03-21 13:43:30 -04:00
Mark Pizzolato
e0700d3b7c DISK: Add support for ISO 9660 file system detection
Any attach of an ISO 9660 file system is done Read Only since that
file system is logically non-writable.

Related to #1094
2022-03-19 17:18:54 -07:00
Mark Pizzolato
aa637f58c0 DISK: Properly support attach time disk copy to a larger container 2022-03-17 07:28:11 -07:00
Mark Pizzolato
6ad8a528d7 DISK: Fix a few Coverity issues 2022-03-10 16:44:57 -08:00
Mark Pizzolato
06c696385f SCP: Coverity inspired changes 2022-03-06 02:11:57 -08:00
Mark Pizzolato
eac0e5680b DISK: Add SET NOAUTOSIZE - disable autosize when attaching existing containers
This is a global command possibly for folks who have configurations which
always explicitly specify the drive type they want a particular unit to be
before they attach a container to the unit.  The side effect of this will
be to avoid the addition of drive type describing meta data to disk
containers.
2022-02-14 15:06:34 -08:00
Mark Pizzolato
3949f62e89 SCP: Use sim_messagef for all error paths in attach_unit and sim_disk_attach 2022-02-14 04:00:04 -08:00
Mark Pizzolato
b557eaf6e2 DISK: Add support for attach/detach of memory buffered drives (UNIT_MUSTBUF) 2022-02-13 22:51:48 -08:00
Mark Pizzolato
e6c4b01f2e DISK: Provide coherent messages when container encountering incompatibility 2022-02-11 02:06:45 -08:00
Mark Pizzolato
92b1efe50f DISK: Clarify minor changes to sim_disk API in the documentation 2022-02-10 07:10:08 -08:00
Mark Pizzolato
a94a9ac28f DISK: Allow for attach time copies of dissimilar sized disk containers 2022-02-09 08:33:38 -08:00
Mark Pizzolato
b8903f303f DISK: Add highwater support to the container meta data
The highwater support records the furthest logical sector in a disk
container that has been written by the simulator when accessing
the device.
2022-02-08 19:07:00 -08:00
Mark Pizzolato
5015d6ae14 DISK: Cleanup attach behaviors add better support for containers with meta data
At this time:
- The ZAP command exists to remove meta data from containers that
   have it.  Container files processed by the ZAP command will generally
   be restored to the size it was before the addition of the meta data
   and the file time stamps will be unchanged.
- Newly created containers get meta data.
- At attach time, containers that don't have meta data, but have
   recognized file systems that fit within the drive it is being
   attached to get meta data added without changing the file timestamps.
- Containers that don't have meta data and don't have a recognized
   file system that is <= the drive size are attached without comment
   and without adding meta data as long as the drive is NOT set to
   autosize (controllers that support multiple drive types all default to
   autosize, which can explicitly be disabled on a drive by drive basis).
- Containers that don't have meta data which are > the drive size can
   only be attached read only.
- Containers with meta data can not be attached to a different
   controller at all if the container size is smaller than the drive on the
   other controller.
- Containers that have meta data can be freely be attached to the
   controller that they were attached to when they got the meta data.
   If a file system is detected, it will be reported.  Otherwise if no
   recognized file system is found, the attach will be silent.  File
   system detection reporting can be suppressed with -Q on the attach
   command.
- Containers with meta data can only be attached read only to a different
   controller if the container is larger than the drive it is being
   attached to.
In the future:
- In general, containers with meta data (or recognized file systems)
   will be attachable to MSCP and SCSI controllers, as long as reasonable
   sector sizes and file system not requiring interleaving have been found.
- Containers without meta data will only be attachable if autosize
   is disabled and the container is <= the size of the drive.
- Explicitly setting a drive type on a unit will implicitly disable
   autosizing.  If a user wants to set the default drive for a unit
   and still allow autosizing they must explicitly set the unit to
   autosize after setting the drive type.

Relevant to: #1065, #1059, #1094, #1100, #1118, #1117
2022-02-07 22:55:23 -08:00
Mark Pizzolato
a4054f33b8 SCP: Add command argument passed into library unit test routines 2022-02-07 04:21:16 -08:00
Mark Pizzolato
39f2ab96cc DISK: Add logic to avoid zapping an attach container file
- ZAP with -Z switch now trims all zero sectors, where the default is
   to trim zero sectors added beyond the container file size when the
   meta data was added.
- Remove file system wording from the skipping autosizing message.
2022-01-22 10:13:29 -08:00
Mark Pizzolato
99c5f2a763 DISK: Record original container file size in footer restore size during removal 2022-01-20 17:24:45 -08:00
Mark Pizzolato
121b0323a6 DISK: Disallow attach of unrecognized disk container > size of the current unit
Containers without recognized file systems already won't autosize, but now
you can't attach a container which is larger than the current drive type
presuming there is useful data beyond the size of the current drive type.
2021-12-15 16:54:04 -08:00