From 4ee599b97e8bb1d6846c0810caf15099069da2e5 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 5 Feb 2015 09:22:36 -0800 Subject: [PATCH] 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. --- scp.c | 7 +++++++ sim_video.c | 5 +++++ sim_video.h | 1 + 3 files changed, 13 insertions(+) diff --git a/scp.c b/scp.c index e70979a3..1f8e1bea 100644 --- a/scp.c +++ b/scp.c @@ -1107,6 +1107,9 @@ static const char simh_help[] = "+sh{ow} ethernet show ethernet devices\n" "+sh{ow} serial show serial devices\n" "+sh{ow} multiplexer show open multiplexer devices\n" +#if defined(USE_SIM_VIDEO) + "+sh{ow} video show video capabilities\n" +#endif "+sh{ow} clocks show calibrated timers\n" "+sh{ow} throttle show throttle info\n" "+sh{ow} on show on condition actions\n" @@ -1132,6 +1135,7 @@ static const char simh_help[] = #define HLP_SHOW_ETHERNET "*Commands SHOW" #define HLP_SHOW_SERIAL "*Commands SHOW" #define HLP_SHOW_MULTIPLEXER "*Commands SHOW" +#define HLP_SHOW_VIDEO "*Commands SHOW" #define HLP_SHOW_CLOCKS "*Commands SHOW" #define HLP_SHOW_ON "*Commands SHOW" #define HLP_SHOW_SEND "*Commands SHOW" @@ -1779,6 +1783,9 @@ static SHTAB show_glob_tab[] = { { "SERIAL", &sim_show_serial, 0, HLP_SHOW_SERIAL }, { "MULTIPLEXER", &tmxr_show_open_devices, 0, HLP_SHOW_MULTIPLEXER }, { "MUX", &tmxr_show_open_devices, 0, HLP_SHOW_MULTIPLEXER }, +#if defined(USE_SIM_VIDEO) + { "VIDEO", &vid_show, 0, HLP_SHOW_VIDEO }, +#endif { "CLOCKS", &sim_show_timers, 0, HLP_SHOW_CLOCKS }, { "SEND", &sim_show_send, 0, HLP_SHOW_SEND }, { "EXPECT", &sim_show_expect, 0, HLP_SHOW_EXPECT }, diff --git a/sim_video.c b/sim_video.c index 71cfd7e2..455908f9 100644 --- a/sim_video.c +++ b/sim_video.c @@ -41,6 +41,11 @@ t_bool vid_mouse_b2 = FALSE; t_bool vid_mouse_b3 = FALSE; char vid_release_key[64] = "Ctrl-Right-Shift"; +t_stat vid_show (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc) +{ +return vid_show_video (st, uptr, val, desc); +} + #if defined(HAVE_LIBSDL) #include #include diff --git a/sim_video.h b/sim_video.h index b0fc6493..e2b6b383 100644 --- a/sim_video.h +++ b/sim_video.h @@ -186,6 +186,7 @@ t_stat vid_set_cursor (t_bool visible, uint32 width, uint32 height, uint8 *data, t_stat vid_set_release_key (FILE* st, UNIT* uptr, int32 val, void* desc); t_stat vid_show_release_key (FILE* st, UNIT* uptr, int32 val, void* desc); t_stat vid_show_video (FILE* st, UNIT* uptr, int32 val, void* desc); +t_stat vid_show (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc); extern t_bool vid_active; extern uint32 vid_mono_palette[2];