Commit graph

777 commits

Author SHA1 Message Date
Mark Pizzolato
e565ee563f SCP: Assure that all SCP produced debug output always lands in the debug file
The fprintf substitute function Fprintf can call tmxr_linemsgvf which may
internally produce debug output thus producing an infinite recursion.

All writes to the debug file are now done by explicit calls to fwrite() OR the
Fprintf socket destination is saved and cleared during all calls to fprintf.
2017-01-20 12:23:54 -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
e36873f466 TIMER: Fix coscheduling functionality to produce consistent results
Added debug CHECK option to the sim_timer_activate_after() to verify
that coscheduled events actually have sim_activate_time_usecs() results
which are consistent with each other.
Additionally, coschedule tick processing now properly counts down
pending coschedule queued activities.
2017-01-18 23:53:46 -08:00
Mark Pizzolato
af1603f000 SCP: Add missing sim_strcasecmp() for host platforms without strcasecmp()
sim_strncasecmp() was previously provided.  Now both forms are available.
2017-01-17 21:54:01 -08:00
Mark Pizzolato
d5a56e0ab4 SCP: Take care to only write to a socket a single time and when appropriate 2017-01-16 14:25:38 -08:00
Mark Pizzolato
9851a36dd8 SCP: Fix Async I/O primitives operations for hosts without Intrinsic CAS 2017-01-10 23:40:25 -08:00
Mark Pizzolato
e450edd6ce SCP: Display most recent instruction execution rate in SHOW QUEUE output 2017-01-05 06:24:25 -08:00
Mark Pizzolato
711f6167fb TIMER: Make sure remnant usecs are always explicitly removed 2016-12-30 15:38:40 -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
e52ac6d57f SCP: Add help for NOEXPECT and spelling cleanups 2016-12-29 13:52:06 -08:00
Mark Pizzolato
8102e13d47 SCP: Add usecs_remaining information to SHOW QUEUE output 2016-12-29 07:12:12 -08:00
Mark Pizzolato
af6026b25e SCP: Add extended usecs wait time to SAVE/RESTORE file format. 2016-12-28 17:01:16 -08:00
Mark Pizzolato
aa82b57d10 TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with
   precisely correct delays aligned with the calibrated clock once
   per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
   with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
   the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
   that are shorter than the currently shortest scheduled event
2016-12-26 12:42:25 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
48e0b47d51 SCP: Add a way to see the enabled SCP internal devices SHOW DEV -I 2016-12-17 10:35:56 -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
ae52f4c331 TIMER: Add correct sim_activate_time functionality for all timer cases.
Also:
- allow a timer to dynamically stop itself (by calling sim_rtcn_calb
   with tps=0), and then to start the internal timer to provide a calibration
   baseline if necessary.
- Fix coschedule interval computation when the queue is empty.
- Properly select the correct timer for coscheduling without a specific tmr
- Properly adjust the coschedule queue's next time value when entries are
   canceled.
- Cleaned up throttling to behave well with all potential throttling rates and
   to make visible what is happening when boundaries are reached.
2016-12-15 09:57:34 -08:00
Mark Pizzolato
76d5c34d85 DOC: Add argument substitution and %DATE_MONTH% 2016-12-12 14:12:41 -08:00
Mark Pizzolato
5d8553e24c TIMER: Enabled catchup clock ticks
Historically, hosts which have a tick size slower than the tick a simulator
wants to implement can't idle effectively and keep good time.

This change allows simulators which call sim_rtcn_tick_ack() to provide
useful idling behavior while still keeping the passage of wall clock time
to time in the simulator accurate.
2016-12-10 11:59:49 -08:00
Mark Pizzolato
c393675b5b REMOTE_CONSOLE: Allow user selectable command output buffer size
The output of remote console commands gets truncated at the configured
buffer size.  The default has been raised from 1400 to 8192.
Common remote console usage is from the same host as the simulator and
as such localhost TCP traffic is delivered in chunks at least 8192 so no extra
packets will be involved in transporting the potential extra data and no
transmission delays on the send() call.
The minumum size is now 1400 (which was the prior default).
2016-12-08 11:27:07 -08:00
Mark Pizzolato
c420925a75 DOC: Corrected description of log behavior and made help and doc consistent 2016-12-07 05:46:29 -08:00
Mark Pizzolato
0ef87fac53 DOC: Clarified SET DEBUG, SET LOG and SET CONSOLE LOG documentation and help 2016-12-05 06:03:41 -08:00
Mark Pizzolato
b98ece819b DISK: Extended and corrected autosize logic for disk attach.
Previously only the actual size of the container file was used when
attaching a disk.  This was correct only when the size of the container
file actually aligned with the simulated disk drive.  disks created with
sim_disk_attach automatically write to the last sector of a simulated
disk file when the disk is created.  Therefore, auto sizing worked correctly
for any disk created with sim_disk_attach.

Disk images created with simh prior to 4.X would only write to the
portions of the disk drive when the simulated system writes data.  These
disk images would only be properly sized if the simulated operation of
the disk had actually written to the last block of the disk.  Auto sizing of
these disks would usually size the resulting disk incorrectly and strange
behaviors might occur when using such an incorrectly auto sized disk.

Fixes #357
2016-11-29 18:53:52 -08:00
Mark Pizzolato
5e201a4407 SCP: Pretty up seconds conversion when days are involved 2016-11-27 12:38:30 -08:00
Mark Pizzolato
f285e939a8 SCP: Added suggestive clarification to ATTACH help try HELP <device> ATTACH 2016-11-26 15:52:38 -08:00
Mark Pizzolato
89e372ba92 TIMER: Restore functionality for clocks devices that don't use sim_activate_after
Clock devices which call sim_register_clock_unit or sim_register_clock_unit_tmr
are best behaved if they use sim_activate_after to schedule their tick events.
2016-11-22 01:24:26 -08:00
Mark Pizzolato
522287cb8e SCP: Fix display of multi-bit masks and HELP dev SET output 2016-11-20 15:11:01 -08:00
Mark Pizzolato
8448580a3a SCP: Add support for debug matching multiple bit masks 2016-11-20 13:19:52 -08:00
Mark Pizzolato
ff95fb8ec2 SCP: Add warning about reset when RUN command is used multiple times.
The RUN command implicitly resets all devices which may have unexpected
consequences for a novice user.

The logic now produces a warning about this side effect when more than one
RUN command is executed in the same simulator session.

An explicit RESET command suppresses this warning for a subsequent RUN
command.

A RUN command with the -Q switch also suppresses this warning.
2016-11-18 05:20:06 -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
ee0aadeb37 SCP: Issue error message when CONTINUE command has unused arguments 2016-11-12 13:14:15 -08:00
Mark Pizzolato
7076527cf2 SCP: Format usecs as msecs with fraction when necessary 2016-11-12 13:12:33 -08:00
Mark Pizzolato
afad8ad374 TMXR: Add help indicating speed factor specification for console and mux lines 2016-11-05 02:52:58 -07:00
Mark Pizzolato
0268da4a28 SCP: Fix seconds format routine when displaying hours 2016-11-05 01:42:59 -07:00
Mark Pizzolato
efabcb9856 SCP: Added routine to format time in seconds down to usecs 2016-11-04 22:59:33 -07:00
Mark Pizzolato
0779a945d2 SCP: Fix output of SHOW QUEUE to also include event due time in usecs 2016-11-03 13:21:59 -07:00
Mark Pizzolato
f30de55f18 SCP: Fix help to only display breakpoint help for the proper device or CPU 2016-11-02 01:44:55 -07:00
Mark Pizzolato
b8842e40e5 TIMER: Fix internal calibrated clock to be well behaved while idling. 2016-10-26 16:16:36 -07:00
Mark Pizzolato
cf1e7b9cca SCP, PDP11: Added HELP CPU BREAK to display info about breakpoint types 2016-10-06 13:25:54 -07:00
Mark Pizzolato
d4f38d5358 SCP: Add compiled architecture and release/debug info to SHOW VERSION 2016-10-01 07:38:42 -07:00
Mark Pizzolato
9122a9f196 SCP: Add . pseudo symbol to reference the most recent address
Useful in EXAMINE and DEPOSIT.
2016-09-26 18:23:55 -07:00
Mark Pizzolato
c1ca3d4612 SCP: Add missing help mentioning SET CONSOLE SPEED 2016-09-24 05:04:44 -07:00
Mark Pizzolato
0b0f227057 SCP: Allow range/count specifier to special last value reference ($) in EXAMINE
As discussed in #343
2016-09-21 13:22:49 -07:00
Mark Pizzolato
9925ba83b8 SCP: Remove unused variable declarations 2016-09-20 09:21:11 -07:00
Mark Pizzolato
29c121e973 SCP: Fix default breakpoint message format.
When sim_brk_type_desc isn't populated, the matching breakpoint switches
and matching address are displayed.  Fix to use the optional VM provided
address formatting function sim_vm_sprint_addr.
2016-09-11 03:43:24 -07:00
Mark Pizzolato
b73afbb9d3 SCP: Fix breakpoint test when multiple breakpoint types are specified 2016-09-08 18:43:25 -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
e06b815d2a SCP: Record breakpoint match details in globals
sim_brk_match_type and sim_brk_match_addr can be used to generate
appropriate messages relating to the breakpoint match.
2016-08-31 11:56:47 -07:00
Mark Pizzolato
f03df970ea SCP: Compiler suggested type cast 2016-08-31 10:23:54 -07:00
Mark Pizzolato
f82d3f8994 SCP: Breakpoint enhancements
- Reliable support for multiple breakpoint types
- Optional separate breakpoint types defined concurrently with the same address
2016-08-31 08:10:38 -07:00