Commit graph

92 commits

Author SHA1 Message Date
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
Mark Pizzolato
2c0cedcc9c PDP11, VAX: Added ability to set the size of RAUSER devices to be n binary MB (1024*1024) with the -B switch. Added SHOW -B to display drive capacities in binary MB using the SHOW -B switch. 2014-05-16 15:13:56 -07:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
25a62c2837 PDP11,VAX: Added Unibus KRU50 controller type (from Bob Armstrong) 2013-12-10 11:11:41 -08:00
Mark Pizzolato
7ebc991b5d PDP11,VAX: Corrected the KRQ50 controller id code (from Bob Armstrong) 2013-12-04 09:55:28 -08:00
Mark Pizzolato
577f921014 PDP11/VAX: Additonal RQ drive types (RA70 and RA73) along with the ability to set additional controller types (from Bob Armstrong) 2013-12-03 12:48:29 -08:00
Mark Pizzolato
f0d41f15d7 PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik)
Here's a PDP11 SIMH bug as old as the simulator itself: the reset_cpu routine sets the PS to 340 (interrupts disabled). This causes some versions of Lunar Lander not to work. In fact, the initial state of the PS is not architecturally standardized:

      04: cleared (from schematics)
      05: cleared (from manual)
      20: cleared (from schematics)
      34: cleared (from schematics), set to 340 on boot?
      40: cleared (from schematics)
      44: cleared on init, set to 340 on boot (from schematics, manual)
      45: cleared (from schematics)
      60: cleared (from schematics)
      70: cleared (from schematics)
      T11: set to 340 (from spec)
      LSI11, F11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, mode 3 undefined)
      J11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, 340 on jump to  custom PROM)

The story seems to be this. All non-VLSI PDP11s used TTL chips to implement the PS, either discrete flip-flops, or 4b registers, or both.
Starting with the first system, the 11/20, they were wired clear on the processor INIT signal (power-up or front panel START switch), so that all internal state started as 0. This worked fine, because START also reset the Unibus and cleared all interrupt enables. So even though the processor was as IPL = 0, no interrupts were possible. Then along came the LSI11...

The LSI11 implemented a line-time clock with NO INTERRUPT DISABLE. Thus, if IPL was left at 0 and a bootstrap routine from a slow device was started (e.g., a floppy drive), the clock would tick, and an interrupt would occur, before the bootstrap routine finished. Because no vectors were set up, the processor would crash. So the LSI11 started the practice, carried over to all later PDP11 VLSI chips, of setting the PS to 340 before jumping to a boot ROM.

The T11 did this in all modes of startup, because its only startup behavior was to jump to a "boot" routine. It did not have a console of any kind.

Accordingly, it appears that the cpu_reset routine needs to set the PS based on the processor model. Further, all boot routines need to set the PS to 0 or 340 based on the processor model. (It's probably safe for boot routines just to set the PS to 340, but it's not technically
accurate.)
2013-10-27 05:30:13 -07:00
Mark Pizzolato
026dd98d83 Merge latest from Bob Supnik 2013-10-12 13:33:01 -07:00
Mark Pizzolato
63e05c77be PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
Timothe Litt
91c7d26095 SHOW IOSPACE, again
Show IOSPACE doesn't always get the number of devices right due to device creativity.

o The distinction between UNIT and DEVICE has blurred
o MUX devices merge several physical devices into one device/unit
o Dynamic device sizing has made things more volatile.

This edit solves the problem for SHOW IOSPACE by adding an (optional) word to the DIBs.
The word contains the amount of IO space consumed by each instance of the physical device that's being emulated.
E.G., if it's a DZ11, the device is the DZ11 module, or 8 lines, even though the MUX device may support 32.

This enables SHOW IOSPACE to determine the number of physical devices being emulated, which is what folks need when configuring software.  The word may have other uses - in a generic dynamic device sizing routine - which is why the amount of IOSPACE per device was chosen rather than the 'number of physical devices.'

The edit should not make any existing device regress.  If the new word (ulnt) is zero (not initialized), SHOW IOSPACE will default to the number of units in the device, or if there's no device (CPUs), 1 as before.  If it is present, the number of devices is the calculated as total allocation/allocation-per-device.

The edit updates all the devices that seem to require this treatment, and all the processors that define the UNIBUS/QBUS DIBs.
2013-07-11 15:39:15 -04:00
Mark Pizzolato
651780c481 Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
Mark Pizzolato
3dd4121c78 Added Large File Support which was missing for NetBSD (and OpenBSD) hosts - reported by Felix Deichmann 2013-04-12 08:17:01 -07:00
Mark Pizzolato
c6691b6ff3 Fixed size limit on RQ devices for PDP11 simulator 2013-03-19 10:55:15 -07:00
Mark Pizzolato
960c5b5873 Fix issues observed by Sun C compiler 2013-03-18 12:52:43 -07:00
Mark Pizzolato
2e5b0d54c6 Generalized the sim_disk layer to support large file disk devices (simh, VHD and RAW formats) with out requiring USE_ADDR64, and enhanced the pdp11_rq device to use this capability. 2013-03-17 12:02:43 -07:00
Mark Pizzolato
374b13f946 Fixes to infinite loop issues found by Mikulas Patocka 2013-03-05 11:40:33 -08:00
Mark Pizzolato
08e97d5882 Corrected error in pdp11_rq help routine 2013-02-05 09:41:55 -08:00
Mark Pizzolato
610ecaaa93 Adding mode device help 2013-02-05 06:49:39 -08:00
Mark Pizzolato
55693fb9b3 Added missing MOD_VALR flag on some recently revised MTAB entries 2013-02-02 17:27:22 -08:00