Commit graph

81 commits

Author SHA1 Message Date
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
Mark Pizzolato
28b90552b7 Revised all VAX simulator devices to have proper help information defined to make "HELP dev SHOW" and "HELP dev SET" most useful. 2013-02-02 16:29:38 -08:00
Mark Pizzolato
cbe11147fc Created a way for devices to have a description presentation routine and if it is supplied for its output to be visible with a SHOW SYSTEM command. Provided device description routines for devices used in the VAX simulators 2013-01-25 12:04:25 -08:00
Mark Pizzolato
936c3dbcfe Fixed register definition for the pak array which saved and restored the wrong content (not all of it) due to the internal longword alignment of the struct rqpkt. 2013-01-22 16:11:51 -08:00
Mark Pizzolato
9fc6aa73d6 Finish migration for simulators to use generic clock co-scheduling and sim_activate_after for scheduled delays 2013-01-22 05:41:27 -08:00
Mark Pizzolato
4a5b7a78c5 Remove the UNIT_RAW flag and deprecate the UNIT_TEXT flag (made the value 0). 2013-01-19 10:59:40 -08:00
Mark Pizzolato
dac73b9381 Migrating scp and library global variables to be declared as extern in the appropriate library include file and remove repetitive declarations in referencing modules. 2013-01-10 13:29:15 -08:00
Mark Pizzolato
7b6f7a9871 Set device flags indicating DEV_DISK, DEV_TAPE, DEV_MUX and DEV_ETHER for all simulator devices which use the sim_disk, sim_tape, sim_tmxr, and sim_ether libraries 2013-01-07 12:47:24 -08:00
Mark Pizzolato
b2ed63f31a Removed IOBA_FLOAT and replaced with IOBA_AUTO 2012-12-28 12:15:08 -08:00
Mark Pizzolato
7bed091134 Reworked Auto Configure for all Qbus/Unibus devices to have their device address settings table driven from the auto configure code rather than statically defined in many per cpu model include files.
Fixed auto configure bugs which didn't allow Fixed CSR Addresses or Fixed Vectors to be set using the auto configure information.
Fixed display of address and vectors to indicate that the assigned address and/or vector is in the floating set.
Added extended definitions to the auto configure table to reflect all known potential static and floating and static addresses as of VMS V5.5-2
Changed the name of the VAX 11/780 console floppy device name to RXC from RX (which collides with a Unibus name for the RX11).
2012-12-20 13:58:11 -08:00
Mark Pizzolato
50cf91d441 Merge branch 'SerialMux' and compiler suggested cleanup 2012-12-18 09:52:14 -08:00
Mark Pizzolato
e0bb8fed91 Added support for changing rq controller type to one of RQDX3, UDA50, RUX50 or KLESI. (from Mike Burke) 2012-12-10 05:58:11 -08:00