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.
Faster host systems today can get very fast instruction execution rates
for a short duration calibration test. These may be skewed by round
off error, so we now run the calibration for a minimum of 100ms.
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
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
This is all around the tmxr_set_get_modem_bits() API.
This change is non operational, but this clarification would avoid the
mistake made when someone uses or thinks about changing that
API in the future.
The prior change disabled returning DTR and RTS which the documented
interface was quite specific about actively returning.
The only user of this API which actually cared about DTR and RTS was
the in the pdp11_dmc module.
As reported in #951