1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

76 Commits

Author SHA1 Message Date
Peter Kooiman
ef8f4f53a2 simulators with global variables PC, SP and BC: Avoid name space collisions.
Avoid potential name space collision for the global variables PC, SP and BC
when readline is dynamically loaded.  For some unknown reason, ncurses
exports these internal variables which may be needed in the context of
how ncurses is used by readline implementations.  In any case, these
variable names are common in simulators, so there is an undesired
interaction between simulator internal variables and the simplest
solution is to rename these simulator global variables where they exist.
Another alternative is to merely declare these variables static when
they happen to only be referenced in a single simulator source module.
2025-04-09 13:56:27 -10:00
ken rector
389a8ade1f sigma: implement attention interrupt to sigma)mt.c 2025-01-30 12:24:29 -08:00
ken rector
0799544312 sigma: return corrrect CC on line disconnect 2024-10-25 17:24:02 -07:00
Ken Rector
5421c9c22e sigma: Update latest from Bob Supnik's v3.12-5
- Add new CP and CR devices
- COC: Zero delay from SIO to INIT state Detect and UEN on 0xFF order
- COC: Moved SIO int pending test to devices
- DK: Zero delay from SIO to INIT state
- DP: Added case points for RDEES, dp_aio_status
- DP: Zero delay from SIO to INIT state
 - defs:  Added chaining modifier flag
 - defs:  Fixed DVT_NODEV definition
 - defs:  Added chan_chk_dvi definition
 - io: Added chaining modifier flag
- LP: Zero delay from SIO to INIT state
- LP: Added INIT test for illegal command
- LP: Moved SIO interrupt test to devices
- MT: Zero delay from SIO to INIT state
- PT: Zero delay from SIO to INIT state
- PT: Moved SIO interrupt test to devices
- RAD: Zero delay from SIO to INIT state
- RAD: Fixed nx unit test
- RAD: Fixed write protect test
- TT: Zero delay from SIO to INIT state
- TT: Moved SIO int pending test to devices
2024-07-29 10:10:17 -10:00
ken rector
4692068925 sigma: Implement CM (Chaining Modifier) flag to IOP simulation in sigma_io.c 2024-03-27 21:29:23 -07:00
ken rector
93fe10c1e2 SIGMA: 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-20 09:13:38 -10:00
Mark Pizzolato
6d376b2fd9 ALL simulators with instruction history support: Minor history enhancements
- Issue reasonable error message explaining invalid SET CPU HISTORY=n input
- Let SIGINT (^C) abort SHOW HISTORY output
2023-12-04 10:57:31 -10:00
ken rector
c331284b7c sigma: Correct DP Sense Length error(Bob Supnick) 2023-06-27 11:37:45 -10:00
Bob Supnik
399e0f99d9 sigma: add wait code to WAIT instruction 2023-05-10 14:53:33 -10:00
ken rector
412838b264 sigma_rad:fix wp test in sense and write op 2023-05-03 17:44:18 -07:00
ken rector
b090c47be0 sigma: MT: AIO must mask unit number before calling TDV status. 2023-04-04 15:34:36 -07:00
ken rector
498aedefd5 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-21 17:13:26 -07:00
ken rector
929c8f68dc sigma: COC device, committed two fixes for sigma_coc.c.
sigma: COC device, add LNORDER command option
sigma: COC device, handle transmit long, stop transmit and receive break
2023-03-20 08:57:38 -10:00
Ken Rector
d6fad5d975 sigma: Invalid address must set a TDV-visible error flag on DP Device 2022-12-12 09:27:51 -10:00
Bob Supnik
f6c388c30d sigma: COC device, add LNORDER command option 2022-09-04 17:58:16 -06:00
Ken Rector
eedda918bf sigma: COC device, handle transmit long, stop transmit and receive break 2022-09-04 17:56:46 -06:00
Ken Rector
1010693601 sigma: DP device SEEK(I), RECAL(I) must be coded as fast operations. 2022-07-23 16:55:21 -07:00
Ken Rector
761aef068f sigma: UEND flag in the wrong bit position in channel status word. 2022-07-23 16:54:19 -07:00
Ken Rector
db297f308b 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
Bob Supnik
ba0f6f262e sigma: Made CHANA chan_ctl_time accessible as a register 2022-07-23 16:46:55 -07:00
Bob Supnik
6230d00288 sigma: Added IO numeric channel numbers to SET/SHOW 2022-07-23 16:45:43 -07:00
Ken Rector
b814b50088 sigma: Clean compiler warning 2022-07-23 06:43:20 -10:00
Ken Rector
d406b7771a sigma: Fix breakpoint state restore 2022-07-12 13:54:58 -07:00
Ken Rector
cfce67f702 sigma: Fix dangling else in IO read/write direct 2022-07-12 13:53:32 -07:00
Bob Supnik
9291318e63 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
2eaf9eb988 sigma: Use 2 digit years in dates more consistently in top comments 2022-07-07 05:42:33 -10:00
Bob Supnik
ffc71c5315 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
Ken Rector
a648b8a730 sigma: DP device fixes
- TIO status routine always returns DVS_AUTO instead of proper status.
- DP_SEEK definition is off by 1.
- reset does not properly initialize controller, seek threads.
2022-06-29 08:07:10 -10:00
Bob Supnik
a1aa65ee7c sigma: Cleanup comment 2022-06-29 08:02:59 -10:00
Bob Supnik
d35f4d9695 All LP and CD devices: Removed use of ftell for pipe compatibility
Merge changes from v3.12-2
2022-06-16 16:13:46 -07:00
Bob Supnik
1182157a4d 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
a14ace6fd2 SIGMA: Restore prior DP device Coverity silencing change 2022-06-15 15:51:18 -07:00
Bob Supnik
865992670d SIGMA: Fixed DPA, DPB missing loop increment in TDV (Ken Rector) 2022-06-06 13:03:26 -07:00
Mark Pizzolato
6c16052184 SIGMA: Avoid Coverity mag tape warning 2022-03-13 12:40:16 -07:00
Mark Pizzolato
68e407ba0f ALL: Correct help text in "SET <unit> LOCKED" MTAB entries 2021-04-19 15:22:15 -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
0c782d2041 sigma: Compiler warning cleanup
- Fix static structure initialization
- Fix inconsistent statement indentations.
- Avoid potential out of array indexing due to theoretical array
  reference via signed char index.  Likely non functional change.
2020-10-19 12:29:39 -07:00
Mark Pizzolato
ae825c9afb All: Declare sim_stop_messages as an array SCPE_BASE long
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.
2020-09-02 15:56:07 -07: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
Mark Pizzolato
cfbd76e011 BESM6, NOVA, ECLIPSE, SIGMA: Set DEVICE type to DEV_MUX in MUX devices
Removed deprecated DEV_NET
2020-03-31 08:59:50 -07:00
Mark Pizzolato
fc785ab5f9 sigma: Fix Coverity identified warning 2019-11-14 21:37:44 -08:00
Bob Supnik
37533d7891 Sigma: Fix spelling in comment 2019-04-15 21:55:46 -07:00
Bob Supnik
54516bb175 sigma: New simulator (from beta) 2018-06-03 17:37:24 -07:00
Mark Pizzolato
a92dc610a4 alpha, pdp18b, PDP8, sigma: removed stray tabs which crept in over time. 2018-04-01 14:22:30 -07:00
Mark Pizzolato
b7b1f427d0 I1401, I7094, ID16, ID32, NOVA, SDS, SIGMA: CONST compatibility with 3.10 2018-03-09 15:55:22 -08:00
Bob Supnik
0cc2a469b2 sigma: Add "Sigma 7 BigMem" as a model variant
BigMem is a Sigma 9 memory management retrofit to the Sigma 7.
2017-03-20 08:02:57 -07:00
Bob Supnik
c26c6ea501 NOVA, PDP1,, sigma: Various cosmetic/typo changes 2017-03-20 08:01:58 -07:00
Mark Pizzolato
1cd11f3464 sigma: Added missing CONST to fix broken build 2017-03-14 21:44:14 -07:00
Bob Supnik
0c03efb560 sigma: Fix Coverity identified problems
CIS:   Properly clear sign
DP:   Fixed bug in selecting 3281 unit F
RTC: Fixed bugs in set, show_tps
2017-03-14 04:46:42 -07:00