comparison src/video/xbios/SDL_xbios.h @ 2072:4b3f98a9a2c1

xbios: preliminary video mode init
author Patrice Mandin <patmandin@gmail.com>
date Mon, 13 Nov 2006 19:59:28 +0000
parents 12ef90a41631
children 790726541708
comparison
equal deleted inserted replaced
2071:579abbb51f80 2072:4b3f98a9a2c1
25 #define _SDL_xbios_h 25 #define _SDL_xbios_h
26 26
27 #include "SDL_stdinc.h" 27 #include "SDL_stdinc.h"
28 #include "../SDL_sysvideo.h" 28 #include "../SDL_sysvideo.h"
29 29
30 /* TT video modes: 2
31 Falcon RVB: 16 (could be *2 by adding PAL/NTSC modes)
32 Falcon VGA: 6
33 ST low: 1
34 */
35 #define SDL_NUMMODES 16
36
37 typedef struct
38 {
39 Uint16 number; /* Video mode number */
40 Uint16 width; /* Size */
41 Uint16 height;
42 Uint16 depth; /* bits per plane */
43 SDL_bool doubleline; /* Double the lines ? */
44 } xbiosmode_t;
45
46 /* Private display data */
47 #define NUM_MODELISTS 2 /* 8 and 16 bits-per-pixel */
48
49 typedef struct SDL_VideoData 30 typedef struct SDL_VideoData
50 { 31 {
51 long cookie_vdo; 32 long cookie_vdo;
33
34 #if 0
52 int old_video_mode; /* Old video mode before entering SDL */ 35 int old_video_mode; /* Old video mode before entering SDL */
53 void *old_video_base; /* Old pointer to screen buffer */ 36 void *old_video_base; /* Old pointer to screen buffer */
54 void *old_palette; /* Old palette */ 37 void *old_palette; /* Old palette */
55 Uint32 old_num_colors; /* Nb of colors in saved palette */ 38 Uint32 old_num_colors; /* Nb of colors in saved palette */
56 int num_modes; /* Number of xbios video modes */ 39 int num_modes; /* Number of xbios video modes */
66 49
67 SDL_bool centscreen; /* Centscreen extension present ? */ 50 SDL_bool centscreen; /* Centscreen extension present ? */
68 51
69 SDL_Rect *SDL_modelist[NUM_MODELISTS][SDL_NUMMODES + 1]; 52 SDL_Rect *SDL_modelist[NUM_MODELISTS][SDL_NUMMODES + 1];
70 xbiosmode_t *videomodes[NUM_MODELISTS][SDL_NUMMODES + 1]; 53 xbiosmode_t *videomodes[NUM_MODELISTS][SDL_NUMMODES + 1];
54 #endif
71 } SDL_VideoData; 55 } SDL_VideoData;
72 56
73 /* _VDO cookie values */ 57 /* _VDO cookie values */
74 enum 58 enum
75 { 59 {
100 #define ST_HIGH 0x0200 84 #define ST_HIGH 0x0200
101 #define TT_LOW 0x0700 85 #define TT_LOW 0x0700
102 #define TT_MED 0x0300 86 #define TT_MED 0x0300
103 #define TT_HIGH 0x0600 87 #define TT_HIGH 0x0600
104 88
105 /* Hidden structure -> variables names */
106 #define SDL_modelist (_this->driverdata->SDL_modelist)
107 #define XBIOS_mutex (_this->driverdata->mutex)
108 #define XBIOS_cvdo (_this->driverdata->cookie_vdo)
109 #define XBIOS_oldpalette (_this->driverdata->old_palette)
110 #define XBIOS_oldnumcol (_this->driverdata->old_num_colors)
111 #define XBIOS_oldvbase (_this->driverdata->old_video_base)
112 #define XBIOS_oldvmode (_this->driverdata->old_video_mode)
113 #define XBIOS_nummodes (_this->driverdata->num_modes)
114 #define XBIOS_modelist (_this->driverdata->mode_list)
115 #define XBIOS_screens (_this->driverdata->screens)
116 #define XBIOS_screensmem (_this->driverdata->screensmem)
117 #define XBIOS_shadowscreen (_this->driverdata->shadowscreen)
118 #define XBIOS_videomodes (_this->driverdata->videomodes)
119 #define XBIOS_doubleline (_this->driverdata->doubleline)
120 #define XBIOS_fbnum (_this->driverdata->frame_number)
121 #define XBIOS_pitch (_this->driverdata->pitch)
122 #define XBIOS_width (_this->driverdata->width)
123 #define XBIOS_height (_this->driverdata->height)
124 #define XBIOS_centscreen (_this->driverdata->centscreen)
125
126 /*--- Functions prototypes ---*/
127
128 void SDL_XBIOS_AddMode(_THIS, Uint16 modecode, Uint16 width, Uint16 height,
129 Uint16 depth, SDL_bool flags);
130
131 #endif /* _SDL_xbios_h */ 89 #endif /* _SDL_xbios_h */
132 /* vi: set ts=4 sw=4 expandtab: */ 90 /* vi: set ts=4 sw=4 expandtab: */