Commit graph

51 commits

Author SHA1 Message Date
Mark Pizzolato
236ca8206d VAX750: Associate bit fields with TTI and TTO DEVICE REGisters 2020-12-02 14:46:58 -08:00
Mark Pizzolato
0d6f1ce362 All VAX: Remove redundant include of time.h 2020-10-30 14:17:24 -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
6da28c516f VAX730, VAX750: Remove invalid REGister definitions in console TU58 (TD) device 2020-03-01 12:07:34 -08: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
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07: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
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
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
e153b7f224 PDP8, VAX750: Fix compiler detected errors in REG initializers 2016-03-18 15:43:30 -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
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
9cb2697dcd VAX730, VAX750: Fix compiler warnings 2015-09-24 13:36:15 -07:00
Mark Pizzolato
9f59823ae3 PDP11, all VAX: Add TU58 device simulator with support for 32 drives plus the VAX 730 and 750 console devices 2015-09-22 15:06:12 -07:00
Mark Pizzolato
0986c6ff9e VAX750: Fixed ROM based boot from console TU58
Problem was the console storage output buffer was masked with a WMASK instead of a BMASK (it is only a 8 bit register).
Also, the input interrupt processing cleared the output interrupt state instead of the input interrupt state.  This would only be a problem when interrupts are actually used instead of polled I/O.
2015-09-17 17:48:02 -07:00
Mark Pizzolato
26ef9b566a PDP11, VAX: const cleanup 2015-02-21 12:48:35 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
995ab8f1e2 More General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-24 14:37:37 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07: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
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
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
9cd3a07ff6 Merge remote-tracking branch 'origin/master' into Extra-VAXen
Merged related functionality into new VAX 750 modules

Cleaned up compiler complaints from the clang compiler
2012-10-22 06:32:38 -07:00