Commit graph

119 commits

Author SHA1 Message Date
Rick Murphy
030a47bdb4 PDP8: Fix crash when using EP multiply
When performing floating point multiplication, the prior code overwrote
an additional word of the floating point fraction with zeros. This is
harmless with standard FP, as the floating variables always have space
for EP-length vars. When doing an EP multiply, this causes a word on
the stack to be zeroed. For the latest Raspbian release, this causes a
segfault as there's no padding past that var on the stack.

This fix, which has been tested against the original crashing code plus
validated using the FPP-8 diagnostics, avoids the overwrite.
2022-01-06 18:53:03 -08:00
Bob Supnik
89cd2d458f PDP8: Fix device conflict warnings to report problems correctly
As reported in #1084
2021-10-23 15:09:10 -07:00
Mark Pizzolato
e519c93ebf H316, NOVA, PDP11, PDP8, PDP18B, KX10: Record Sequential updates consistently
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.
2021-06-08 14:25:23 -07:00
Bob Supnik
d0426631d6 PDP8: Fixed RF/DF and LP decoding
As reported in #1045
2021-06-07 23:16:53 -07:00
Bob Supnik
2c2f47af06 PDP8, PDP18b: Fixed RF, DF, DT device bug if read overwrites WC memory location
As reported id #1023
2021-06-07 23:15:05 -07:00
Bob Supnik
2d20bc9d63 PDP8: Added diagnostic mode for TSS/8 2021-06-07 21:35:31 -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
9f9a88abf2 PDP8: Silence clang warning in loader logic 2021-04-19 10:59:14 -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
Mark Pizzolato
c496d53844 PDP8: Extend LOAD logic to advise about additional loadable binary content
- As discussed in #1017
- Additionally, fix binary read of rubout characters to ignore diagnostic
  messages
2021-03-05 08:11:07 -08:00
Mark Pizzolato
4d923dbccf PDP8: Compiler warning cleanup
- Initialize local state variables to 0.  Likely non functional changes due
  to lack of depth in static analysis scan.  Coverity detects real problems
  like this.
- Fix inconsistent statement indentation.
2020-10-19 12:30:10 -07:00
Bob Supnik
6e7d808bb5 PDP8: Fixed comments in DT device bootstrap 2020-09-15 14:38:45 -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
0045601823 PDP11, PDP8: Allow console input to configure parity and KSR mode 2020-07-24 19:05:04 -07:00
Mark Pizzolato
4a56d8703c PDP8: Avoid potential loss of photo cell unit events in RF device 2020-07-19 06:20:29 -07:00
Mark Pizzolato
798389428c PDP8: Report unimplemented DUMP command and give suggestion
As discussed in #852
2020-06-02 10:31:20 -07:00
Bob Supnik
0e95c3e666 PDP8: Correct comments attributing Bernhard Baehr's description of the TSC8-75 2020-05-29 09:14:49 -07:00
Mark Pizzolato
323cd48244 PDP8: Open LPT, PTP devices for append
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.
2020-04-30 05:08:29 -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
27c2dfa8f0 All DECtape devices: Undo previous unnecessary change relating to -A switch
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
2020-03-24 08:35:55 -07:00
Mark Pizzolato
1c589030ae TIMER: Provide a means for VM to indicate its expected calibration rate
As reported and discussed in #817

This allows RUNLIMIT to provide useful results on fast or slow host systems.
2020-03-23 07:48:45 -07:00
Mark Pizzolato
614ad52091 All: Fix devices that attach files and have special meaning for -A switch
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
2020-03-22 09:54:54 -07:00
Mark Pizzolato
ee317e0cb4 SCP: Adjust RUNLIMIT time values on slow host systems
As reported and discussed in #819
2020-03-21 21:30:58 -07:00
Mats Engstrom
eef738e7fb Fix prematurely stopped diag test 2020-01-20 11:54:59 +01:00
Mark Pizzolato
68cfea6a71 PDP8: A 2 minute execution limit to diagnostic tests 2020-01-09 02:49:22 -08:00
B. Scott Michel
89a9414aeb PDP8: Add initial round of PDP-8 system diags 2020-01-01 16:03:54 -08:00
Mark Pizzolato
281837c68a PDP11, PDP8, VAX8200: Fix Coverity flagged warnings 2019-10-20 22:57:02 -07:00
Mark Pizzolato
f75f28aa21 TIMER: Add mechanism to pre-calibrate the instruction execution rate 2019-05-28 23:56:58 -07:00
Mark Pizzolato
880c8a89b7 PDP11, PDP18b, PDP8, VAX750, SCP: Silence Coverity identified complaints 2019-02-20 08:32:37 -08:00
Mark Pizzolato
6fa8f6012c PDP8: Add device descriptions to all devices 2018-12-15 12:55:54 -08:00
Mark Pizzolato
a92dc610a4 alpha, pdp18b, PDP8, sigma: removed stray tabs which crept in over time. 2018-04-01 14:22:30 -07:00
Bob Supnik
e270da1530 GRI, PDP11, PDP8, VAX: Misc formatting and typo cleanups 2018-03-09 14:04:19 -08:00
Bob Supnik
5b5e0f9c35 H316, I7094, NOVA, PDP1, PDP10, PDP8, SDS: Coverity singleton errors
Most history routines defined a local sim_eval of the proper length, but the
erroneous ones were fixed length machines that defined an integer variable
instead of an integer array of length 1. The VAX used the global sim_eval.
The changes follow the VAX practice.
2017-09-07 09:59:04 -07:00
Bob Supnik
c97f466457 PDP8: Annotate fall through paths in switch statements
The code is a bit difficult to understand, but it represents the 'normal'
path for processing a DECtape word. The code always flows all the
way to the break.

For start of block, there's extra code to check for a timing error; but
then the first word is processed (case 0).

For a normal word, a 3-cycle data break is done - increment word
count and current address, check for word count overflow, put the
word in the buffer; but then check for end of block (case DTO_WCO).

If the word count has already overflowed,  just check for end of block.

So yes, the end of case 0 should be labeled 'fall through' as well.

FNC_WRIT has the same structure and needs the same comment.
2017-03-30 07:12:57 -07:00
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07:00
Bob Supnik
62879beb70 PDP1, PDP8, PDP18B, PDP11: Fixed dt_seterr to clear successor states
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.
2017-03-15 10:04:52 -07:00
Bob Supnik
d1768d2771 PDP10, PDP11, PDP18B, PDP8: Annotate switch case fall through (COVERITY) 2017-03-13 10:59:06 -07:00
Bob Supnik
f26fa3d17f PDP8: Fixed PCQ_ENTRY for interrupts (COVERITY) 2017-03-09 19:49:34 -08:00
Bob Supnik
c02584440b PDP8: Change RESET CPU to clear L'AC
As discussed in #400 and described in the maintenance manuals and/or
schematics for all five PDP-8 models (8, 8/S, 8/I, 8/E, 8/A).
2017-02-19 21:39:02 -08:00
Bob Supnik
d14243c858 PDP8: Renamed switch register variable to SR
As discussed in: #385
2017-01-28 12:15:34 -08:00
Mark Pizzolato
d8dbc7e6b5 SCP: Migrate all stdio writes to pass through SCP provided Fprintf() 2017-01-14 20:48:09 -08:00
Mark Pizzolato
e52ac6d57f SCP: Add help for NOEXPECT and spelling cleanups 2016-12-29 13:52:06 -08:00
David Gesswein
5ced037b4b PDP8: Add device codes for TTIX & TTOX devices to show command output 2016-12-19 04:55:43 -08:00
Mark Pizzolato
7964e2b72d PDP8: Fix SHOW TTIX SUMMARY
It was defined in lowercase and has now been made upper case for consistency.
The code which performs the match also has been change to do a case
insensitive compare.
2016-12-17 13:38:22 -08:00
Bob Supnik
5fc4744d8a PDP8: Added LS8E decode (6660) for WPS8 and PKSTF
As discussed in #353
2016-12-16 14:54:23 -08:00
David Gesswein
9c32c97d38 PDP8: Printing from wps-8
As discussed in #353
2016-12-16 10:03:40 -08:00
Mark Pizzolato
9c0b0ffb46 PDP8: Add support for 16 terminals in the TTIX device 2016-10-10 16:59:03 -07:00
Mark Pizzolato
da3f5359bb VAX, PDP11, PDP8, PDP1: Properly declare timer with clock unit 2016-09-26 15:55:50 -07:00
Mark Pizzolato
063cec087a PDP8: Changed console input polling to poll for input 500ms has passed 2016-09-24 05:02:47 -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