Coverity flagged one magtape simulator for having fewer case breakouts
than the range of MTSE_x errors, after they were expanded for
MTSE_LEOT (listed as "V4 compatibility") and MTSE_RUNAWAY (for
Dave Bryan's implementation of erase and erase gap).
According to Dave, it turns out that MTSE_RUNAWAY can only be
returned if the magtape simulator supports and implements a density
specification and the ERASE function. The simulators Bob Supnik wrote
don't meet that criteria, so the expanded errors can't be returned.
Simply add a "default" case to the map logic returning SCPE_IERR for
unexpected cases.
Devices that do single character I/O could be attached to non seekable
host OS devices (tty, pipes, etc.) and thus shouldn't count on fseek()
and ftell(). These DEVICEs on these simulators do single character I/O
and easily can update their POS REGisters to reflect how much data has
been emitted. Changing such a REGister will have no useful effect
when attached to a non seekable file.
Historically this functionality was reimplemented within each
DEVICE simulator often with slightly different implementations
and inconsistencies. Solving this globally within SCP required
changes in many places, but should henceforth be reasonably
managed.
As discussed in #1034
- Remove unused variable assignment
- Avoid potential out of array indexing due to theoretical array
reference via signed char index. Likely non functional change.
This avoids a potential invalid pointer dereference when formatting
the return value from sim_instr() if it is < SCPE_BASE but greater
than the previously defined static array size.sizeof
Update simh.doc to reflect this generic change.
This implements the principle of "least surprise", in that users won't
normally expect to start overwriting an existing file on these devices.
Real hardware didn't behave that way. A new (empty) file can always
be created with the -N switch on the ATTACH.
Although these devices interpret a -A switch at attach time, they are not
sequential output devices and thus don't have an ambiguous interpretation
of the switch.
Incorrectly mentioned in #821
The -A attach time switch implicitly means to open files in append
mode.
Some devices used -A to indicate ASCII data or AUTOSIZE of disk or
fixed size tapes - DECtape. These devices are either read only devices
(Paper tape readers or card readers), so explicit forcing of the attach
to be -R avoids unexpected positioning errors. The random access
Disk and fixed sized tapes buffer the container contents in memory
so append mode isn't relevant, but care must be taken to assure that
the buffer reading starts at the beginning of the file without regard
to the explicit open mode.
As reported in #821
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.
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.
1. Added RP03 support and supporting "SET" commands.
2. Fixed implementation of DPCF (it's a full reset and not blocked by BUSY).
3. Fixed handling of JOB DONE flag (not touched by NOP, SEEK, or RECAL).
The terminal service (in the ISR) forces a CR to be output IMMEDIATELY (before anything in the output queue) when 0212 is seen on input, so it needs to echo as a LF.
I hadn't seen any (other) echo support, so I had assumed the interface was half-duplex, which of course means passwords would appear on the paper!
- Added unix v0 terminal support
- Added 3-cycle databreak set/show entries
- Revised for dynamically allocated memory
- Added support for -u modifier (UC15 and Unix v0)
These changes are to support the Unix v0 bringup and to implement a
"Unix input" mode on the console terminal. In Unix mode, CR and LF are
swapped (so that a modern terminal can use 'enter' instead of CTRK-J to
create the newline Unix expects), escape is mapped to altmode (175),
upper and lower case are enabled and the parity bit is forced to 1. This
most closely matches the characteristics of the KSR-37, but there is no
definitive evidence of the terminal that was actually used.
This merges the latest PDP18B changes from Bob Supnik:
- It adds the RB disk to the PDP-7 and the drum (DRM) to the PDP-9, per the
discoveries in the 18b services listing.
- It tweaks the switches for examine and deposit to support Unix v0 and
(eventually) the Unichannel.