Commit graph

56 commits

Author SHA1 Message Date
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
938aa58f3a SCP: Provide ways for VM to specify sim_interval adjustment and step units
This affects the output of some SCP commands (including help).  The
results are cosmetic, but allows the simulator to provide correct descriptive
information.
2020-03-07 10:13:18 -08:00
Mark Pizzolato
b76fd3ed44 SCP: Preparing for dynamic testing of simulator REGister definitions at startup 2020-03-06 15:28:52 -08:00
Mark Pizzolato
8a858c181d SCP: Clean up WEAK definition and rework deprecated references to sim_vm_init
As discussed in #794
2020-01-29 12:30:25 -08:00
Mark Pizzolato
5213e1125d SCP: Add support to identify a simulator specific release version
Included from Dave Bryan's V3.11 extensions
2019-12-28 12:34:06 -08:00
Mark Pizzolato
73a41c4bc7 SCP: Auto detect WRU being entered for simulators without a console device 2019-12-11 12:25:18 -08:00
Mark Pizzolato
da3f851d70 TIMER: Add minimal tick based calibration APIs. 2019-06-08 13:55:06 -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
48db10994d TIMER: Calibrated clock fixes
- Properly handle clock transitions when control flows back and forth
  between instruction execution and simh commands.
- Changed Internal Timer from 10 Hz to the MAX(100Hz, HostOSClockHz)
- Changed default idle calibration percent to 50%
- Make sure that error cases (backwards and gap too big) properly advance
  the real time while avoiding calibration.
- Fix selection of the calibrated clock.
- Fix logic that sets the idle percentage that controls calibration.
2019-05-28 22:47:06 -07:00
Mark Pizzolato
6b3bff56b3 DISK: Add support to properly autosize fixed sized disk from a set of choices
As discussed in #704
2019-05-21 15:38:39 -07:00
Mark Pizzolato
dfd011a9b3 TMXR: Update doc to add missing API description 2019-04-10 15:09:47 -07:00
Mark Pizzolato
2f8fca49c6 SCP: Move sim_ library debug masks to all be high bits
This is to allow DEVICE defined debug masks to start using the low bits
in the 32 bit debug mask and avoid collisions with library defined values.
2019-01-23 15:17:19 -08:00
Mark Pizzolato
0ba63fe7fa SCP: Automatically Save and Restore unit pos variable
Update writing simulator doc to describe proper use of unit pos variable.
2018-12-12 09:34:49 -08:00
Mark Pizzolato
3f2d76eee5 doc: Clarify use of sim_rtcn_init_unit vs sim_rtcn_init. 2018-09-27 06:21:39 -07:00
Mark Pizzolato
f42db0c6ea TMXR: Add tmxr_txdone_ln() to provide precise completion speed timing
Multi line TMXR devices can simplify state maintenance and better leverage
output scheduling when they use this API
2018-07-12 10:12:49 -07:00
Mark Pizzolato
53792d6261 TMXR: Describe TMXR API a little better 2018-06-19 22:05:12 -07:00
Mark Pizzolato
c8beee2d0f doc: Clarify details in "Writing a Simulator for the SIMH System" 2018-04-15 12:53:29 -07:00
Mark Pizzolato
f5ca960b82 TMXR: Disable ATTACH speed for devices which program port speed 2018-03-13 02:14:06 -07:00
Mark Pizzolato
9b1f44f787 SCP: Remove optional write_callback in the REGister structure
The REG structure exists to serve SCP's various activities.  It is
does not exist to provide capabilities to a VM.
2017-12-09 02:54:10 -08:00
Mark Pizzolato
61679ed8f0 SCP: Add optional write_callback to REGister structure called only on DEPOSIT
Add necessary macros to populate this field and cleanup all the
existing macros to be simpler.
2017-11-19 08:18:02 -08:00
Mark Pizzolato
2f64d2b6dc doc: Add suggestion to simh.doc regarding one time device init in reset routine 2017-06-23 12:36:28 -07:00
Mark Pizzolato
cb47ea3852 doc: Add description of optional PC value API used in debug output 2017-06-13 22:36:15 -07:00
Mark Pizzolato
a50403cd0a doc: Added description of optional Stop Message Formatting API (Dave Bryan) 2017-06-13 22:13:56 -07:00
Mark Pizzolato
fae6a18835 TAPE: Update tape gap support (Dave Bryan)
With this update, the erase gap operation has been split out of
"sim_tape_wrgap" into a separate, internal "tape_erase_fwd" routine that
is called from "sim_tape_wrgap" as well as from the new "sim_tape_errecf"
routine.  There's a corresponding internal "tape_erase_rev" that's called
from the new "sim_tape_errecr" routine.

I've shimmed "sim_tape_rdlntf" and "sim_tape_rdlntr" to move the tape
context and debug stuff out of the routines that I'm maintaining.  This
will allow me to replace those functions in their entirety with the
corresponding functions in my development sources for future updates.
It also allows me to keep Bob's version in sync.  As my routines are static
and only called once from the shims, compilers should optimize away
the function calls and instead inline the code, so there'd be no extra call
overhead.

I'd also like to keep "tape_erase_fwd" and "tape_erase_rev" untouched for
the same reason.  If you wish to add debug calls to "sim_tape_errecf" and
"sim_tape_errecr", that's fine.
2017-06-02 00:54:13 -07:00
Mark Pizzolato
d0bd4fbdff TMXR: Enforce output rate limiting when output is produced by instructions
Calls to tmxr_putc_ln() executed directly within instruction simulation code
(as opposed to during event servicing) will delay reasonable times
2017-05-11 08:42:31 -07:00
Mark Pizzolato
5c53d8eba0 DOC: Cleaned up API descriptions 2017-01-19 19:54:34 -08:00
Mark Pizzolato
c9276407e6 TIMER: Timing corrections and enhancements
- Add support to query remaining usecs on pending events.
- Generalized the sim_interval adjustment in sim_idle to allow more than
   a single decrement.
- More overhead reduction when idling.
- Carry usec values as double through out to fully support long wall clock
   delays.
2016-12-30 10:26:59 -08:00
Mark Pizzolato
7dd1f0b89e SCP: Complete support for automatic detection of WRU (^E) for all simulators
commit ef6528bf32 added support for automatic WRU detection for simulators
that don't have a console port, but it was never documented and the addition of
that support potentially interfered with SAVE/RESTORE behavior.

The console connection state is now automatically saved and restored.
2016-12-17 03:50:10 -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
17abb1223a TAPE: Make sure that all tape library APIs only work after sim_tape_attach
- Detects and fixes the problem reported in #345
2016-10-20 13:32:51 -07:00
Mark Pizzolato
222ae77436 SCP: Add sim_brk_message() to facilitate easy reporting of matched breakpoints.
Also extended the optional VM supplied routines to include sim_vm_sprint_addr.
Simulators which provide sim_vm_fprint_addr should also provide
sim_vm_sprint_addr with sim_vm_fprint_addr reworked to leverage
sim_vm_sprint_addr internally.  sim_vm_sprint_addr is currently only used by
sim_brk_message() which is an API which a simulator may choose to use if
it supports multiple breakpoint types,
2016-09-01 14:32:01 -07:00
Mark Pizzolato
052fafc62e SCP: Add UNIT wait and buf to SAVE/RESTORE data as documented. 2016-07-11 19:54:15 -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
fc4171140a SCP: Add BINRDATA, BINRDATAD and BINRDATADF REG initialization macros.
These describe a register which is to be displayed in binary.
2016-03-23 00:43:36 -07:00
Mark Pizzolato
3ff89074f5 SCP: Add generic REGDATA register populating macro.
This allows simulator code to be insulated from any changes which may
be made to the REG structure in the future.  The REGDATA macro will be
update as needed to avoid any changes in simulator specific code.
2016-03-17 10:45:45 -07:00
Mark Pizzolato
329f42a1fc SCP: Rework newly added REG macro definitions to avoid problems with prior declarations
Fix #288
2016-03-16 20:33:41 -07:00
Mark Pizzolato
37733cabee SCP: Add support REGister data in arrays of arbitrary structures. 2016-03-14 15:07:22 -07:00
Mark Pizzolato
f3ca23c739 DOC: Correct parameter description in "Writing a Simulator for the SIMH system". 2016-02-25 05:14:49 -08:00
Mark Pizzolato
d8f2647f93 SCP: general const cleanups and const change to sim_vm_parse_addr. 2016-01-24 08:27:08 -08:00
Mark Pizzolato
6582aeead2 SCP. PDP11: Add ESC and ENQ to the default set of console output characters in 7P mode.
Revert change to add ESC and ENQ to printable characters for all simulators
and make that change only for the PDP11.
2016-01-02 05:07:18 -08:00
Mark Pizzolato
e162eb9418 DOC: Clarifications about behavior and requirements for EXAMINE -a and -c switches. From Dave Bryan 2015-11-19 09:06:19 -08:00
Paul Koning
35c321fe2e DOC: Corrections and cleanups.
Small corrections, including a number from Mark Pizzolato, in
description of unit timing, debug flags, among others.
2015-10-10 14:07:33 -04:00
Paul Koning
77bbfae817 DOC: Corrections and cleanups.
Update description of DEVICE, UNIT, and REG.  Correct a number of
typos and formatting glitches.  Add description of UNIT_IDLE,
REG_UNIT.  Add some missing details in fprint_sym and
sim_vm_is_subroutine_call.  Document command matching rule.
2015-09-25 12:52:07 -04:00
Mark Pizzolato
8652294fd6 DOC: Add descriptiong of missing unit structure fields 2015-09-22 06:55:23 -07:00
Mark Pizzolato
1ef6c3d6b9 SCP: Added REG_V_UF and REG_UFMASK to support user-defined register flags. From Dave Bryan
Altered the calling sequences to fprint_sym and parse_sym in ex_reg and dep_reg to merge user-defined register flags with the radix in the addr parameter.  This allows the print and parse routines to identify the register or determine how it is to be handled.  These are called in lieu of the standard print and parse routines if a register has REG_VMIO or at least one user-defined flag set.
2015-09-20 14:04:24 -07:00
Mark Pizzolato
8204a203a1 DOC: Updated simh.doc to describe missing sim_tape APIs 2015-04-14 08:36:27 -07:00
Mark Pizzolato
46d7bfc660 SCP: Fix sim_disk to avoid potential reference to uninitialized context structure. Fix #194 2015-03-19 13:52:33 -07:00
Mark Pizzolato
f8501c2ec2 DOC: Updated simh.doc and sim_magtape.doc to reflect recent revisions to tape support (from Dave Bryan) 2015-01-08 03:34:42 -08:00
Mark Pizzolato
8f3e6438a3 SCP: Added the NEXT command. This command provides the ability for a simulator to step over subroutine calls. 2014-04-14 14:22:18 -07:00
Mark Pizzolato
c3479492a1 Added documentation for bitfields 2013-05-23 06:34:46 -07:00