This PR adds support for the Processor Technology VDM-1 display adapter and Sol-20 computer system. The VDM-1 was integrated into the Sol-20 but has been separated out into its own device.
This PR adds the following devices to the AltairZ80 simulator:
VDM1 - Processor Technology VDM-1 display adapter
SOL20 - Processor Technology SOL20 with SOLOS ROMs
SOL20K - SOL20 Keyboard (callback from VDM1)
SOL20T - SOL20 Tape (reads/writes cassette file images)
SOL20S - SOL20 Serial Port (TMXR capable)
SOL20P - SOL20 Printer Port (TMXR capable)
- Add common system includes used in may places which are allowed
and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
for use only by SCP library routines into sim_scp_private.h.
The environment variable SDL_VIDEO_ALLOW_SCREENSAVER can override the
default that disables the OS screen saver if a video window is displayed
by the simulator.
sim> set env SDL_VIDEO_ALLOW_SCREENSAVER=1
No clear reason to do this, given the SDL code path in the call to
SDL_WaitEvent, but initializing at startup adds no overhead and
was reported to help some debugging activities.
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.
There are two separate running contexts that provide video capabilities:
1) Video event processing threads created on the fly as needed
2) Video events must be run in the context of the initial thread in
a process. In this context simulation and SCP runs in a created
thread and when video activities are enabled needed activities
are passed back to the primary thread to be handled.
As mentioned in #873, there didn't appear to be a problem at runtime,
but the formal definition suggests SDL_InitSubSystem and its cleanup
should be called. It is likely that, as a vestige of SDL 1.2,
SDL_OpenAudio is doing this under the covers. No harm adding it.
All interesting simh host platforms have long supported libSDL2
functionality which wasn't the case when sim_video was initially
implemented. The mixed API set significantly complicates maintaining
and extending sim_video, hence this explicit effort to remove
the vestiges of the old libSDL API.