Commit graph

110 commits

Author SHA1 Message Date
Christian Gauger-Cosgrove
2396fd0349 PDP-11, VAX: Expand DTYPE mask size, fix RF35, add new devices to RQ sim
The disk type mask width (UNIT_W_DTYPE) was increased to six (6) bits, doubling
the possible number of disk types definable to sixty-four (64).
The RF35 was not entered in either the drv_tab or drv_types tables, causing any
set command issued for the drive type defined after the RF35 -- the RF71 through
RF73, as well as any disk defined after the RF73 -- to act incorrectly.
The ESE20 solid state disk and ESE50 series of solid state disks are
added based on simple drive geometry and size information without any parameters
for bad block management (not that it is used in the simulation anyways). The
ESE50 series drives are labelled as they are in the MSCP specification document,
the Ultrix-32 v4.5 disktab, and the Media Type noted in the "ESE50 SDI Solid
State Disk User Guide" (EK-ESE50-UG.B01):
 * ESE50-A: ESE52
 * ESE50-B: ESE56
 * ESE50-D: ESE58
The RD33 is added based on the geometry of the Microscience HH-1090 hard disk
drive, with the bad block management information calculated from the bad block
information for the other RDxx series drives.
The RX18 is added based on the geometry of the RX180 floppies in the VT-180
"Robin" CP/M system, which are noted in the MSCP specification document as a
possible device. Specific information is taken from the "VT-180 Series Technical
Manual" (EK-VT18X-TM-001).
2023-11-21 16:26:52 -05:00
Olaf Seibert
cf47a20fd4 DISK: add RQDX1 model and make it default for MV1.
Now MV1 can boot Standalone Backup 4.0 from RX50.
See issue #215, #271, #277.
2023-07-18 20:13:11 -04:00
Olaf Seibert
86ffe4bec2 sim_disk.c: only free filebuf if it was allocated here too.
PDP11/pdp11_rq.c re-uses ->filebuf as a sector buffer (under the #defined
name rqxb) and allocates it as such. If an RQ disk is detached and
another attached, this buffer would be lost and the pointer reset to
NULL. sim_disk.c would only allocate the buffer if UNIT_BUFABLE is set,
which means to buffer the whole disk. Since this rightly isn't set on RQ
disks, the pointer would remain NULL and segfaults would ensue.  See
open-simh issue 274.
add comment about safe re-use of filebuf
2023-07-16 16:38:19 -04:00
Mark Pizzolato
21e3c56fa4 PDP11, Qbus & Unibus VAX: Use proper REG macros for arrays and structures
Registers in the DMC, RQ and TQ devices were improperly described
2022-09-21 08:46:23 -07:00
Mark Pizzolato
61877a5c77 PDP11, VAX: Add RF73 and RF35 disk type to RQ, correct various model numbers 2022-03-22 21:25:16 -07:00
Mark Pizzolato
16042a7b96 PDP11, VAX: Add RF30, RF31, RF71 and RF72 disk types to the RQ simulation
These are added based on simple drive geometry and size information
without any parameters for bad block management (not used in simulation
anyway).
Additionally, RF drives connected to Qbus systems via a KFQSA.  When
connected this way, EACH drive on the DSSI bus appeared to the attached
Qbus system as a separate MSCP controller to the operating system.  This
change does not model that connectivity.
2022-03-06 09:39:26 -08:00
Mark Pizzolato
2fb741046d PDP11 & VAX: Avoid RQ DEVICE uname memory leaks
Additional UNITs from 4 up to 254 are replicated from Unit 0.
If the UNIT->uname has already been populated, we could leak memory if
it isn't released before copying from the template UNIT.
2022-03-04 18:28:30 -08:00
Mark Pizzolato
49b6e52d48 PDP11, VAX scsi systems: Migrate DEV_DISK devices using common autosize code 2022-02-11 15:26:21 -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
4c44975e98 SCSI, VAX & PDP11: Force Read Only attach for CDROM devices
As reported in #1094
2021-11-07 10:06:40 -08:00
Mark Pizzolato
a015e44c10 ALL: Standardize writelock behavior adding global UNIT_WLK & UNIT_WPRT
Historically this functionality was reimplemented within each
DEVICE simulator often with slightly different implementations
and inconsistencies.  Solving this globally within SCP required
changes in many places, but should henceforth be reasonably
managed.

As discussed in #1034
2021-04-19 10:58:51 -07:00
Lars Brinkhoff
d5befa75c1 I650, IBM1130, PDP11, PDP18b, VAX, Sigma: Fix set but unused variables. 2020-12-02 14:45:21 -08:00
Mark Pizzolato
0e72400e09 PDP11, Qbus/Unibus VAX: Silence various compiler warnings 2020-10-09 05:10:12 -07:00
Mark Pizzolato
d24fa1e5d2 PDP11, VAX: Properly autosize RQ disks based on drive type 2020-05-18 06:25:48 -07:00
Mark Pizzolato
fd08552852 PDP11, PDP10, VAX: Consistent use of UNIT flag variables in RP, HK, RL, and RQ
Properly reference sim_disk provided WLK flag bit
2020-05-05 12:59:21 -07:00
Mark Pizzolato
07897d3257 PDP11, VAX, and PDP10: Add AUTO disk format option to RP, HK, RL and RQ devices 2020-04-21 19:45:47 -07:00
Mark Pizzolato
42938b9c83 PDP11, VAX: Allow RQ RA8U disk type which is verified as valid at attach time 2020-04-11 19:57:13 -07:00
Mark Pizzolato
73df9b1c4e PDP10, PDP11, Massbus VAXen, DISK: Rework PDP10 use of sim_disk
- Make all PDP11, VAX RP and RQ devices autosizing behave similarly
- Generalize the attach help to be specific to the device/system being
   attached
- Remove the sim_disk_pdp10_* calls which weren't correct or needed
   since sim_disk_attach_ex provides sector size which is used correctly
2020-04-03 17:32:14 -07:00
Mark Pizzolato
80d9393b83 alpha, HP2100, ID16, ID32, I7094, PDP11 and VAX: Fix array REG definitions
Array REGister definitions have been made consistent by passing the
name of the array object.  This allows proper sizing assessment
to occur in the register validation logic.

Some previously described array REGister initializers were not really
arrays.  Some were structures and others were merely pointers to
someplace in memory that it was desirable to view as a scalar array.

Structures or other blob data should now use SAVEDATA.  Virtual
arrays intended to be interpret some part of memory as scalar data
now use VBRDATA initializers.
2020-03-06 16:29:17 -08:00
Mark Pizzolato
90eddfc733 alpha, HP2100, ID16, ID32, PDP11 and VAX: Normalize array REG definitions
Array REGister definitions have been made consistent by passing the
address of the whole array object.  This allows proper sizing assessment
to occur in the register validation logic.
2020-03-01 12:11:13 -08:00
Mark Pizzolato
b8bf4de34d PDP11 Unibus and Qbus VAX: Correct additional REGs in RQ device 2020-02-28 07:44:41 -08:00
Mark Pizzolato
3b802f644d PDP11, Unibus and Qbus VAX: Correct REG sizes in RQ, TQ and XQ devices 2020-02-26 13:30:21 -08:00
Mark Pizzolato
1e214afec3 PDP11, VAX: Fix RQ initialization of extra units
As reported in #711
2019-06-25 00:31:29 -07:00
Mark Pizzolato
2bee79b5e7 PDP11, VAX: Properly initialize extended unit structures
- Extra queue and timer units on RQB, RQC, and RQD are now properly
  initialized.
- PDP11 unit numbers are numbered:
	device RQ      0-3
	device RQB    4-7
	device RQC   8-11
	device RQD  12-15
2019-06-24 11:08:09 -07:00
Mark Pizzolato
9c2c621278 PDP11, VAX: Add RQ device option for variable number of drives 2019-06-23 23:47:12 -07:00
Mark Pizzolato
fa77969c57 All: Fix various Coverity complaints 2019-04-03 09:32:54 -07:00
Mark Pizzolato
ac40e513cb PDP11: Change all boot routines to use WrMemW() to access memory 2018-09-09 19:08:33 -07:00
Mark Pizzolato
8c0439feaa PDP11, VAX: Fix RQ and TQ Get Unit Status to properly report no more units
As reported in #592
2018-06-24 03:21:22 -07:00
Mark Pizzolato
c73f56cc5a PDP11, VAX: Add descriptive unit names to DZ, RQ, TQ, XQ and XU devices
Some devices have dedicated units that perform various independent
functions (often timing) that are independent of the primary device unit
which is ATTACHed.  This services to help interpret debug information
that may be produced.
2018-06-23 10:34:09 -07:00
Mark Pizzolato
cc6140fd31 I1401, VAX, PDP11: Fix nested comments consistently with Supnik-Current branch 2018-06-03 20:59:36 -07:00
Mark Pizzolato
54f46651fe PDP11, VAX: Fix Coverity identified debug path null pointer dereference 2018-04-17 23:52:28 -07:00
Mark Pizzolato
1741ae29fa PDP11, VAX: Add MSCP Media ID encoding/decoding details (Johnny Billquist) 2018-04-12 14:02:27 -07:00
Mark Pizzolato
5a9263c0cf PDP11, VAX: Add settable unit numbers for TQ drives 2018-04-12 13:15:48 -07:00
Mark Pizzolato
5a18d31449 PDP11, VAX: Add settable unit numbers for RQ drives 2018-04-11 03:12:12 -07:00
Mark Pizzolato
17e72adb93 SCP: Display HELP <dev> SET help text for modifiers that require values 2018-02-02 05:12:22 -08:00
Mark Pizzolato
4da04e06ce PDP11, VAX: Fix RQ device potential memory reference errors (COVERITY) 2017-03-12 19:41:23 -07:00
Mark Pizzolato
14b9265af3 PDP11, VAX: Cleaned MSCP/TMSCP packet queues to be uint16 2017-03-12 19:06:46 -07:00
Mark Pizzolato
aa0924816a PDP11, VAX: Fix RQ device Endian compatibility problem (COVERITY) 2017-03-11 22:24:41 -08:00
Mark Pizzolato
7d432406b6 PDP11, PDP10, all VAX: General extern cleanup.
Remove explicit redundant extern declarations in source files that are
defined in processor include files.
2017-02-04 19:37:20 -08:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
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.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
db3531e56d DISK: Properly base disk unit flags at UNIT_V_UF and provide useful DKUF_V_UF flag space.
Adjust the disk device simulators that depend on sim_disk as discussed in: #268
2016-01-19 09:47:42 -08:00
Mark Pizzolato
9f7a66a7a2 PDP11: Fix Unibus boot of RSX-11M+ systems from RQ devices
The RSX-11M+ boot driver expects a slower response from the simulated
UDA50 controller.  This response is only in during the MSCP initialization
sequence, so normal protocol interactions  for read and write I/O are
unchanged.  Updated value determined by John Forcast.  Fixes #216.
2015-12-17 06:38:31 -08:00
Mark Pizzolato
88dde792b7 PDP11, VAX: Add device debug help information descriptions 2015-12-06 18:01:20 -08:00
Mark Pizzolato
f60390ce89 Compiler suggested cleanup
Cast the results of unit pointer subtraction to int so it can be printed with a %d format specifier.
2015-11-25 05:21:55 -08:00
Mark Pizzolato
73d7aee71f SCP: Add printf style format argument validation for all functions which take printf arguments.
These include: sim_printf(), sim_messagef(), Fprint() and sim_debug().

Fix current use of these functions which had invalid arguments.
2015-10-09 04:12:25 -07:00
Mark Pizzolato
ed57f061e2 All VAX: Always return the correct Qbus/Unibus interrupt vector bits for all devices. Fix #239
Vector values contained in device information blocks are the true bus relative vector values.  CPU specific biased vector values are produced by the respective vector fetching logic and vector values are limited to 9 bits with <1:0> = 0 as specified in both the Unibus and Qbus documents.
2015-10-08 04:43:21 -07:00
Mark Pizzolato
176540f639 PDP11, VAX: Correct MSCP & TMSCP register access debug output to mention correct register names and data being written on register writes 2015-09-08 11:17:52 -07:00
Mark Pizzolato
230e588b5d ALL: Merge with Supnik-Current 2015-05-10 06:05:11 -07:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
5b288b0d98 PDP11, VAX: Enhance help SET RQn FORMAT description 2014-09-29 03:08:59 -07:00