Commit graph

410 commits

Author SHA1 Message Date
Mark Pizzolato
0a0bad9139 PDP11: TC11 - Revised to model TCCM correctly
As reported by Josh Dersch in #358

   Read hardware notes:

   - While the TCCM error bit is a real flop, it is supposed to reflect
     the OR of the TCST error bits at all time, so it is updated on read.
   - A read of TCDT while the function is RALL clears DONE.

Write hardware notes:

   - The TC11 behaves much more like a traditional DECtape controller
     than a typical PDP11 peripheral. In particular, execution is
     initiated/controlled by any write to TCCM, rather than setting
     the GO (DO) bit. Unless the function is STOP or STOP ALL, writing
     TCCM will put the selected tape in motion.
   - Writing GO (DO) clears DONE (READY) and the error flops in TCST.
   - Writing a 0 to ERROR clears the error flops in TCST. Because it
     is write 0 to clear (later controllers used write 1 to clear),
     the simulator has to know whether ERROR is actually written.
   - STOP ALL ignores select errors. Every other function is rejected
     if there is a select error.
   - An illegal operation (setting ILO) will stop the selected tape.
   - A write of TCDT while the function is RALL, WALL, or WTMK clears
     DONE (READY). RALL should not be included, but it saved a gate
     not to prevent it.
   - Because DONE (READY) may not be clear when an operation completes
     and DONE (READY) is set, the DT_SETDONE must test for DONE (READY)
     not being already set.
2016-12-04 11:09:55 -08:00
Mark Pizzolato
cf1e7b9cca SCP, PDP11: Added HELP CPU BREAK to display info about breakpoint types 2016-10-06 13:25:54 -07:00
Mark Pizzolato
da3f5359bb VAX, PDP11, PDP8, PDP1: Properly declare timer with clock unit 2016-09-26 15:55:50 -07:00
Paul Koning
89ffed467f PDP11: Add new breakpoint types for data and physical address
Add support for physical and virtual address variants for the existing
instruction (PC) breakpoint, and add memory read and memory write
breakpoints.
2016-09-13 15:22:35 -04:00
Mark Pizzolato
8eb36720bc PDP11: Fix ambiguous -D decimal vs data space reference - Add -T for data 2016-08-30 13:10:56 -07:00
Paul Koning
223f080724 PDP10, PDP11, VAX: Make DMC/DMR initialization more accurate.
These changes cure a number of issues in RSTS/E, which is more
sensitive to details of emulation than most:

1. Additional KMC opcodes supported for ROMI
2. MCLR now initializes the CSRs per the spec
3. MCLR and ROMI are processed immediately at CSR write rather than
   being deferred, because these actions are implemented in the device
   hardware rather than in the microprogram.
2016-08-29 10:43:50 -04:00
Mark Pizzolato
f48d1f418d PDP11: Add ability to explicitly set the interrupt vector for the TS device 2016-08-28 13:55:53 -07:00
Mark Pizzolato
0352e0fd7b PDP11: Move history entry pointer initialization out of instruction loop.
This will be slightly more efficient for the normal case where history isn't
being recorded.
2016-08-25 14:28:38 -07:00
Paul Koning
66fb70b768 PDP11: Record the actual source and destination values for history.
Previously, the history would always use a register value as source or
destination as if the mode were zero, even when it wasn't.  Also, now
the destination value reflects the destination after instruction
execution rather than before.
2016-08-25 14:28:38 -07:00
Mark Pizzolato
e2a8f0fcdc PDP11: Fixed NEXT command to work when the MMU is enabled 2016-08-24 21:19:09 -07:00
Mark Pizzolato
fa232c0dd3 PDP11: KG11 Fix register names and make units enable status consistent 2016-08-24 15:03:06 -07:00
Mark Pizzolato
3571d83c7b PDP11: Fix KG11 address range when less than 8 units are configured 2016-08-24 14:05:58 -07:00
Mark Pizzolato
25b9fc22dc PDP11: Reworked PCLK device to minimize scheduled events
Rather than use a simh event to increment/decrement the counter register
for each 'clock cycle', compute the time the interrupt will eventually fire
and schedule a single event to deal with that.  If the clock counter is
referenced before the interrupt fires, interpolate the value based on the
number of instructions that have actually been executed.

sim_activate_after() is used here, and the time value for the scheduled
activation is a uint32 representing microseconds.  The range of values
that the PCLK can programmatically specify could be large enough
to exceed an uint32 when number of microseconds is converted to
a count of instructions.  This is an issue that has minimal consequences,
but should be addressed internal to the implementation of
sim_activate_after().
2016-08-18 13:40:23 -07:00
Mark Pizzolato
acaf118cf7 PDP11: Add display of the programmed clock frequency, use calibrated delays 2016-08-18 08:00:41 -07:00
Mark Pizzolato
8bc31af29c PDP11, VAX: Allow Ethernet SET MAC arguments to have upper/lowe case values 2016-05-24 11:58:58 -07:00
Mark Pizzolato
ae6f3b97e4 PDP11, VAX: Use generated unique default MAC addresses for Ethernet devices 2016-05-24 08:47:01 -07:00
Mark Pizzolato
2d907980f1 ETHER: Add support for generated interface MAC addresses
sim> SET XQ MAC=aa:bb:cc:dd:ee:ff{/bits}{>filespec}

where:

- all of the aa:bb:cc:dd:ee:ff values must be hex digits
- bits is the number of bits which are to be taken from the supplied
   MAC aa:bb:cc:dd:ee:ff with legal values from 16 to 48 and a default
   of 48 bits.
- filespec specifies a file which contains the MAC address to be used
   and if it doesn't exist an appropriate generated address will be stored
   in this file and a subsequent SET MAC invocation specifying the same
   file will use the value stored in the file rather than generating a new
   MAC.

As discussed in #317
2016-05-23 16:56:06 -07: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
e70606c75b PDP11, all VAX: Fix handling of TU58 initialization command.
The processing of initialization commands improperly attempted to initialize
all controllers AND these attempts (for controllers beyond 0) referenced
beyond the bounds of the unit array.  This problem was reported in issue #309
2016-05-13 11:43:09 -07:00
Mark Pizzolato
7bd58c6d7f PDP11, VAX8600, VAX780, VAX750: Fix prior Massbus auto configure.
As discussed in #307
2016-05-09 10:40:58 -07:00
Mark Pizzolato
1af590d806 PDP11, VAX8600, VAX780, VAX750: Fix to auto configure Massbus adapters
When a mix of Massbus devices are configured with some enabled and
others disabled, the MBA's need to be allocated and properly configured
in the desired preferred order (RP, TU, RS).  On the PDP11, this interacts
with auto-configure since the RH devices are visible in the Unibus I/O
page.  On the PDP11 the second Massbus device can only be configured
if the TM device is disabled since the auto-configure assigned vectors
overlap for RHB and TM.

Problem originally reported in #301.
2016-05-07 15:17:24 -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
9bfdc1fb42 PDP11, VAX: Add XQ device delay to receive processing for loopback and setup packets 2016-04-05 05:21:04 -07:00
Mark Pizzolato
35180aabb0 PDP11, VAX: Fix DELQA device identity sensing (DEQNA & LockMode) 2016-04-05 05:17:51 -07:00
Mark Pizzolato
488e747886 PDP11, VAX: Assure that DMA output to non-connected lines completes normally
Also make all scheduled timing behaviors consistent and not performed by
the input polling unit which may have different scheduling characteristics
to reflect input speed rate limiting.
2016-03-30 09:59:09 -07:00
Mark Pizzolato
bcf6e288b2 PDP11, DH11, DHU11: Fix startup initialization delay in DHU mode
Excessive delay would be reported on Ultrix as:

     "Warning: DHU device failed to exit self-test"

As discussed in #296
2016-03-29 17:22:55 -07:00
Mark Pizzolato
2b155ba29d VAX780, VAX750, VAX730, VAX8600: Add TC11/TU56 (DECtape) device to Unibus VAX simulators
VMS Driver and support files for the TC11 should be available at
http://bitsavers.org/bits/DEC/vax/vms/dkdriver_vms.zip
2016-03-27 12:28:02 -07:00
Mark Pizzolato
b9c43e7eec PDP11: Fix compiler warnings due to recent Xcode version change on OS X 2016-03-25 17:45:20 -07:00
Mark Pizzolato
bfe87ed1c5 VAX780, VAX750, VAX730, VAX8600: Add TC11/TU56 (DECtape) device to Unibus VAX simulators 2016-03-25 04:01:44 -07:00
Mark Pizzolato
329f42a1fc SCP: Rework newly added REG macro definitions to avoid problems with prior declarations
Fix #288
2016-03-16 20:33:41 -07:00
Mark Pizzolato
6fab4cd72c PDP11: Fix TU58 boot and unimplemented commands from Don North
As discussed in #285 and #287
2016-03-16 08:41:51 -07:00
Mark Pizzolato
72d4e73024 VAX, PDP11: Correct TU58 register declarations
Use REG_STRUCT register flag via the SRDATAD and SRDATADF macros to
reference per controller data structures in the CTLR structure.

Fix #286
2016-03-14 15:20:13 -07:00
Mark Pizzolato
71e745b0c8 PDP11: Fixed bug in history virtual addressing (Bob Supnik)
The problem has to do with the difference in how the PSW is stored when
the simulator is running (it's all in pieces) or stopped (it's collected in PSW).
cpu_ex is a console routine and expects the PSW to be stored in PSW, but
when history is collected, it's not. In particular, cm (current mode) is in local
variable cm.

cpu_ex with /v calls relocC, which derives the current mode from the
switches:

- if /ksup, use kernel/supervisor/user/previous mode (from PSW); otherwise,
   use current mode from PSW
- if /d, use data space; otherwise, use instruction space

relocC is doing current mode i-space, which is what's wanted... except that
it's deriving current mode from PSW, rather than cm, which is where it's stored
while the simulator is running. It's fairly likely that PSW is long obsolete by the
time the history is invoked.
2016-03-06 06:27:15 -08:00
Mark Pizzolato
9a7c46f59e PDP11, VAX: Fix DEUNA/DELUA receive descriptor message size indicator.
When packets arrive which require multiple receive buffers to deliver, the
full packet size is reported in the MLEN field of the final receive descriptor
used (the one with the ENF bit set).  Previously, correct behavior only
happened when the full packet fit into a single receive buffer.  This problem
was reported and the detail identified by Johnny Billquist.
2016-02-25 08:58:02 -08:00
Mark Pizzolato
4dfbb98946 PDP11, VAX: Add detailed receive descriptor list usage debug information. 2016-02-24 09:02:17 -08:00
Mark Pizzolato
4d51d63ae4 PDP11, VAX: Fix XQ device identification probe logic.
Device probe logic when running VAXELN was unable to correctly initialize
the XQ device when it was set to be a DELQA or DELQA-T, but worked when
it was a DEQNA or a DELQA/DELQA-T in DEQNALock mode.  Problem
initially reported in #271
2016-02-06 06:58:57 -08:00
Mark Pizzolato
f03bae6cb6 PDP11, VAX: Add better debug output of loopback packets. 2016-02-04 10:38:31 -08: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
a9cc1f1c68 PDP11, VAX: Provide a useful error message when the unimplemented DUMP command is attempted. 2016-01-25 16:21:54 -08:00
Mark Pizzolato
c8c071e3e1 PDP11: Fix DL11 & TU58 autoconfigure limitation checks 2016-01-25 07:03: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
e7d379a862 PDP11, VAX: Remove UNIT_DISABLE from the XQ and XU UNIT definitions since the devices and not the units can be disabled. 2016-01-21 11:44:56 -08:00
Mark Pizzolato
2459a4c697 PDP11, VAX: Add logic to receive buffer descriptor processing to avoid list overrun.
If a driver sets up a receive buffer descriptor list as a circular ring, the
potential exists for a burst of arriving packets to wrap around the receive
buffer ring in a single round of input processing.  This is avoided by
stopping list processing when a full circle has been observed.

Additionally, debug output has been added to display issues while
processing both the receive buffer descriptor list and the transmit buffer
descriptor list.  The debug bit names are RBDL and XBDL respectively.
2016-01-20 11:13:28 -08:00
Mark Pizzolato
3a88a1d812 PDP11, VAX: Fix compiler warnings about quotes in #if 0 #endif block 2016-01-20 10:51:01 -08: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
746c4fdc15 PDP11, VAX: Rework receive descriptor list processing and PDP11 Boot.
PDP11 network boot ROM of the DEQNA, DELQA, and DELQA-T along with
the MicroVAX I ROM boot each expect particular behavior from the XQ
device.  Prior efforts to get the PDP11 boot working added several device
specific complications to the receive buffer processing.  These are now
simplified.  Meanwhile, the generic device 'work alike' boot process has
been implemented to provide an XQ (device independent) primary
loader which extracts the first 512 bytes of the device internal boot
ROM and passes control to it for a complete boot.
2016-01-18 17:47:00 -08:00
Mark Pizzolato
e054a78398 PDP11: Add descriptions to register names and bitfields to the PSW register. 2016-01-18 07:02:06 -08:00
Mark Pizzolato
6210ba2059 PDP11: Add BOOT ability to the VT device to run the Lunar Lander program 2016-01-10 17:35:18 -08:00
Mark Pizzolato
542b2cbf08 PDP11: Enhance LOAD command to be able to load from an in host memory image. 2016-01-10 17:26:47 -08:00