Commit graph

373 commits

Author SHA1 Message Date
Mark Pizzolato
769efb1f68 VAX: Add -8 -16 switch support for EXAMINE commands 2017-09-03 09:20:19 -07:00
Mark Pizzolato
93c1ccdacd VAX730, VAX750, VAX8600: Fix declaration and usage of icr_rd() routine 2017-08-28 10:18:19 -07:00
Mark Pizzolato
9f7519b886 VAX: Added detail to interval timer debug output 2017-08-01 06:49:59 -07:00
Bob Supnik
a7216dbbd1 All VAX: Added model-specific AST validation test
From page 6-6 of DEC STD 032 (the VAX architecture spec):
"Execution of MTPR src, #PR$_ASTLVL with src<31:0> GEQU 5 results in
UNDEFINED behavior. The preferred implementation is to cause a reserved
operand fault." MicroVAX II, CVAX, and Rigel all conform to the preferred
behavior, as does the current simulator, which was written from the CVAX
microcode. NVAX masks to 3b and does not take an exception on a value
GEQU 5.

The 1982 Architecture Handbook describes ASTLVL as a 3b register, with
src<31:3> ignored/read as zero, and exceptions taken on values GEQU 5.
The780 microcode masks the input value to 3b before doing the GEQU 5 test.

The ASTLVL test needs to be model specific.

I suspect the behavior became undefined when MicroVAX II simplified the
original test to save a microword. I do not see how the code fragment Matt
references could work on a MicroVAX II, which was supported under 4.5.
Perhaps the device Matt mentions couldn't exist on a MicroVAX II?

For those who wants the gory details... uVAX, CVAX, and Rigel do an
unsigned compare on the unmasked src and the constant 5. Carry out
means reserved operand. Overflow is ignored. So an input of 0x80000002 -
0x00000005 (done in the data path as 0x80000002 + 0xFFFFFFFB) generates overflow (ignored) and carry out.

# Conflicts:
#	VAX/vaxmod_defs.h
2017-05-18 12:45:21 -07:00
Mark Pizzolato
47c917a55d PDP11, VAX: Fix stray TABs which crept in over time 2017-04-26 15:42:36 -07:00
Matt Burke
7092c55907 VAX750: Fixes to Unibus adapter to address #346
Modified the UBA750 simulation, incorporating these comments. Ultrix
appears to access the non-existant datapath registers and given that this
works on the real hardware the most likely option seems to be read 0
and write NOP. I think this will be true for any access to the UBI outside
of the known registers.
2017-04-26 15:36:28 -07:00
Matt Burke
f6d4e92c6d VAX8600: Marked intentional fall through of case statement CID: 1415576 2017-04-26 15:27:44 -07:00
Matt Burke
a3e6aac076 All VAXStations: Fixed logical vs bitwise operator CID: 1415454
Tested with VWS, UWS and DECwindows. This QVSS issue only affected polled
interrupt mode, which is likely not used by most operating systems
2017-04-26 15:25:55 -07:00
Matt Burke
c94edb6b2d VAXStations: Improvements and bug fixes to keyboard and mouse devices
Whilst working on a new video device I ran into a few problems with the
LKxxx keyboard and I noticed there are already some open issues against
the keyboard and mouse devices. These changes should resolve #320 and
may help with #272 (although I think that is an SDL issue). I've tested these
changes with VWS, UWS and DECwindows with both captured and
uncaptured input modes.
2017-04-23 10:40:00 -07:00
Mark Pizzolato
d42dd707e9 VAX750: Fix some 750 UBA inconsistencies 2017-04-06 18:12:44 -07:00
Bob Supnik
b9543529d2 All VAX: Fixed uninitialized variable on FPD path (COVERITY) 2017-03-31 15:02:34 -07:00
Mark Pizzolato
fa1671455e All VAX: Avoid potential invalid memory reference recording history after FPD 2017-03-30 19:22:16 -07:00
Mark Pizzolato
680ad4f239 Various VAX: Mark Coverity False Positive for boot command parsing 2017-03-30 19:20:48 -07:00
Mark Pizzolato
a9a91420b0 SCP: Properly define sim_name array to avoid potential overrun 2017-03-29 07:43:11 -07:00
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07:00
Mark Pizzolato
6831746400 All VAX: Clarify Opcode Table decode values
the opcode table first word consists of bits:

<7> = FPD is legal for this opcode.
<4:6> = number of specifiers for unimplemented opcodes (VAX subsets)
<3> = unused
<0:2> = number of specifiers

The mask used to be 0x70. The convention is that x_M_y is a mask value
<right-justified>, for a macro like:

#define get_foo(x)        (((x) >> x_V_foo) & x_M_foo)

For a subset VAX (like the 3900), the unimplemented opcodes are those
2017-03-20 08:10:43 -07:00
Bob Supnik
976cf12d76 VAX780: Update 780 bug history to include REI to Compatibility mode 2017-03-20 07:48:25 -07:00
Mark Pizzolato
0e6a79f078 All VAX: Initialize intermediate state vars outside of the instruction loop
Many of the intermediate state variables are captured by the instruction
history mechanism.  Make sure that these don't come into and out of
scope between instruction executions.
2017-03-18 17:59:13 -07:00
Bob Supnik
f0bee7f28e VAX750: Fixed bad test for UBA intr level (COVERITY)
IPL_UBA already has the subtract built in:

So it shouldn't be extracted again.

The whole routine looks a little strange, but the way it works is
that an interrupt from the UBA itself sets <bit 31> in the returned vector.
Because the vector is read by code and not used by hardware, the flag
bit is "harmless."

UBA interrupts occur only under strange circumstances, like bad map
pages and device NXMs. Under the simulator, with a debugged OS, they
never happen.
2017-03-15 21:00:34 -07:00
Mark Pizzolato
6a40afea24 VAX750: Fix NULL reference check in boot command parsing (COVERITY) 2017-03-14 20:31:51 -07:00
Bob Supnik
430541bda9 All VAX: Fixed dangling else in show_opnd (COVERITY) 2017-03-14 04:34:36 -07:00
Bob Supnik
71479d6c0b All VAX: Fixed certain indirect cases in parse (COVERITY) 2017-03-14 04:32:50 -07:00
Bob Supnik
950fc82e38 VAX780, VAX8600: Fixed bad test for UBA intr level (COVERITY)
IPL_UBA already has the subtract built in:

So it shouldn't be extracted again.

The whole routine looks a little strange, but the way it works is
that an interrupt from the UBA itself sets <bit 31> in the returned vector.
Because the vector is read by code and not used by hardware, the flag
bit is "harmless."

UBA interrupts occur only under strange circumstances, like bad map
pages and device NXMs. Under the simulator, with a debugged OS, they
never happen.
2017-03-13 17:41:09 -07:00
Bob Supnik
6333555947 VAX: Annotated intentional fall throughs in switch statements (COVERITY) 2017-03-13 10:37:39 -07:00
Mark Pizzolato
44deef9447 VAX780: Fix potentially uninitialized variable reference (COVERITY) 2017-03-11 09:50:39 -08:00
Mark Pizzolato
df3f49c7a0 MicroVAX1: Fix NULL reference check in boot command parsing (COVERITY) 2017-03-10 11:55:29 -08:00
Mark Pizzolato
44587a17c5 MicroVAX2: Properly limit Qbus Map Register Access (COVERITY) 2017-03-10 11:55:29 -08:00
Sergey Svishchev
41dd89f938 VAX: fix CID: 1415593, 1415629 "Missing break in switch" 2017-03-09 17:24:23 -08:00
Sergey Svishchev
b40e63de4e VAX: fix CID: 1415411, 1415414-1415417, 1415535 "Buffer not null terminated"
Pass buffer size minus one to strncpy()
2017-03-09 17:20:54 -08:00
Bob Supnik
b41d10f189 PDP11, PDP10, VAX780: CR11 is BR6, CD11 is BR4 2017-03-07 09:42:37 -08:00
Mark Pizzolato
84f1e7104e VAX: Fix help text for MBA devices to describe their device relationships 2017-02-10 11:23:29 -08:00
Mark Pizzolato
7d432406b6 PDP11, PDP10, all VAX: General extern cleanup.
Remove explicit redundant extern declarations in source files that are
defined in processor include files.
2017-02-04 19:37:20 -08:00
Mark Pizzolato
724b23844c VAX730, VAX750, VAX780, VAX8600: Fix rounding with interval timer tick rate
As discussed in #390
2017-01-31 18:15:38 -08:00
Mark Pizzolato
acbb92091b VAX: Add slightly more precise TODR initialization logic with debug support 2017-01-19 16:56:40 -08:00
Mark Pizzolato
1bb42b83ef VAX730, VAX750, VAX780, VAX8600: Make TODR a little more precise
Add consistent debug options to track TODR activities and the values which
are set.  Debug data will display the VMS time related to the values set and
read.
2017-01-19 15:25:08 -08:00
Mark Pizzolato
5cd0ea4d59 VAX730, VAX750, VAX780, VAX8600: Fix interval timer ics value
- When the running timer is explicitly stopped the ics value needs to be
    determined before canceling the active unit.
2017-01-18 23:57:14 -08:00
Mark Pizzolato
1555056396 All VAX: Adjust sim_interval by reasonable amount for string instructions
Previously sim_interval was adjusted by 1 plus the total number of bytes
referenced in string instructions (SCANC, SPANC, LOCC, SKPC, CMPC3,
CMPC5, MOVC3, MOVC5).  Since the amount of data that a string
instruction can reference is arbitrarily large (32bit size), the adjustment
to sim_interval could be ridiculously excessive.  This can result in wild
variances in clock calibration when large string data are referenced.
2017-01-17 15:58:55 -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
5f8bdbc53d MicroVAX I, MicroVAX II: Add missing original ROM images
These files are patched by ka620_patch.com and ka630_patch.com.
2017-01-09 14:16:55 -08:00
Mark Pizzolato
ae25c72a8e PDP11, VAX730, VAX750, VAX780, VAX8600: Moved CR11/CD11 from BR4 to BR6 2017-01-07 04:56:52 -08:00
Mark Pizzolato
6e31112469 VAX, MicroVAX2: Update ROM memory access to use common code 2017-01-05 05:53:00 -08:00
Mark Pizzolato
2df1433d71 All VAX: Defer taking any HALT action until pending events have fired 2017-01-03 12:01:53 -08:00
Mark Pizzolato
d77e3e196e VAX: Re-enable the boot ROM interval timer diagnostic tests 2017-01-02 14:03:39 -08:00
Mark Pizzolato
bcac7d0973 VAX: Change interval timers to pass boot ROM diagnostics.
Various boot ROM activities, including testing the Interval Timers, presume
that ROM based code execute instructions at 1 instruction per usec.
To accommodate this, we not only throttle memory accesses to ROM space,
but we also use instruction based delays when the interval timers are
programmed from the ROM for short duration delays.
2017-01-02 13:48:23 -08:00
Mark Pizzolato
d456bac8fc All VAX: Simplify interval timers to leverage new usec timing APIs 2016-12-30 10:34:29 -08:00
Mark Pizzolato
0275ef05e8 All VAX: Lower overhead when idling.
The original idling model called sim_idle() within the context of a scheduled
event running on the CPU unit.  The overhead of scheduling and the related
dispatch serve no specific purpose.
Meanwhile, the 'work' involved in determing if idling is possible is about
equivalent to the work of executing an additional instruction.  Therefore
sim_idle is invoked with an argument which causes the sim_interval to be
adjusted by 1 on each call that doesn't actually perform an idle sleep.  This
adjustment keeps the calibrated instruction execution rate consistent with
other purely non-idle instruction mixes.
2016-12-29 09:47:09 -08:00
Mark Pizzolato
75901333e5 VAX780, VAX730, VAX750, VAX8600: Moved the TPS register to the TMR device
Clock ticks for these simulatrs are performed by programmatic setup of the
interval timer device (TMR) and have nothing to do with the TODR which
increments at 100Hz, but doesn't generate ticks to the simulated system.
2016-12-29 06:05:53 -08:00
Mark Pizzolato
372231dd3a VAX8600, VAX750: Pass correct delay to TTI device sim_clock_coschedule 2016-12-17 11:51:05 -08:00
Mark Pizzolato
76103cf760 VAX730, VAX750, VAX8600: Update Interval Timer and TODR to align with VAX780 2016-12-16 18:32:26 -08:00
Mark Pizzolato
5cf9e9ab86 VAX780: Removed pseudo ticks from TODR device
Removing pseudo ticking of the TODR improves simulator behavior
when idling.  As previously implement, the timing of the TODR and TMR
ticks weren't aligned and and idle simulator would have to wake up to
service both tick activities.

The real hardware has a TODR which changes every 10ms to reflect changes
to wall clock time.  This is already completely achieved by referencing the
host system time whenever the TODR register is referenced.  No need for
to simulate pseudo ticking.

The real interval timer hardware generates ticks a the rate specifically
programmed in the interval timer device registers.  The common cases
programmed the ticks at 10 ms intervals (100Hz), but real operating systems
exist which programmed ticks at 16667 usecs (60Hz).
2016-12-16 10:39:49 -08:00