Commit graph

22 commits

Author SHA1 Message Date
ken rector
ffe537a621 Fix three kinds of error in I/O modules. Discovered while getting standalone System Exerciser to run.
IO: DVT_NOTDEV macro incorrect, Device mapping algorithm creates false dispatch points.
This mapped Multi Unit Controller and Single Unit Controller to same device.
DP, DP, MT, RAD:  Test for non-existent device returns wrong status.
DP, DK, MT: TIO status should return non-operational for unattached device.
2024-03-15 13:39:45 -04:00
ken rector
c654c20c49 sigma: MT: AIO must mask unit number before calling TDV status. 2023-04-05 16:32:23 -04:00
ken rector
869dc0fe4a sigma: Correct recognition of pending DP seek interrupt.
This corrects an error that caused SIO reject when SIO occured before
a pending seek interrupt on a different device.
 - Move the interrupt pending test from sigma_io.c into each device.
 - Make the sigma_dp.c test a special case that looks for pending
   seek interrupts.
2023-03-29 10:10:14 -04:00
Ken Rector
6b544073ae sigma: Fix MT tape mark error handling
revised error handling failed to set tape mark status on space file
forward/reverse.
2022-07-23 16:52:50 -07:00
Ken Rector
59ddf72b52 sigma: Clean compiler warning 2022-07-23 06:43:20 -10:00
Bob Supnik
adfcff49b7 sigma: Fix error handling in MT device channel errors
Ken's last note led me to look at magtape error handling, and it was
not right. This has resulted in a lot of code changes in sigma_mt.c, but
the changes are mostly mechanical. Instead of trying to be clever and
do channel handling in mt_map_err or at the bottom of the mt_svc
routine, every magtape command now does its own error handling.
This makes the code repetitive, but I hope it is much clearer as a result.
2022-07-07 05:46:32 -10:00
Bob Supnik
fa0c561c28 sigma: Use 2 digit years in dates more consistently in top comments 2022-07-07 05:42:33 -10:00
Bob Supnik
9258e25c0d sigma: Fixed bugs in multi-unit operation
The problems all stem from a single root cause: when an interrupt is
requested - via any one of dozens of mechanisms (uend, normal end,
special request, error, etc), the interrupt routine must be presented
with the full device address, including the unit, which is stored in the
channel data structures. This is so that AIO (acknowledge interrupt)
can retrieve the unit number from the channel data structures and
give it back to the invoking program.

Unfortunately, service routines, error routines, etc were simply using
the base device address, which is good enough for all channel operations
EXCEPT AIO. So the four multi-unit device (RAD, DK, DP, MT) have had
changes to reconstruct the full device address, with unit number, before
any calls into the channel are made.

DP, funnily enough, required the fewest changes. Ken was exactly right
about the need to OR the unit number into dva at the start of the unit
service routine. That had to be done in a few more places where my code
was being lazy.

RAD, DK, MT required many more changes, but they were mostly mechanical.
All references to xx_dib.dva had to be examined and replaced with a full
device address. The full device address had to be reconstructed from the
UNIT pointer and the base device address, through the magic of pointer
arithmetic.

Another sore spot was HIO. HIO stops all the active unit in its tracks
and does a channel UEND on it. The calculation of the unit number in the
UEND was not correct in a few places, notably if DP did a controller reset.

Fixes for the four modules; an updated bug history; and an expanded
design document; are attached.
2022-07-03 13:56:46 -07:00
Bob Supnik
8d49d8c297 All Tape DEVICES: Added extra case points for new MTSE definitions
Merge changes from v3.12-2
2022-06-16 16:13:46 -07:00
Mark Pizzolato
6c16052184 SIGMA: Avoid Coverity mag tape warning 2022-03-13 12:40:16 -07:00
Mark Pizzolato
a015e44c10 ALL: Standardize writelock behavior adding global UNIT_WLK & UNIT_WPRT
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
2021-04-19 10:58:51 -07:00
Lars Brinkhoff
d5befa75c1 I650, IBM1130, PDP11, PDP18b, VAX, Sigma: Fix set but unused variables. 2020-12-02 14:45:21 -08:00
Mark Pizzolato
f9883668f1 NOVA, ECLIPSE, PDP11, PDP8, SIGMA, Unibus VAXen: Call tape detach API on unload 2020-04-04 09:49:15 -07:00
Bob Supnik
54516bb175 sigma: New simulator (from beta) 2018-06-03 17:37:24 -07:00
Bob Supnik
fa62a00fd0 GRI, H316, I7094, NOVA, SDS, sigma: Annotate switch case fall through (COVERITY) 2017-03-13 10:44:51 -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
a7da3c6f54 SIGMA: Merge updates from Bob Supnik 2015-04-04 09:26:23 -07:00
Mark Pizzolato
66dba79418 ALPHA, ALTAIR, AltairZ80, I7094, NOVA, PDP1, PDP10, PDP11, PDP18B, PDP8, SAGE, sigma, swtp6800, TX-0, VAX: Change tabs to spaces which had crept in over time 2015-03-30 10:24:24 -07:00
Mark Pizzolato
c1c5535d0b sigma: Fix shutdown/detach issue with tape devices.
Also add makefile and Visual Studio Project definitions to build the incomplete/unsupported sigma and alpha simulators.
2014-07-10 14:57:18 -07:00
Mark Pizzolato
7b6f7a9871 Set device flags indicating DEV_DISK, DEV_TAPE, DEV_MUX and DEV_ETHER for all simulator devices which use the sim_disk, sim_tape, sim_tmxr, and sim_ether libraries 2013-01-07 12:47:24 -08:00
Mark Pizzolato
a3b0dc38fd Change the semantics of sim_is_active to return a t_bool (which was 98% of how it was used), and added new sim_activate_time to return the time a unit will be activated (the value previously returned). This affected a handful of used of sim_is_active in device implementations which were adjusted to use the sim_activate_time API. 2012-12-12 11:01:00 -08:00
Mark Pizzolato
fffad7c20e Merge changes from v3.9-0 rc1 2012-03-19 16:05:24 -07:00