Declare output unit to facilitate proper character output completion
scheduling.
Proper completion scheduling removes the need to sleeping waiting for
character I/O completion.
This should fix#521 and #504
For the PDP11, this includes deferring the setting of DONE on an error, allowing RSTS V4 to work correctly.
There was a minor (possibly only theoretical) bug in dt_seterr as well.
dt_seterr is supposed to stop the drive. If the drive is accelerating, at
speed, or stopped, it works fine. But if the drive is decelerating, it did
not clear out the "successor" states. In theory, the drive could be in the
middle of reversing - that is, there are successor states of accelerating
(in reverse) and at speed. So the successor states need to be cleared,
or the drive won't actually stop.
The fifth DECtape controller (the PDP8's TD8E) is much simpler and
doesn't have the problem.
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.
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.
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.