Commit graph

53 commits

Author SHA1 Message Date
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
Matt Burke
c94edb6b2d VAXStations: Improvements and bug fixes to keyboard and mouse devices
Whilst working on a new video device I ran into a few problems with the
LKxxx keyboard and I noticed there are already some open issues against
the keyboard and mouse devices. These changes should resolve #320 and
may help with #272 (although I think that is an SDL issue). I've tested these
changes with VWS, UWS and DECwindows with both captured and
uncaptured input modes.
2017-04-23 10:40:00 -07:00
Mark Pizzolato
d741bdc375 VIDEO: Allow SCREENSHOT command to optionally specify bitmap file extension
When PNG support is available, both .png and .bmp screenshots can be
generated based on the file extension specified by the user on the SCREENSHOT
command.  If no extension is specified, then a PNG format screenshot will be
produced.
2016-06-15 00:27:07 -07:00
Mark Pizzolato
a24aba69ae VIDEO: Added priority boost to thread performing SDL processing and updates
Reworked all priority adjustment code to leverage a new
sim_os_set_thread_priority API which is coded to use pthreads or OS
priority adjustment APIs as necessary.
2016-06-11 09:52:33 -07:00
Mark Pizzolato
3743d3d68a VIDEO: Avoid losing mouse button state when coalescing motion events
Identified by @shattered in #321

Added better debug output for keyboard events.
2016-06-11 08:39:25 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
717f3820b9 VIDEO: cleanup SHOW VERSION output when video support isn't available. 2016-04-26 20:58:05 -07:00
Mark Pizzolato
aadd66c7c7 VIDEO: Fix uninitialized pointer reference under libSDL
This change fixes issue #276
2016-02-15 12:53:30 -08:00
Mark Pizzolato
51419a2e4b VIDEO: Add ability for a video window Quit event to optionally propagate back to SCP. 2016-01-29 00:30:02 -08:00
Mark Pizzolato
4f3dd08314 VIDEO: Add window title to vid_open. 2016-01-28 11:29:53 -08:00
Mark Pizzolato
21b31fc3a8 VIDEO: Add hot location functionality to cursor support.
Also sanely report memory allocation errors.
2016-01-28 07:58:02 -08:00
Mark Pizzolato
dce0aa2935 VIDEO: Add SDL audio support to generate a beep. Add absolute pointer position to mouse events. 2016-01-25 17:14:08 -08:00
Mark Pizzolato
33b88a3e83 VIDEO: Act on potential libSDL error return values 2015-12-06 18:02:45 -08:00
Mark Pizzolato
2029c3eb7f VIDEO: Restore direct update of video bitmap data when using libSDL (vs libSDL2). 2015-12-01 08:42:12 -08:00
Mark Pizzolato
b64401cbdd VIDEO: Fix crash using libSDL on hosts which display using X11. 2015-12-01 08:04:01 -08:00
Mark Pizzolato
4921d92650 VIDEO: Produce SCREENSHOT images in PNG format if libpng is available in the host build environment 2015-09-27 16:14:55 -07:00
Mark Pizzolato
13bb3356f5 VIDEO: Fix vid_draw to copy drawing data before returning when drawing is deferred.
Using SDL2 the draw operations are performed in a separate thread and thus the data must be cached while the request is passed to the separate thread while control returns to the caller.
2015-09-20 13:38:11 -07:00
Mark Pizzolato
42403efd1f VIDEO: Avoid compiler warning when building without video support 2015-09-17 14:52:49 -07:00
Mark Pizzolato
78399f10cb SCP: Added a SCREENSHOT command to record the video display window. 2015-09-17 11:49:01 -07:00
Mark Pizzolato
1348a1fbaa VIDEO: Fix building of video capable simulators on host systems which don't have libsdl available. 2015-04-13 06:22:11 -07:00
Mark Pizzolato
a7d0b0e3f3 VIDEO: Fix video capable simulator builds on platforms which don't have libSDL available at all by enabling stub code 2015-04-11 05:53:01 -07:00
Mark Pizzolato
66dba79418 ALPHA, ALTAIR, AltairZ80, I7094, NOVA, PDP1, PDP10, PDP11, PDP18B, PDP8, SAGE, sigma, swtp6800, TX-0, VAX: Change tabs to spaces which had crept in over time 2015-03-30 10:24:24 -07:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
9accae5905 BESM6 and VAX: Cleanup for building on VMS 2015-02-12 12:32:39 -08:00
Mark Pizzolato
960b22d930 VIDEO: Fix build when using SDL2 versions prior to 2.0.3. Fix #187 2015-02-08 11:33:56 -08:00
Mark Pizzolato
c9eb08c767 VIDEO: Fix build when using SDL vs SDL2 2015-02-05 09:58:40 -08:00
Mark Pizzolato
4ee599b97e SCP: Added a SHOW VIDEO command for simulators which include video devices
This displays the capabilities of the available SDL environment on the running platform.
2015-02-05 09:22:36 -08:00
Mark Pizzolato
e40d81dbf2 VIDEO: Add proper WRU detection when SIM_VIDEO is used on OS X. 2015-02-05 08:44:16 -08:00
Mark Pizzolato
93a2f9f5a7 VIDEO: Fix build when SDL libraries are not available 2015-02-05 05:55:15 -08:00
Mark Pizzolato
2142168dfd VIDEO: Restructured vid_show_video to perform SDL APIs on the SDL event thread. 2015-02-05 05:07:50 -08:00
Mark Pizzolato
8c4397ee25 VIDEO: Initial working OSX support 2015-02-04 17:03:52 -08:00
Mark Pizzolato
cd4da419bb VIDEO: Changed SDL2 vid_draw implementation to perform all texture references in the event processing thread 2015-02-04 04:53:23 -08:00
Mark Pizzolato
4cb4477077 VIDEO: Restructured SDL threading model to perform all event processing in the main thread and run the application main logic in a different thread. 2015-02-03 14:49:45 -08:00
Mark Pizzolato
383ce78c91 VAX,MicroVAX,QVSS: Video improvements
VIDEO:
- Make mouse motion activity consistent with SDL relative direction.  Add error output when mouse events are discarded due to queue full.
  If a client application delivers motion information in a different relative sense, then that application needs to make the adjustments from the SDL standard direction.
- Added SHOW dev VIDEO capability to describe the underlying SDL video capabilities of the current SDL library and host execution environment.
- Force software based rendering under SDL2.  Enhanced debug info.
- Added host OS cursor integration support.
- Reorganize libSDL vs libSDL2 version implementation to leverage common logic without replication.

QVSS:
- Coalesced adjacent screen row updates to minimize vid_draw operations
- Report all relative mouse motion in the mouse position register AND mouse motion data.
- Added debugging information for cursor and scan line map updates
- Add option "SET QVSS CAPTURED" to force capture input mode.
2015-02-02 16:01:49 -08:00
Mark Pizzolato
f0f3176c78 VIDEO: Fix build for platforms with SDL2 prior to v2.0.2. Fix #177 2015-01-21 21:38:29 -08:00
Mark Pizzolato
433fa20c03 VIDEO: Added SDL2 error checking coalescing of mouse motion events which are queued concurrently. 2015-01-16 17:25:38 -08:00
Mark Pizzolato
722579c661 VIDEO: SDL2 Ignoring multiple successively queued REDRAW events to avoid overrunning the GPU 2015-01-16 14:50:44 -08:00
Mark Pizzolato
136f5867b6 VIDEO: Migrate SDL2 vid_draw to SDL_UpdateTexture for just the requested rectangle 2015-01-16 12:02:24 -08:00
Mark Pizzolato
ad6dd02f18 VIDEO: Change the SDL mouse position in window to reflect the simulated mouse position. 2015-01-14 15:19:03 -08:00
Mark Pizzolato
3951ad2432 Cleanup of unneeded global extern declarations 2014-10-10 08:18:15 -07:00
Mark Pizzolato
1e0b83ca10 SCP: Avoid building sim_video code when it isn't used by a simulator.
This results in smaller simulator binaries.
2014-09-16 11:05:31 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
b57201b88b QVSS/VIDEO: Fix for mouse tracking on Ultrix from Mike Burke for issue #88 2013-11-08 17:15:02 -08:00
Mark Pizzolato
30cd103a14 VIDEO: When using libSDL2, make sure we use the key scan code to index the vid_key_state array. Also, make sure we stick to getting bare key events instead of TextInput events. 2013-11-07 14:04:36 -08:00
Mark Pizzolato
6b45d9b2ad SCP/VIDEO: Added support for libSDL2 video capabilities. Changed existing video layer to carry pixels as 32bpp vs 8bpp for more natural behaviors in libSDL2. 2013-10-01 15:55:10 -07:00
Mark Pizzolato
351d748b4a VIDEO: Move all SDL graphics activities to the background video thread 2013-09-26 12:38:17 -07:00
Mark Pizzolato
610b7b5789 VIDEO: Moved SDL initialization and cleanup from event thread to the primary thread.
This allows for any errors to be caught more easily and seems to be required on some platforms (OSX).
2013-09-26 09:50:29 -07:00
Mark Pizzolato
8617a58c8f VAX/QVSS: Added debugging support to sim_video 2013-09-25 16:41:40 -07:00