There are a lot of niggling fixes, mostly for incompatibility issues
found by Walter Mueller. Working out the 11/70 behavior is still not
fully done, but it's a lot better than it was, and it passes more of the
11/70 MMU diagnostic.
- Floating point. Now model sensitive in treating MMR1, for 2.11 BSD.
- MMR1 now tracks PC changes on 11/44, 11/45, 11/70, and J11 -(PC) and @-(PC).
- MMR1 is cleared at start of trap sequence on 11/45, 11/70.
- Red stack abort occurs before memory writes on 11/45, 11/70 (no other model has them).
There are 3 variations of RH11:
- 11/70 Massbus adapter AKA RH70.
- All other PDP11 systems had a Massbus adapter known as the RH11.
- Qbus PDP11 systems had a Massbus adapter known as a RH70 emulator.
The code in 3.12-2 is only part of a complete solution and thus merely
hangs the device/processor.
The reverted version wouldn't normally have the problem since the
normally partial code was trying to fix since I/O completion happens
right in dz_wr(). However, the "complete it immediately" model could
logically lose data if the sending side were driven harder than the TMXR
TCP transport was able to deliver data to the TCP session. The easiest
answer is to revert to the earlier v3 DZ code since at least that worked
almost all of the time.
The right answer would be to only signal the transmit completion
interrupt if the transmit didn't end up getting buffered and if it did
get buffered (and not successfully flushed), then schedule a separate
unit to retry the pending output until it actually made it to the TCP
wire. That separate unit would then signal the interrupt for the line
indicated in the CSR and mark CSR_TRDY.
This is more change to realize relatively little value so simply revert
and be done.
- Correct RBUF_GETLINE & RBUF_PUTLINE: these are both sensitive to
modeling DHU vs. DHV; the correct bit mask was not generated for DHU.
- Make certain the device presents 16 lines when modeling a DHU.
- In vh_reset(), make certain the number of lines makes sense in the
context of the current bus and adjust if not appropriate; mark each
unit correctly for DHU vs. DHV; mark each unit enabled or disabled as
appropriate; reset the vector length; reset the number of units.
- Retrofit updates from V4 SIMH: (Mark Pizzolato)
- VH_LINES must be set according to the bus type (Unibus: 16,
Qbus: 8).
- Define VH_LINES_ALLOC at 16 lines/unit to reserve the maximum space
for lines.
- SET VH LINES=n is now sensitive to mode; appropriate values are
DHV: 8, 16, 24, 32; DHU: 16, 32, 48, 64
- In fifo_get(), sense immediately when the FIFO empties, rather
than the next time through.
- In vh_setnl(), call vh_reset () to adjust the state of the units
and lines, and invoke auto_config().
3.10 is mostly an attempt to get aligned with the current head of the
GitHub 4.0 sources. While the core libraries and SCP have diverged too
far for real forward and backward compatibility, enough 4.0 workalikes
have been added to allow much closer convergence of the two streams.
3.10 will provide the basis for my future simulation work.
3.10 is mostly an attempt to get aligned with the current head of the
GitHub 4.0 sources. While the core libraries and SCP have diverged too
far for real forward and backward compatibility, enough 4.0 workalikes
have been added to allow much closer convergence of the two streams.
3.10 will provide the basis for my future simulation work.
The code wasn't handling interrupts correctly when TCCM was written. In
particular, if the GO bit clears DONE, the code looked for the "SET IE" case
too soon and didn't clear the interrupt that was incorrectly generated.
The new code factors "GO" into the calculation.
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.
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.