1
0
mirror of https://github.com/simh/simh.git synced 2026-02-26 00:34:36 +00:00

MicroVAX2: Added new video device (VCB02)

This commit is contained in:
Matt Burke
2019-04-10 22:01:52 -07:00
committed by Mark Pizzolato
parent dfd011a9b3
commit 4babf7f529
18 changed files with 4554 additions and 73 deletions

View File

@@ -361,13 +361,12 @@ t_bool vid_key_state[SDL_NUM_SCANCODES];
SDL_Texture *vid_texture; /* video buffer in GPU */
SDL_Renderer *vid_renderer;
SDL_Window *vid_window; /* window handle */
SDL_PixelFormat *vid_format;
uint32 vid_windowID;
#endif
SDL_Thread *vid_thread_handle = NULL; /* event thread handle */
SDL_Cursor *vid_cursor = NULL; /* current cursor */
t_bool vid_cursor_visible = FALSE; /* cursor visibility state */
uint32 vid_mono_palette[2]; /* Monochrome Color Map */
SDL_Color vid_colors[256];
KEY_EVENT_QUEUE vid_key_events; /* keyboard events */
MOUSE_EVENT_QUEUE vid_mouse_events; /* mouse events */
DEVICE *vid_dev;
@@ -631,6 +630,15 @@ if (SDL_SemTryWait (vid_mouse_events.sem) == 0) {
return stat;
}
uint32 vid_map_rgb (uint8 r, uint8 g, uint8 b)
{
#if SDL_MAJOR_VERSION == 1
return SDL_MapRGB (vid_image->format, r, g, b);
#else
return SDL_MapRGB (vid_format, r, g, b);
#endif
}
void vid_draw (int32 x, int32 y, int32 w, int32 h, uint32 *buf)
{
#if SDL_MAJOR_VERSION == 1
@@ -1604,9 +1612,6 @@ if (!initialized) {
sim_debug (SIM_VID_DBG_VIDEO|SIM_VID_DBG_KEY|SIM_VID_DBG_MOUSE, vid_dev, "vid_thread() - Starting\n");
vid_mono_palette[0] = sim_end ? 0xFF000000 : 0x000000FF; /* Black */
vid_mono_palette[1] = 0xFFFFFFFF; /* White */
memset (&vid_key_state, 0, sizeof(vid_key_state));
#if SDL_MAJOR_VERSION == 1
@@ -1646,6 +1651,8 @@ if (!vid_texture) {
return 0;
}
vid_format = SDL_AllocFormat (SDL_PIXELFORMAT_ARGB8888);
SDL_StopTextInput ();
vid_windowID = SDL_GetWindowID (vid_window);
@@ -2317,8 +2324,6 @@ SDL_Delay (vid_beep_duration + 100);/* Wait for sound to finnish */
#else /* !(defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL)) */
/* Non-implemented versions */
uint32 vid_mono_palette[2]; /* Monochrome Color Map */
t_stat vid_open (DEVICE *dptr, const char *title, uint32 width, uint32 height, int flags)
{
return SCPE_NOFNC;
@@ -2339,6 +2344,11 @@ t_stat vid_poll_mouse (SIM_MOUSE_EVENT *ev)
return SCPE_EOF;
}
uint32 vid_map_rgb (uint8 r, uint8 g, uint8 b)
{
return 0;
}
void vid_draw (int32 x, int32 y, int32 w, int32 h, uint32 *buf)
{
return;