Commit graph

135 commits

Author SHA1 Message Date
Mark Pizzolato
64fa357bf9 SCP: Enable use of local rand() and scrand() implementation 2019-04-03 09:43:47 -07:00
Mark Pizzolato
9c75a7bfaa SCP: Correct help and doc to properly describe file compare IF command 2019-03-26 01:38:01 -07:00
Mark Pizzolato
5960bca32a SCP: Add a local rand() implementation to avoid Coverity issues 2019-03-20 12:57:36 -07:00
Mark Pizzolato
4b82a90c43 SCP: Assure that file buffers get flushed during frontpanel API halts
As reported in #668
2019-03-09 06:50:02 -08:00
Mark Pizzolato
6e65b635e3 ETHER: Accept upper or lower attach transport types (UDP, TAP, VDE, NAT) 2018-10-09 23:23:39 -07:00
Mark Pizzolato
6a3424df86 SCP: Add option to write debug output to an in memory circular buffer 2018-10-08 17:50:00 -07:00
Mark Pizzolato
f86a67310a SCP: Add missing aspects to sim_filepath_parts, move sim_dir_scan to sim_fio 2018-09-29 23:34:14 -07:00
Mark Pizzolato
0daa80e03d SCP: Add support for library unit test routines 2018-08-26 18:15:30 -07:00
Mark Pizzolato
06654d1ff5 TMXR: Make sure all MUX devices can leverage all debug selectors 2018-06-07 16:39:26 -07:00
Mark Pizzolato
ce5c3f0ff5 SCP: Allow symbols (environment variables) to describe contain addresses
This allows:
   sim> SET ENV X=80004324
   sim> EXAMINE X
   80004324: xxxxxxxxxx
   sim> DEPOSIT X nnnnn
2018-06-05 22:24:46 -07:00
Mark Pizzolato
b781834f31 SCP: Add sim_dir_scan API for general use. 2018-05-09 13:52:52 -07:00
Mark Pizzolato
396679a01a SCP: Add strtotsv to generally parse signed t_value data (t_svalue).
Allow for explicit Hex, Octal and Binary (0x. 0. 0b) prefix
2018-04-30 23:03:33 -07:00
Mark Pizzolato
309598e2cd SCP: Fix declaration duplications and indentation issues 2018-04-16 16:57:06 -07:00
Mark Pizzolato
28e4311039 SCP: Extended debugging to allow for unit specific debug for disk and tape 2018-04-07 21:38:26 -07:00
Mark Pizzolato
d81ff1f17e SCP: Expose get_sim_opt globally so that local commands can parse switches 2018-03-06 16:41:42 -08:00
Mark Pizzolato
760e7f2810 SCP: stop_cpu and sim_is_running variables t_bool 2018-02-02 05:02:27 -08:00
Mark Pizzolato
eea15bfe4e SCP: Add DEBUG command to allow Debug enabling/disabling via Remote Console
This exposes the functionality of SET DEBUG and SET <dev> DEBUG without using
a general SET command which the remote console facility avoids.
2018-01-07 12:47:42 -08:00
Mark Pizzolato
154320bf71 SCP: Add support for BREAK/EXPECT/UNTIL/IF action steps in remote console 2018-01-07 12:09:35 -08:00
Mark Pizzolato
72d4622ddf SCP: Add ECHOF command which takes a quoted string as an argument 2018-01-04 07:06:51 -08:00
Mark Pizzolato
4ca544f60a SCP: Add SLEEP command 2017-11-03 08:51:19 -07:00
Mark Pizzolato
d73b626719 SCP: Expose read_line_p for potential use by library support routines 2017-10-25 08:16:02 -07:00
Mark Pizzolato
964195dd78 SCP: Fix potential infinite recursion for internal ctype routines 2017-09-04 18:04:57 -07:00
Mark Pizzolato
727cd8e217 SCP: Fix potential conflics with library provided ctype routines 2017-09-03 18:23:58 -07:00
Mark Pizzolato
7af33b90b6 SCP: Fix internal ctype routines make consistent with standard routines. 2017-09-03 16:46:34 -07:00
Mark Pizzolato
23f4c90a6d SCP: Generalized numeric switch processing 2017-09-03 09:19:20 -07:00
Mark Pizzolato
6a2a3de19c SCP: Actually fixed Coverity issue (Dave Bryan)
The previous change cleaned up some redundant declarations and missed
the desired change.
2017-08-29 10:14:48 -07:00
Mark Pizzolato
ebf9489b59 SCP: Fixed Coverity issue for sim_debug arguments 2017-08-28 10:19:29 -07:00
Mark Pizzolato
d9e7afc92f SCP: Fix Coverity flagged issues 2017-06-13 04:32:18 -07:00
Mark Pizzolato
b9c9c9ea17 SCP: Allow for locally provided strlcpy and strlcat macros
As indicated in #445
2017-05-09 19:27:43 -07:00
Mark Pizzolato
b5a5aec57a SCP: Avoid potential macro redefinition for strcasecmp() and strncasecmp() 2017-04-24 13:44:40 -07:00
Mark Pizzolato
168d0d9c47 SCP: add generic length limted and case independent string for all platforms 2017-04-22 21:28:48 -07:00
Mark Pizzolato
9b2ff7e371 SCP: Add COPY/CP command 2017-04-03 08:26:25 -07:00
Mark Pizzolato
a9a91420b0 SCP: Properly define sim_name array to avoid potential overrun 2017-03-29 07:43:11 -07:00
Mark Pizzolato
fa7e350c78 SCP: Avoid potential invalid pointer reference (Coverity) 2017-03-29 07:02:46 -07:00
Mark Pizzolato
34d29d3160 SCP: Add sim_strlcpy and sim_strlcat for platforms missing strlcpy and strlcat 2017-03-27 07:51:13 -07:00
Mark Pizzolato
7a1b35ae12 SCP: Add DEL/RM command to facilitate portable command files 2017-02-16 07:36:35 -08:00
Mark Pizzolato
692b9abe5f SCP: Add ability to descriptively name UNITs
This allows a device simulator to specifically name the units that it uses
for different purposes.  This info is visible in the output of SHOW QUEUE
and debug output.

Once specified or dynamically determined (as previously occurred with
each call to sim_uname()), that name is saved for fast delivery on subsequent
calls.  This will remove some overhead when running with debugging on.
2017-02-06 10:27:01 -08:00
Mark Pizzolato
665ebf0fd1 FRONTPANEL: sim_frontpanel API version 4 release
Add simulator side register bit sampling with averaged sample values
delivered across the API at specified rates.
2017-02-04 10:48:13 -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
d8dbc7e6b5 SCP: Migrate all stdio writes to pass through SCP provided Fprintf() 2017-01-14 20:48:09 -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
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
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
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
efabcb9856 SCP: Added routine to format time in seconds down to usecs 2016-11-04 22:59:33 -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
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