1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

100 Commits

Author SHA1 Message Date
Sergey Svishchev
bcdc992cca VIDEO: handle error conditions and uninitialized displays when taking a screenshot. 2025-09-28 04:21:07 -10:00
Mark Pizzolato
af2a0f7caa VIDEO: Build cleanly if PNG support isn't available 2025-05-11 18:15:47 -10:00
Peter Schorn
c7df248f09 SIMH: Fix spelling errors in comments and strings 2024-07-16 12:04:53 -10:00
Patrick Linstruth
524a98b235 VIDEO: Add vid_render_set_logical_size() stub
Fixes oversite of missing sim_video stub function.
2024-06-21 11:41:32 -10:00
Patrick Linstruth
318f44eda5 AltairZ80: Adds Cromemco DAZZLER and JS1 devices
Adds Cromemco Dazzler and JS1 joystick devices
Adds vid_render_set_logical_size() to sim_video.c
2024-05-23 15:15:29 -10:00
Mark Pizzolato
63028863e4 SCP: Default to dynamically loading LIBEDIT, LIBPCRE and LIBPNG 2023-07-27 06:28:53 -10:00
Mark Pizzolato
e42e888298 VIDEO: Initialize SDL_version structures that might not be completely set
B. Scott Michel's run of clang memory sanitizer identified that  some
fields in these structures in some versions on some platforms.
2023-07-15 11:46:31 -10:00
Mark Pizzolato
7e8288d84b VIDEO: Actually fix the handling of EVENT_REDRAW to update the correct window 2023-06-27 11:43:04 -10:00
Lars Brinkhoff
efbf73f384 VIDEO: Include png.h before sim_defs.h.
Older versions of the PNG library header file want to include setjmp.h
and complain if it's already included.
2023-05-11 14:14:00 -10:00
Lars Brinkhoff
f566e104f6 VIDEO: Check whether SDL_WINDOW_RESIZABLE is present.
SDL versions older than 2.0.5 doesn't have this symbol or the
SDL_SetWindowResizable function.
2023-05-11 14:14:00 -10:00
Patrick Linstruth
796a3e1abc AltairZ80: Adds SOL20 and VDM1 devices
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)
2023-03-29 14:19:51 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- 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.
2023-03-04 17:51:49 -10:00
Lars Brinkhoff
34b21dab4c VIDEO: Fix bug handling a redraw event.
An event pulled from the queue after redraw has been handled needs to
update the vptr pointer.
2022-10-29 20:18:16 +02:00
Lars Brinkhoff
fb20442ffd VIDEO: Not all events come with a valid windowID. 2022-10-17 08:35:24 +02:00
Lars Brinkhoff
c9bfb77396 VIDEO: Fix bug: vid_ready can be used uninitialized. 2022-10-16 22:07:01 +02:00
Mark Pizzolato
dca61c580a VIDEO: Assure that vid_version() displays all the video capabilities available 2022-09-27 13:56:36 -10:00
Mark Pizzolato
252f674fc8 VIDEO: Provide a user configurable option to enable the screen saver
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
2022-07-19 05:47:44 -10:00
Mark Pizzolato
8da65638df VIDEO: Avoid disabling screen saver until a video display is active 2022-07-15 07:37:17 -10:00
Mark Pizzolato
ac955b270d VIDEO: Fix broken beep behavior that caused infinite loop 2022-01-15 11:21:27 -08:00
Lars Brinkhoff
a615b89f11 VIDEO: Fix bug in vid_dst_last handling.
The handling of vid_dst_last and vid_data_last was not updated to work
with multiple windows, which can cause window updates to be lost.
2021-09-04 10:02:49 +02:00
Mark Pizzolato
f95b20e1f3 SCP: Cleanup potential compiler warnings 2021-08-13 09:09:53 -07:00
Lars Brinkhoff
ab48f31317 video: Ignore events from unrecognized windows.
Print information about ignored event.
2021-04-20 18:37:32 +02:00
Lars Brinkhoff
1d613f1f50 VIDEO: Fix use of uninitialized variable. 2021-03-06 09:59:50 +01:00
Lars Brinkhoff
ed4b204584 VIDEO: Allow setting alpha blending mode. 2021-02-27 14:43:18 +01:00
Mark Emmer
10f3a9dea3 VIDEO: Initialize event structure to 0 before waiting for events
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.
2021-02-25 13:30:34 -08:00
Mark Pizzolato
c6710ee054 VIDEO: Silence minor compiler warning 2020-12-02 14:45:41 -08:00
Lars Brinkhoff
970fb8ec95 PDP10, ETHER, VIDEO, VAX: Fix set but unused variables. 2020-11-25 04:50:47 -08:00
Lars Brinkhoff
66a426c48e VIDEO: Add stubs for new APIs. 2020-11-25 09:17:14 +01: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
Lars Brinkhoff
6ca7a938ad VIDEO: Stretch frame buffer to accomodate output window. 2020-07-08 08:28:38 +02:00
Lars Brinkhoff
d93bfe62de VIDEO: Add API for querying and setting fullscreen mode. 2020-07-08 08:28:35 +02:00
Mark Pizzolato
337062fcf0 VIDEO: Always raise priority of thread consuming SDL Events 2020-06-13 05:05:11 -07:00
Mark Pizzolato
be117a33bd VIDEO: Move beep and joystick/gamepad init & cleanup into SDL event thread 2020-06-12 22:00:25 -07:00
Mark Pizzolato
973ee4cecb VIDEO: Assure proper initialization sequence in both operating modes
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.
2020-06-12 05:29:36 -07:00
Mark Pizzolato
737f31fea0 VIDEO: Move gamecontroller/joystick cleanup to the right place. 2020-06-11 12:53:28 -07:00
Mark Pizzolato
ebb327bff6 VIDEO: Protect all accesses to last draw buffers
- Cleanup order of gamepad/joystick shutdown to avoid unwinding these
  things while the rendering thread may still reference them.
2020-06-11 07:00:54 -07:00
Mark Pizzolato
9331d14e30 VIDEO: Avoid queuing draw events for identical unprocessed regions 2020-06-10 23:05:54 -07:00
Mark Pizzolato
6c6f66914d VIDEO: Explicitly initialize and cleanup SDL Audio subsystem
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.
2020-06-10 07:30:36 -07:00
Mark Pizzolato
0f992e1db7 VIDEO: Remove support for libSDL (prior to libSDL2)
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.
2020-05-28 11:40:35 -07:00
Lars Brinkhoff
8b64e5df1a VIDEO: SDL init/quit gamecontroller subsystem implies joystick. 2020-02-25 06:38:19 +01:00
Lars Brinkhoff
a562c8727b video: SDL_ControllerButtonEvent button conversion.
Uint8 needs casting to SDL_GameControllerButton.
2020-02-09 13:15:21 -08:00
Lars Brinkhoff
72b89054da video: Add support for SDL joysticks and game controllers. 2020-02-07 16:58:24 +01:00
Lars Brinkhoff
05e4babe24 video: Take address of SDL event union member rather than casting pointer. 2020-02-07 16:58:19 +01:00
Mark Pizzolato
9777e8fa36 VIDEO: Add zlib version to version string (zlib used by png) 2019-12-16 11:21:23 -08:00
Mark Pizzolato
354a1e42ea VIDEO: Add display of versions of dependent libraries (libpng, zlib)
Add specific makefile check for zlib being available
2019-07-30 22:30:03 -07:00
Mark Pizzolato
24ed486222 VIDEO: Fix coverity identified memory allocation failure error check 2019-07-05 09:59:08 -07:00
Matt Burke
4babf7f529 MicroVAX2: Added new video device (VCB02) 2019-04-10 22:01:52 -07:00
Mark Pizzolato
c7b0928b33 SCP: Avoid potential buffer overruns by using strlcpy() and strlcat() 2019-03-08 12:31:01 -08:00
Mark Pizzolato
627c7e3e25 VIDEO: Issue reasonable failure message when SDL can't initialize 2018-07-03 13:58:40 -07:00
Mark Pizzolato
e522daf906 SCP: Replace stray TAB and fix sprintf format specifier 2017-04-23 23:43:14 -07:00