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.
This commit is contained in:
Mark Pizzolato 2015-02-05 09:22:36 -08:00
parent e40d81dbf2
commit 4ee599b97e
3 changed files with 13 additions and 0 deletions

7
scp.c
View file

@ -1107,6 +1107,9 @@ static const char simh_help[] =
"+sh{ow} ethernet show ethernet devices\n" "+sh{ow} ethernet show ethernet devices\n"
"+sh{ow} serial show serial devices\n" "+sh{ow} serial show serial devices\n"
"+sh{ow} multiplexer show open multiplexer 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} clocks show calibrated timers\n"
"+sh{ow} throttle show throttle info\n" "+sh{ow} throttle show throttle info\n"
"+sh{ow} on show on condition actions\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_ETHERNET "*Commands SHOW"
#define HLP_SHOW_SERIAL "*Commands SHOW" #define HLP_SHOW_SERIAL "*Commands SHOW"
#define HLP_SHOW_MULTIPLEXER "*Commands SHOW" #define HLP_SHOW_MULTIPLEXER "*Commands SHOW"
#define HLP_SHOW_VIDEO "*Commands SHOW"
#define HLP_SHOW_CLOCKS "*Commands SHOW" #define HLP_SHOW_CLOCKS "*Commands SHOW"
#define HLP_SHOW_ON "*Commands SHOW" #define HLP_SHOW_ON "*Commands SHOW"
#define HLP_SHOW_SEND "*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 }, { "SERIAL", &sim_show_serial, 0, HLP_SHOW_SERIAL },
{ "MULTIPLEXER", &tmxr_show_open_devices, 0, HLP_SHOW_MULTIPLEXER }, { "MULTIPLEXER", &tmxr_show_open_devices, 0, HLP_SHOW_MULTIPLEXER },
{ "MUX", &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 }, { "CLOCKS", &sim_show_timers, 0, HLP_SHOW_CLOCKS },
{ "SEND", &sim_show_send, 0, HLP_SHOW_SEND }, { "SEND", &sim_show_send, 0, HLP_SHOW_SEND },
{ "EXPECT", &sim_show_expect, 0, HLP_SHOW_EXPECT }, { "EXPECT", &sim_show_expect, 0, HLP_SHOW_EXPECT },

View file

@ -41,6 +41,11 @@ t_bool vid_mouse_b2 = FALSE;
t_bool vid_mouse_b3 = FALSE; t_bool vid_mouse_b3 = FALSE;
char vid_release_key[64] = "Ctrl-Right-Shift"; 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) #if defined(HAVE_LIBSDL)
#include <SDL.h> #include <SDL.h>
#include <SDL_thread.h> #include <SDL_thread.h>

View file

@ -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_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_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_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 t_bool vid_active;
extern uint32 vid_mono_palette[2]; extern uint32 vid_mono_palette[2];