Commit graph

51 commits

Author SHA1 Message Date
Mark Pizzolato
7677dad67d PDP11: Properly range check DMA access to the I/O page
Make sure that DMA access to the I/O page can only see addresses on the
Qbus/Unibus and not internal CPU registers
2018-09-06 11:03:45 -07:00
Mark Pizzolato
8e5025fdcf VAX, MicroVAX2: Fix compiler warning with GCC & clang 2017-12-18 15:29:15 -08:00
Mark Pizzolato
bdddcb4004 VAX, MicroVAX2: Add display of ROM and NVR address ranges 2017-12-18 05:10:27 -08:00
Sergey Svishchev
4bee16578a PDP11, All VAX: fix CID: 1415538, 1415766 ("Dereference before null check") 2017-03-09 17:19:09 -08:00
Bob Supnik
b41d10f189 PDP11, PDP10, VAX780: CR11 is BR6, CD11 is BR4 2017-03-07 09:42:37 -08:00
Mark Pizzolato
1e981e0d64 PDP11: Reworked RH to device mapping for proper static address assignment
Operating systems and boot driver code presume that each Massbus
device will always be at a specific fixed address and use a specific fixed vector.
The prior implementation assigned the first active Massbus device to RHA
and followed in order for subsequent devices.  This could leave devices at
addresses and vectors that software or boot drivers wouldn't expect.

The problem which was originally reported in #301 should now be properly
solved.  As a consequence of the need to have fixed addresses and vectors,
some combinations of devices can not coexist in a system without causing
conflicts with each other.  TM and TU have conflicting interrupts.  TM and
TS have conflicting addresses and interrupts.
2017-02-23 12:26:39 -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
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
Paul Koning
5dc6d9a487 PDP11: Add initial UC15 support from Bob Supnik
Include files I (Mark Pizzolato) missed in prior commit
2017-02-04 13:43:40 -08:00
Mark Pizzolato
d4ed9da2ff PDP11, VAX: Fix autoconfigure to properly allocate fixed vectors and addresses
Multiple devices sharing the same pool of fixed and/or vector addresses
need to properly account for earlier devices that may have already consumed
available fixed addresses or vectors.
2016-05-19 14:47:42 -07: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
cb96abef96 PDP11, VAX: Use standard error status reporting with richer message text in auto-config 2016-04-05 15:01:11 -07:00
Mark Pizzolato
b804964514 PDP11, PDP1, TX-0: Added SDL based graphics support using sim_video.
Both VT11 and VS60 properly autoconfigure on the PDP11.
PDP11 now runs Lunar Lander on all SDL supported platforms.
Reworked refresh logic to not require internal delays in the display library
2016-01-29 10:16:30 -08:00
Mark Pizzolato
32440a4138 PDP11, VAX: Fix memory leak when preparing DEC Std 144 bad block table on new disk images 2016-01-22 11:31:22 -08:00
Mark Pizzolato
3e3c05523c PDP11, VAX: Fix AutoConfigure to allow multiple dynamically configured devices to allocate from the same pool of fixed addresses.
Dynamically configured devices simulate multiple controllers with a single DEVICE structure and can have the number of controllers being simulated set by the user.  DLI, DZ, DUP, DMC, TDC, VH, DC are all dynamically configured devices.
DLI and TDC are dynamically configured devices which get static bus addresses.
2016-01-06 08:08:19 -08:00
Mark Pizzolato
6501503897 PDP11, VAX: Fix potential NULL pointer dereference in autoconfigure.
No existing simulators have device combinations that would expose this.
It is merely the right thing to do.
2016-01-05 15:32:09 -08:00
Mark Pizzolato
c5cf64c439 PDP11, VAX: Allow autoconfigure to allocate fixed address and vectors properly.
When an auto configuration table entry contains multiple devices be sure
to account for earlier devices which may be disabled while allocating fixed
address and vector values.  Examples: XQ, XQB, RB, RQB, RQC, RQD, RX, RY
This problem is discussed in #263
2016-01-05 04:05:04 -08:00
Mark Pizzolato
ab8151cdcc Compiler suggested cleanup 2015-10-15 14:19:03 -07:00
Mark Pizzolato
6bf92de3db All VAX: Also return correct Unibus/Qbus vectors for devices with more than one vector. Fix #241 2015-10-14 13:12:51 -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
9f59823ae3 PDP11, all VAX: Add TU58 device simulator with support for 32 drives plus the VAX 730 and 750 console devices 2015-09-22 15:06:12 -07:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
4ec1f7ed2b PDP11: Fix to allow allow Q18 devices to be enabled on Qbus systems with memory <= 256KB. Reported by Christian Gauger-Cosgrove.
The devices which are affected by this are: RK, HK, RM and VT.
2014-01-26 18:09:06 -08:00
Mark Pizzolato
0251c08d12 PDP11/VAX: Detect vector conflicts, SHOW IOSPACE and SHOW DEVICE improvements
From Timothe Litt:
  - Detect vector conflicts, SHOW IOSPACE
  - Detect conflicting vector assignments.
  - Correct show iospace display of high vector for multi-unit devices
  - Display vectors in DEV_RDX in show iospace
  - Ignore disabled devices when searching for conflict.
  - Improve device conflict reporting, Report both devices when address conflict is detected.

From Mark Pizzolato:
  - Added optional alternate radix output display for device address and vector values
    displayed by SHOW DEVICE.
    -H and -O switches select hex or octal output in addition to the default radix displayed
    by the normal simulator.
2013-11-22 07:03:15 -08:00
Mark Pizzolato
32b8f06362 PDP11/VAX: Properly display the device interrupt BR level for Qbus and Unibus devices in SHOW IOSPACE output 2013-11-04 12:55:08 -08:00
Mark Pizzolato
1e3586ec91 DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
Bill Heaton
99b4730dc0 Fix build warning on OS/X
PDP11/pdp11_io_lib.c: In function 'show_iospace':
PDP11/pdp11_io_lib.c:363: warning: too few arguments for format

PDP10/pdp10_lp20.c: In function 'lp20_set_vfu_type':
PDP10/pdp10_lp20.c:1038: warning: implicit declaration of function
'toupper'
PDP10/pdp10_lp20.c:1121: warning: implicit declaration of function
'isspace'
2013-09-30 12:10:11 -07:00
Mark Pizzolato
c9844951f7 PDP11/VAX: Make sure that semi-unique drive serial numbers have a zero msb to avoid issues in some operating systems. 2013-09-10 16:27:00 -07:00
Mark Pizzolato
786cda7c1b PDP11/VAX: Use semi-unique drive serial numbers when writing BAD144 bad block info to newly created disk images
The 32 bit drive serial number is determined by hashing the newly create filename.
2013-09-09 03:39:00 -07:00
Mark Pizzolato
e18d7e86e4 PDP11/VAX: Use unique drive serial numbers when writing BAD144 bad block info to newly created disk images 2013-09-08 19:42:46 -07:00
Mark Pizzolato
1141339e5b PDP11: Addition of the RS03/RS04 disk devices from Bob Supnik
Note that this is not the fully general Massbus implementation people were dreaming of. MB#1 is for RP/RM, MB#2 is for TU, and MB#3 is for RS.
I know that there were requests for four Massbus channels and multiple RP/RP subcontrollers, but if people want more disks, they can use the RQ.
2013-09-05 07:59:11 -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
Timothe Litt
4497bba48f PDP-11/VAX update: SHOW IOSPACE
Teach SHOW IOSPACE to output vector and BR addresses as well as CSR addresses.
2013-07-05 00:23:33 -04:00
Mark Pizzolato
fa0086ab74 change QVSS device to autoconfigure its vector so other autoconfigured devices get correct vector assignments when the QVSS device is enabled 2013-07-01 09:47:54 -10:00
Mark Pizzolato
b3a9a0d79c Add sim_video and VAX QVSS (VCB01) Monochrome Video Board from Matt Burke 2013-06-12 17:10:23 -07:00
Mark Pizzolato
89bd58a6fa Addition of DUP11 simulation to all Unibus simulators (PDP11, PDP10, and all Unibus VAXen) 2013-05-27 16:24:18 -07:00
Mark Pizzolato
471ea3efce Added SHOW CPU MEMORY to the MicroVAX I simulator 2013-04-05 14:52:27 -07:00
Mark Pizzolato
d65b12da84 Excape from doubly nested loop quickly for efficiency 2013-02-04 13:55:09 -08:00
Mark Pizzolato
6b4353f257 Returned the pdp11_cr device to the VAX Qbus systems and changed the pdp11_cr device to properly describe itself as a Qbus capable device when CR11 device is being simulated since it is a programmed I/O device and doesn't have bus addressing issues that DMA devices have. 2013-02-04 06:53:10 -08:00
Mark Pizzolato
8640cd6537 - Removed pdp11_cr and pdp11_ry from the Qbus VAX simulators since these devices can't address the full Q22 address range.
- Added validation checks in auto_config to reject enabled devices which aren't Q22 capable on Q22 platforms.
- Changed pdp11_cr device to be default disabled in the PDP11 simulator
2013-02-03 11:29:12 -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
411b596620 Fixed auto configure to ONLY configure Qbus and/or Unibus devices 2013-01-09 09:26:54 -08:00
Mark Pizzolato
b1d306cff8 Fixed devices missed in Auto Configuration for PDP11 simulator. CLK issue initially reported by Matt Burke 2013-01-01 05:54:53 -08:00
Mark Pizzolato
95f4a075ba Avoid attempting to auto configure NEXUS devices 2012-12-28 15:48:43 -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
9afeef6f10 Changed pdp11_dmc device names to DMC0, DMC1, DMC2 and DMC3 2012-12-19 17:45:40 -08:00
Mark Pizzolato
05707907a4 Fixed autogen table for DMC11 and DMP11 devices. 2012-11-07 15:34:45 -08:00
Mark Pizzolato
d51df0eba5 Merge of working DMC-11 device from Rob Jarratt.
pdp11_dmc.c
	- Fixed DMA bug which wrote data into the wrong simulated memory address.
	- Fixed incoming IP address checking.

pdp11_io_lib.c
	- Added the DMC device to the autoconfigure device table

vax780_defs.h
	- Added comment for DMC11
2012-11-06 17:00:54 -08:00
Mark Pizzolato
5f505ccadf Fixing many compiler identified nits. 2012-04-18 09:48:04 -07:00