Commit graph

68 commits

Author SHA1 Message Date
Olaf Seibert
3a95ba4b34 Replace standard in32_t by local int32 type. 2022-10-13 22:29:06 +02:00
Olaf Seibert
7b494542ef Harmonize calibration code amongst VAXen.
Take the version of the code from VAX/vax4nn_stddev.c and vax4xx_stddev.c,
and apply it to 730, 750, 780, 820 and 860.
If we can assume that clk_tps always remains 100, this can be simplified
further.
2022-10-05 18:53:16 +02:00
Mark Pizzolato
243951a791 Unibus and Qbus VAX systems: Update TODR help information 2021-07-14 11:00:23 -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
Mark Pizzolato
4db4f90429 VAX, Unibus VAX: Record explicit TODR set immediately to backing store
- Only if backing store is used (i.e. OS Agnostic mode)
- Previously this was only done on a clean simulator exit.  That could
  result in inconsistent timing information in operating system images vs
  the saved TODR baseline data
- Always return TODR values rounded to the TODR granularity (10ms).
2020-10-09 05:10:34 -07:00
Mark Pizzolato
027c1de446 Unibus VAXen: Clock Coschedule interval timers when intervals are 10ms
Record 10ms tick acknowledgements
2020-01-10 08:19:27 -08:00
Mark Pizzolato
f9e4e9efba Unibus VAXen: Avoid trying to make interval timers calibrated clocks
Programmatic interval timers are not proper candidates for calibrated
clocks since the interval values can change arbitrarily under program
control and then interfer with attempts at proper calibration.
2020-01-09 23:37:06 -08:00
Mark Pizzolato
74a640d04a All VAX: Properly record clock tick acknowledgments 2018-10-08 22:33:00 -07:00
Mark Pizzolato
a6d2e5dd4f VAX, VAX780: Properly handle maximum interval value 2018-01-12 11:28:35 -08:00
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07:00
Sergey Svishchev
41dd89f938 VAX: fix CID: 1415593, 1415629 "Missing break in switch" 2017-03-09 17:24:23 -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
d456bac8fc All VAX: Simplify interval timers to leverage new usec timing APIs 2016-12-30 10:34:29 -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
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
Mark Pizzolato
eea394422e VAX, VAX750, VAX780, VAX8600: Properly coschedule console input with TMXR_MULT
The timer specific coscheduling routines take ticks as the delay argument
2016-12-12 01:53:49 -08:00
Mark Pizzolato
1c3c50fd26 VAX, VAX780, VAX750, VAX8600: Make TODR state file endian independent
When the TODR device (CLK) is attached to a state file, it operates in OS
agnostic mode.  This file can now be ported between hosts with different
endianness and work consistently to track the time of year.

Additionally, the VAX and VAX750 TODR values now properly don't
progress when they have zero values (or when they overflow back to zero).
2016-12-09 18:01:21 -08:00
Mark Pizzolato
39d2944ede TIMER: Add support for catchup clock ticks and cleaned up asynchronous clocks
Asynchronous clocks are now built for all simulators which are built with
SIM_ASYNCH_IO defined.  The default behavior has asynchronous clocks
disabled since this is still experimental, but it can be enabled with
SET TIMER ASYNC.

Catchup clock ticks are now available, but since they're experimental,
they aren't enabled by default.  Catchup ticks are only available if the
simulators clock device calls sim_rtcn_tick_ack to acknowledge processing
of clock ticks.  The VAX simulators have been modified to leverage this.
Catchup clock ticks can be enabled with SET TIMER CATCHUP

Additionally, an idle threshold is provided which can be used to
influence when clock calibration may be suppressed.  The default is not
to suppress calibration activities.

The various timer behaviors are visible with the SHOW TIMER command.

The state of the operating timer facilities is visible with: SHOW CLOCK

Timer events which are queued are visible with the SHOW QUEUE command.
2016-11-16 23:50:53 -08:00
Mark Pizzolato
da3f5359bb VAX, PDP11, PDP8, PDP1: Properly declare timer with clock unit 2016-09-26 15:55:50 -07:00
Mark Pizzolato
c5d5a9dfbf VAX780: Fix Interval Timer logic
- Previous changes made to support 32V's 60HZ clock tick introduced changes
  which didn't properly handle increments and interrupt generation while single
  stepping the timer.

- The icr_rd routine returned an incorrect value when interpolation was
  necessary due to a missing cast when converting from double to uint32.

- Properly start the timer from the current state of the interval count register
  when the timer was previously stopped.
2016-06-20 15:56:19 -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
253f8a8dcf VAX: Move CPU register and routine declarations into vax_defs.h
Avoid redundant declarations in every simulator module that uses them
and allow compiler to validate consistency of declarations and definitions.
2016-02-29 16:37:18 -08:00
Mark Pizzolato
54bec5c184 VAX780: Fix interval timer to correctly time variable microsecond granularity intervals.
The original implementation coupled the elapsed time measurement
to the 100Hz internal calibration clock.  This worked well enough for very
long intervals but not well at all for any intervals less than 50ms.  The net
result is that it couldn't usefully be used to produce the 60Hz clock ticks
which Unix 32V used it for.  It now leverages the microsecond timing
provided by sim_activate_after().  This problem is reported in #253
2015-12-10 10:09:23 -08:00
Mark Pizzolato
dac6633237 VAX: Set reasonable clock co-scheduled polling for console input 2015-12-08 16:50:00 -08:00
Mark Pizzolato
9b45833687 VAX, PDP11: Add support to, by default, limit console input data to about 9600bps.
This is necessary to avoid kernel type ahead buffer overruns when a user
pastes a chunk of data into a console session as described in issue #246

Other console input speeds can be set with SET CONSOLE SPEED=nnn
2015-11-18 10:51:37 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
304ad39a2b VAX: Avoid potential VAX simulator hangs when code may poll for console input without being interrupted 2013-11-07 08:02:00 -08:00
Mark Pizzolato
be46bac750 PDP8/PDP11/VAX: Support high speed character input on console and other multiplexer ports instead of limiting input data rate to 1 character per clock tick. 2013-10-23 07:50:39 -07:00
Mark Pizzolato
e0225c336a Added boot from console floppy support to the VAX780 simulator (Changed console floppy device name from RXC to CS) 2013-04-11 08:45:07 -07:00
Mark Pizzolato
8f9a14c5a1 Fixed clk_help to display the correct device name for the VAX TODR implementations 2013-03-09 12:16:35 -08:00
Mark Pizzolato
a91b6db21e Adding help to VAX system devices 2013-02-06 06:34:31 -08:00
Mark Pizzolato
28b90552b7 Revised all VAX simulator devices to have proper help information defined to make "HELP dev SHOW" and "HELP dev SET" most useful. 2013-02-02 16:29:38 -08:00
Mark Pizzolato
d674bb1f8d Changed VAX console input polling to only poll for input if the last character received has been processed by the VM 2013-01-26 10:43:10 -08:00
Mark Pizzolato
cbe11147fc Created a way for devices to have a description presentation routine and if it is supplied for its output to be visible with a SHOW SYSTEM command. Provided device description routines for devices used in the VAX simulators 2013-01-25 12:04:25 -08:00
Mark Pizzolato
71fcfacafc Added calls to sim_register_clock_unit for simulators with clock devices 2013-01-22 16:07:23 -08:00
Mark Pizzolato
9fc6aa73d6 Finish migration for simulators to use generic clock co-scheduling and sim_activate_after for scheduled delays 2013-01-22 05:41:27 -08:00
Mark Pizzolato
83c1d80194 Merge branch 'master' into AsyncTmxr
Conflicts merged and missing changes in new modules added as needed for clock co-scheduling.
2013-01-21 16:52:42 -08:00
Mark Pizzolato
95033cee15 Declare the console port input and output polling units for most simulators to potentially allow asynchronous console I/O. 2013-01-21 11:31:29 -08:00
Mark Pizzolato
eb0dfedf73 Changed register variable names to avoid the reserved register name STATE 2013-01-17 05:29:03 -08:00
Mark Pizzolato
a60d9070db Adding register descriptions to VAX processor devices 2013-01-16 17:26:30 -08:00
Mark Pizzolato
dac73b9381 Migrating scp and library global variables to be declared as extern in the appropriate library include file and remove repetitive declarations in referencing modules. 2013-01-10 13:29:15 -08:00
Mark Pizzolato
43b1c04ae4 Fixed bug disabling TTI interrupts on VAX 11/780, VAX 11/750, VAX 11/730 reported by Mike Burke 2012-12-31 10:44:38 -08:00
Mark Pizzolato
b25ca80dc6 Merge branch 'master' into AutoConfigure 2012-12-28 08:42:01 -08:00
Mark Pizzolato
48ba877259 Added VAX 11/785 model variation to the VAX 11/780 simulator based on VAX 8600/8650 model variants and some information from Matt Burke's VAX 11/785 page at 9track.net 2012-12-28 08:10:30 -08:00
Mark Pizzolato
7bed091134 Reworked Auto Configure for all Qbus/Unibus devices to have their device address settings table driven from the auto configure code rather than statically defined in many per cpu model include files.
Fixed auto configure bugs which didn't allow Fixed CSR Addresses or Fixed Vectors to be set using the auto configure information.
Fixed display of address and vectors to indicate that the assigned address and/or vector is in the floating set.
Added extended definitions to the auto configure table to reflect all known potential static and floating and static addresses as of VMS V5.5-2
Changed the name of the VAX 11/780 console floppy device name to RXC from RX (which collides with a Unibus name for the RX11).
2012-12-20 13:58:11 -08:00