Commit graph

761 commits

Author SHA1 Message Date
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
Mark Pizzolato
f1a513b8bf SCP: Expedite simulator detection of WRU delivery by signal 2020-10-19 12:28:11 -07:00
Mark Pizzolato
31606161ce SCP: Avoid potential compiler warnings
Essentially all are non-functional problems but silencing them is a good idea
2020-10-09 05:09:41 -07:00
Mark Pizzolato
9ef15802f0 SCP: Report name of device that returns an error from its initial reset call 2020-10-05 17:48:37 -07:00
Mark Pizzolato
18472dc666 SCP: Avoid dual output of HELP output in remote console sessions
As reported in #931
2020-09-29 13:38:24 -07:00
Mark Pizzolato
2a75aa630c SCP: Ignore subsequent SIGTERM receipt after initial receipt.
The OS may signal SIGTERM more than once before ultimately
issuing a SIGKILL.  The initial SIGTERM will stop execution and
initiate optional simulator cleanup.  Ignoring follow up SIGTERMs
will allow as much cleanup as possible to be achieved and thus
allow the simulator to complete its cleanup and exit or ultimately
exit die due to receipt of SIGKILL.

Likewise for SIGHUP on hosts that can issue SIGHUP.
2020-09-17 14:00:10 -07:00
Mark Pizzolato
5a9cd144d3 SCP: Save global switches before dispatching to DEVICE reset routines 2020-09-15 04:44:22 -07:00
Mark Pizzolato
60e5484541 SCP: Allow flexible switch presence on TESTLIB commands 2020-08-22 18:35:30 -07:00
Mark Pizzolato
76bf686648 SCP: Restore -D option for TESTLIB command
Adding the automatic detach_all ended up always clearing the switches.
2020-08-21 12:31:30 -07:00
Mark Pizzolato
407696ccc3 SCP: Allow overlapping input and result string while parsing glyphs 2020-08-21 12:09:17 -07:00
Mark Pizzolato
b9b8a496d6 SCP: Properly process program -T switch to invoke all library tests 2020-08-21 12:06:11 -07:00
Mark Pizzolato
dca1c45e80 SCP: Assure that library unit tests are run under reasonable conditions. 2020-08-16 06:40:49 -07:00
Larry Baker
4041894b67 TAPE: Fix potential crash in library unit tests
Improper declaration of state variables referenced in setjmp/longjmp.
2020-08-15 16:21:02 -07:00
Mark Pizzolato
961e1b0513 SCP: Move GET_SWITCHES and GET_RADIX macros from scp.c to scp.h 2020-08-11 07:27:51 -07:00
Mark Pizzolato
892f7d5636 SCP: Avoid additional potential buffer overflow formatting debug repeat count
As reported in #915
2020-07-16 14:46:15 -07:00
Mark Pizzolato
a6198d8fad SCP: Avoid potential buffer overflow when formatting debug repeat count
As reported in #915
2020-07-15 20:15:21 -07:00
Mark Pizzolato
166852935d SCP: Fix corner case formatting for long device name support 2020-07-08 12:48:11 -07:00
Mark Pizzolato
9711fc017b SCP: Silence potential compiler warning 2020-06-27 18:52:25 -07:00
Mark Pizzolato
fe4a2a28b6 SCP: Support output formatting when long DEVICE names are defined
As discussed in #901
2020-06-26 22:49:30 -07:00
Mark Pizzolato
1764e9fd08 SCP: Rework REGister Sanity Checks to reject 0 bit wide register definitions 2020-06-22 16:37:02 -07:00
Mark Pizzolato
09ae6da2cc SCP: Accommodate negative sim_interval while processing event queue
As discussed in #886
2020-06-15 02:29:05 -07:00
Mark Pizzolato
3e5bd84523 makefile, Visual Studio build: Report uncommitted changes in commit-id 2020-06-08 14:16:49 -07:00
Mark Pizzolato
65778c7664 REMOTE_CONSOLE: Make STEP behavior consistent in master mode
As discussed in #866
2020-06-06 08:40:49 -07:00
Mark Pizzolato
f519513f50 SCP, HP2100, HP3000, I650: Move one time initialization activities to cpu_reset
The paradigm of using a "weak" linker reference to find what was
previously the vm_init_routine() doesn't work reliably on all compile
environments supported by the simulators.  This has been reported
in #794 and it came up again in #862.  This change assures that
it will not come up again AND it reliably solves the problem with
Visual Studio compilers (and linker) that randomly chooses whether
to have the desired effect or not.

Of the 82 simulators which are currently part of simh, only these
three used the sim_vm_init() interface, so removing it had relatively
minor impact.
2020-05-26 06:25:01 -07:00
Mark Pizzolato
5b793198c6 SCP: Flush stdout after writing command prompt
Possibly address problem discussed in #861
2020-05-24 16:11:01 -07:00
Mark Pizzolato
5ec4b3f2f4 SCP: Fix remote console command table ordering to have STEP near the beginning
This allowed user entered S to match the SAMPLEOUT command instead
of STEP.  That then identified a bug in the intended socket output
processing to attempt to be written to the undefined debug file.

As discussed in #854
2020-05-22 10:12:11 -07:00
Mark Pizzolato
ca51776ec7 SCP: Enable global message suppression by library code
The global variable sim_show_message as 0 will suppress message
output which may be needed from time to time by library code.
2020-05-22 10:11:40 -07:00
Mark Pizzolato
6fdd917ee8 SCP: Properly handle MTAB entries with MTAB_QUOTE values 2020-05-18 16:41:21 -07:00