Commit graph

838 commits

Author SHA1 Message Date
Mark Pizzolato
0bfb902b56 SCP: Enhance hierarchical help prompting
- A prompt answer which exactly matches a topic name is given
  preference over the potential ambiguity of other topics which start
  with the same text.
- Prompt with the parent topic's prompt when a just displayed subtopic
  has no subtopics.
- Allow either ^D or ^Z entered to act as EOF.

These changes reflect the behavior of the VMS help system which the
hierarchical help system is modeled on.
2021-08-14 19:43:41 -07:00
Mark Pizzolato
f95b20e1f3 SCP: Cleanup potential compiler warnings 2021-08-13 09:09:53 -07:00
Mark Pizzolato
78d3d1b560 SCP: Add register validation tests as part of the SCP library test 2021-08-11 07:28:08 -07:00
Mark Pizzolato
dcbfba0f9a SCP: Fix register formatting and quiet unused variable warning 2021-08-03 13:23:25 -07:00
Mark Pizzolato
77d7df7a56 SCP: HELP command output formatting cleanup
- Add column header to output of HELP device register list.
- Format HELP output for REGISTER, SET and SHOW commands to accommodate long
   descriptor text (wrapping as needed).
- Add HELP DEVICE * to display help for all devices
2021-08-01 18:59:00 -07:00
Mark Pizzolato
2c820dca5c SCP: Pass all external environment variables through to spawned commands
As discussed in #1057
2021-07-31 12:49:56 -07:00
Mark Pizzolato
9ef08cba0d SCP: Allow all external environment variable expansion
as discussed in #1057
2021-07-29 21:17:44 -07:00
Mark Pizzolato
5f8a8cca9d SCP: Avoid using externally defined aliases for SCP commands
As discussed in #1057
2021-07-29 10:15:54 -07:00
Mark Pizzolato
d23942bc37 SCP: Allow ; and # comments on SET and SHOW command lines 2021-06-05 12:24:57 -07:00
Mark Pizzolato
cf1ac44d4a SCP: Allow SET/SHOW commands to operate on explicitly set unit names
simh UNITs that have their name set via sim_set_uname() can now be
referenced via MTAB entries for the related DEVICE as well as attach
commands.
2021-05-30 15:37:01 -07:00
Mark Pizzolato
7008edc561 SCP: Fix SHOW writeenable MTAB entries
As discussed in #1034
2021-04-20 09:28:41 -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
7276dc1f8d SCP: Make ATTACH messages report the UNIT name
As discussed in #1034
2021-04-16 11:28:43 -07:00
Mark Pizzolato
f77332112f SCP: Fix HELP DISKINFO
As reported in #1031
2021-04-12 10:24:32 -07:00
Mark Pizzolato
e1d60d1035 SCP: Avoid redundant HELP SET output for single unit DEVICEs 2021-04-12 03:50:52 -07:00
Mark Pizzolato
dea084a908 SCP: Fix Coverity issue 2021-04-11 15:54:11 -07:00
Mark Pizzolato
c004fcc2ba SCP: Fix Coverity identified issues 2021-04-11 15:48:01 -07:00
Mark Pizzolato
fc5bda9070 SCP: Add unit test for scp token parsing routines 2021-04-06 02:19:27 -07:00
Mark Pizzolato
8dbffbc00a SCP: Add debug support to capture details of SAVE and RESTORE commands 2021-04-06 00:28:22 -07:00
Mark Pizzolato
e62070ad8f SCP: Clean up formatting of EXAMINE/DEPOST help text 2021-03-29 17:10:52 -07:00
Mark Pizzolato
e51d918adb SCP: Assure consistent PC state while preparing RUN command execution
Some simulator reset routines may reference the RUN target PC value
while others may change the PC, so we set the PC value both before
and after any reset is performed.

As reported in #1020
2021-03-13 12:38:39 -08:00
Mark Pizzolato
076c1ef094 SCP: Add support for ~/ references to user home directory when opening files 2021-03-06 14:04:54 -08:00
Mark Pizzolato
06cedc7cbe SCP: Explicitly use sim_fopen rather than the CRTL fopen directly 2021-03-06 05:24:49 -08:00
Mark Pizzolato
a1785ac1d0 SCP: Add optional VM routine that is invoked on specific REGister updates
The new REG_DEPOSIT register flag bit indicates that updates to a
REGister with this flag specified will invoke the sim_vm_reg_update
routine after the data has been updated.
2021-03-02 05:35:04 -08:00
Mark Pizzolato
1a54a2515d SCP: Add HELP SET/SHOW for unit specific commands for DEVICEs with single units 2021-02-28 15:35:50 -08:00
Mark Pizzolato
e9d774908e SCP: Fix compile errors in recent commits 2021-01-13 05:12:30 -08:00
Mark Pizzolato
749dd7d333 SCP: Move utility functions to sim_fio 2021-01-12 07:58:56 -08:00
Mark Pizzolato
597178fc26 SCP: Specify detail in detach messages for buffered files 2021-01-12 05:26:23 -08:00
Mark Pizzolato
6cfd55180f SCP: Assure proper goto and call behavior with spaces in path names 2021-01-07 17:12:06 -08:00
Mark Pizzolato
1f6d0822bd SCP: Clarify description of -A attach switch in the help text
As discussed in #982
2020-12-16 20:07:25 -08:00
Mark Pizzolato
852c0bc1bc SCP: Avoid seeking on attached sequential devices on non seekable files
As reported on #982
2020-12-14 18:48:14 -08:00
Mark Pizzolato
a6e6968cfd SCP: Avoid unexpected breakpoint interaction in revised RUN/GO commands 2020-12-01 12:05:42 -08:00
Mark Pizzolato
d21a344757 SCP: Fix RUN command to reliably allow PC to be specified
Previously, the RUN command would gather and set the desired
PC start address, but then it would invoke the reset logic for all
DEVICEs.  The CPU DEVICE's reset routine might reasonably
initialize the PC to a known state which would the overwrite
the PC specified on the RUN command.  This change performs
the reset before setting the PC to the specified value (or it's
previous value if no PC was supplied on the RUN command).
2020-11-30 13:04:15 -08:00
Mark Pizzolato
5cc86e2440 SCP: Be sure to perform all library close activities whenever exiting 2020-11-26 04:24:55 -08:00
Mark Pizzolato
2571ea5253 SCP: Fixed minor text error in help 2020-11-24 04:46:09 -08:00
Lars Brinkhoff
3fc46f3b57 VIDEO: Allow more than one window.
New sim_video APIs have been added to make it possible for a simulator
to open multiple windows.  Two slightly updated functions are:

t_stat vid_open_window (VID_DISPLAY **vptr, DEVICE *dptr, const char *title, uint32 width, uint32 height, int flags);

Like vid_open, but return a dynamically allocated VID_DISPLAY struct
and return it in *vptr.

t_stat vid_close_all (void);

Close all currently opened windows.

In addition, these new functions correspond completely to the old set
of sim_video functions, except the first argument is a VID_DISPLAY
pointer: vid_close_window, vid_map_rgb_window, vid_draw_window,
vid_refresh_window, vid_set_cursor_window, vid_show_video_window,
vid_is_fullscreen_window, vid_set_fullscreen_window,
vid_set_cursor_position_window.
2020-11-24 13:24:43 +01:00
Mark Pizzolato
93bff5ea05 SCP: Handle ON processing for stdin supplied commands
Additionally, allow STEP to have ON actions
2020-11-18 15:17:04 -08:00
Mark Pizzolato
845a4d8f0e SCP: Silence compiler warning about potential sprintf buffer truncation 2020-11-16 11:36:34 -08:00
Mark Pizzolato
9cb93a64f2 SCP: Slow down debug output writes when the debug fd is non blocking
This problem only appears when debug output is prodigious.  That
prodigious activity is already dramatically affecting timing, so adding
additional delays to allow the debug output to catch up won't
make anything worse.

It appears that we could jump over the C runtime implementation of
fwrite() and do an explicit write() system call and retry that until it
succeeds, but this approach would have two negative consequences:
1) it would jump over other buffered data that the C runtime fwrite()
    may have pending due to output produced by other than debug
    activities, thus emitting output out of order.
2) Windows doesn't have a direct system call used by its C runtime
    for write(), but merely implements write() as part of the C runtime
    and as it turns out that write() returns an int vs a ssize_t type
    result.  An explicit cast could address this, but point 1 would still
    be a concern.

As discussed in #957
2020-11-16 11:09:23 -08:00
Mark Pizzolato
b0ac93294e SCP: Add FLUSH_INTERVAL register to override the default 30 second buffer flush
As indirectly discussed for debug output to a file in #957
2020-11-15 14:28:25 -08:00
Mark Pizzolato
ba5e18e963 SCP: Assure that debug output is aways completely written via fwrite
Previously, the status returned by fwrite() while writing debug output
was ignored and all debug output was presumed to be correctly written.

This change tolerates incomplete writes performed by the C runtime
and retries the remaining writes as long as the retries take.

This change completely presumes that the C runtime fwrite() returns
correct information when the data has not been completely written.
That of course will likely depend on the OS level write function
returning correct informatoin from the write() system call that
fwrite() depends on.

Timing concerns while emitting debug output have always been a
problem since even composing any debug output is likely to be much
more work than basic instruction execution off the current single
instruction.  Clock calibration probably will be fundamentally unreliable.

As discussed in #957
2020-11-13 22:29:32 -08:00
Mark Pizzolato
f9ce5ae8ff SCP: Add whitespace ignore option to file and string content comparisons 2020-11-01 16:27:47 -08:00
Mark Pizzolato
462f5a51b8 SCP: Extend file compare functionality to expose where file differences start 2020-11-01 14:58:47 -08:00
Mark Pizzolato
6748a2c66f SCP: Extend TYPE/CAT command to support offset and line count limit 2020-11-01 14:54:12 -08:00
Mark Pizzolato
ddcc280a17 CONSOLE: Add binary mode option when opening the LOG file. 2020-11-01 09:47:22 -08:00
Mark Pizzolato
9c1f4beae3 SCP: Migrate to use SCP internal timer base reference 2020-10-29 13:06:36 -07:00
Mark Pizzolato
37f2b341d0 SCP: Fix compiler warning about unused variable. 2020-10-27 12:53:40 -07:00
Mark Pizzolato
33e3e7f493 SCP: Fix event dispatching when sim_interval is negative
- When sim_interval is negative (vs 0), more "time" has passed than
  when the first unit event on the queue was supposed to fire.  To
  properly handle this and dispatch this and other events which should
  have fired, time is temporarily backed up to when it was supposed
  to have fired and the event is dispatched.  If it schedules other
  events those will then properly be scheduled relative to the time is
  has fired.  This approach avoids events slipping forward in time.
- Add unit test to exercise event dispatching activities.
2020-10-27 08:33:24 -07:00
Mark Pizzolato
dceadb393e SCP: Add internal & cross platform support for tar and curl commands 2020-10-20 02:50:34 -07:00
Mark Pizzolato
c8a8cca7a3 SCP: Add optional per line multiplexer log files to periodic flushing 2020-10-20 02:47:33 -07:00