Define flags for double line and c2p operations. More Milan video work. SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sun, 20 Sep 2009 12:08:51 +0000
branchSDL-1.2
changeset 41986405314a7c07
parent 4197 1bf6585720e9
child 4199 4c92a3d196f1
Define flags for double line and c2p operations. More Milan video work.
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios.h
src/video/xbios/SDL_xbios_blowup.c
src/video/xbios/SDL_xbios_centscreen.c
src/video/xbios/SDL_xbios_milan.c
src/video/xbios/SDL_xbios_milan.h
src/video/xbios/SDL_xbios_sb3.c
     1.1 --- a/src/video/xbios/SDL_xbios.c	Sat Sep 19 21:58:59 2009 +0000
     1.2 +++ b/src/video/xbios/SDL_xbios.c	Sun Sep 20 12:08:51 2009 +0000
     1.3 @@ -98,40 +98,40 @@
     1.4  /* Default list of video modes */
     1.5  
     1.6  static const xbiosmode_t stmodes[1]={
     1.7 -	{ST_LOW>>8,320,200,4,SDL_FALSE}
     1.8 +	{ST_LOW>>8,320,200,4, XBIOSMODE_C2P}
     1.9  };
    1.10  
    1.11  static const xbiosmode_t ttmodes[2]={
    1.12 -	{TT_LOW,320,480,8,SDL_FALSE},
    1.13 -	{TT_LOW,320,240,8,SDL_TRUE}	/* Software double-lined mode */
    1.14 +	{TT_LOW,320,480,8, XBIOSMODE_C2P},
    1.15 +	{TT_LOW,320,240,8, XBIOSMODE_C2P|XBIOSMODE_DOUBLELINE}
    1.16  };
    1.17  
    1.18  static const xbiosmode_t falconrgbmodes[16]={
    1.19 -	{BPS16|COL80|OVERSCAN|VERTFLAG,768,480,16,SDL_FALSE},
    1.20 -	{BPS16|COL80|OVERSCAN,768,240,16,SDL_FALSE},
    1.21 -	{BPS16|COL80|VERTFLAG,640,400,16,SDL_FALSE},
    1.22 -	{BPS16|COL80,640,200,16,SDL_FALSE},
    1.23 -	{BPS16|OVERSCAN|VERTFLAG,384,480,16,SDL_FALSE},
    1.24 -	{BPS16|OVERSCAN,384,240,16,SDL_FALSE},
    1.25 -	{BPS16|VERTFLAG,320,400,16,SDL_FALSE},
    1.26 -	{BPS16,320,200,16,SDL_FALSE},
    1.27 -	{BPS8|COL80|OVERSCAN|VERTFLAG,768,480,8,SDL_FALSE},
    1.28 -	{BPS8|COL80|OVERSCAN,768,240,8,SDL_FALSE},
    1.29 -	{BPS8|COL80|VERTFLAG,640,400,8,SDL_FALSE},
    1.30 -	{BPS8|COL80,640,200,8,SDL_FALSE},
    1.31 -	{BPS8|OVERSCAN|VERTFLAG,384,480,8,SDL_FALSE},
    1.32 -	{BPS8|OVERSCAN,384,240,8,SDL_FALSE},
    1.33 -	{BPS8|VERTFLAG,320,400,8,SDL_FALSE},
    1.34 -	{BPS8,320,200,8,SDL_FALSE}
    1.35 +	{BPS16|COL80|OVERSCAN|VERTFLAG,768,480,16,0},
    1.36 +	{BPS16|COL80|OVERSCAN,768,240,16,0},
    1.37 +	{BPS16|COL80|VERTFLAG,640,400,16,0},
    1.38 +	{BPS16|COL80,640,200,16,0},
    1.39 +	{BPS16|OVERSCAN|VERTFLAG,384,480,16,0},
    1.40 +	{BPS16|OVERSCAN,384,240,16,0},
    1.41 +	{BPS16|VERTFLAG,320,400,16,0},
    1.42 +	{BPS16,320,200,16,0},
    1.43 +	{BPS8|COL80|OVERSCAN|VERTFLAG,768,480,8,XBIOSMODE_C2P},
    1.44 +	{BPS8|COL80|OVERSCAN,768,240,8,XBIOSMODE_C2P},
    1.45 +	{BPS8|COL80|VERTFLAG,640,400,8,XBIOSMODE_C2P},
    1.46 +	{BPS8|COL80,640,200,8,XBIOSMODE_C2P},
    1.47 +	{BPS8|OVERSCAN|VERTFLAG,384,480,8,XBIOSMODE_C2P},
    1.48 +	{BPS8|OVERSCAN,384,240,8,XBIOSMODE_C2P},
    1.49 +	{BPS8|VERTFLAG,320,400,8,XBIOSMODE_C2P},
    1.50 +	{BPS8,320,200,8,XBIOSMODE_C2P}
    1.51  };
    1.52  
    1.53  static const xbiosmode_t falconvgamodes[6]={
    1.54 -	{BPS16,320,480,16,SDL_FALSE},
    1.55 -	{BPS16|VERTFLAG,320,240,16,SDL_FALSE},
    1.56 -	{BPS8|COL80,640,480,8,SDL_FALSE},
    1.57 -	{BPS8|COL80|VERTFLAG,640,240,8,SDL_FALSE},
    1.58 -	{BPS8,320,480,8,SDL_FALSE},
    1.59 -	{BPS8|VERTFLAG,320,240,8,SDL_FALSE}
    1.60 +	{BPS16,320,480,16,0},
    1.61 +	{BPS16|VERTFLAG,320,240,16,0},
    1.62 +	{BPS8|COL80,640,480,8,XBIOSMODE_C2P},
    1.63 +	{BPS8|COL80|VERTFLAG,640,240,8,XBIOSMODE_C2P},
    1.64 +	{BPS8,320,480,8,XBIOSMODE_C2P},
    1.65 +	{BPS8|VERTFLAG,320,240,8,XBIOSMODE_C2P}
    1.66  };
    1.67  
    1.68  /* Xbios driver bootstrap functions */
    1.69 @@ -492,7 +492,31 @@
    1.70  			}
    1.71  			break;
    1.72  		case VDO_MILAN:
    1.73 -			SDL_XBIOS_ListMilanModes(this, 0);
    1.74 +			{
    1.75 +				SCREENINFO si;
    1.76 +
    1.77 +				/* Read infos about current mode */ 
    1.78 +				VsetScreen(-1, &XBIOS_oldvmode, MI_MAGIC, CMD_GETMODE);
    1.79 +				this->info.current_w = si.scrWidth;
    1.80 +				this->info.current_h = si.scrHeight;
    1.81 +
    1.82 +				si.size = sizeof(SCREENINFO);
    1.83 +				si.devID = XBIOS_oldvmode;
    1.84 +				si.scrFlags = 0;
    1.85 +				VsetScreen(-1, &si, MI_MAGIC, CMD_GETINFO);
    1.86 +
    1.87 +				XBIOS_oldnumcol = 0;
    1.88 +				if (si.scrFlags & SCRINFO_OK) {
    1.89 +					if (si.scrPlanes <= 8) {
    1.90 +						XBIOS_oldnumcol = 1<<si.scrPlanes;
    1.91 +					}
    1.92 +				}
    1.93 +				if (XBIOS_oldnumcol) {
    1.94 +					VgetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
    1.95 +				}
    1.96 +
    1.97 +				SDL_XBIOS_ListMilanModes(this, 0);
    1.98 +			}
    1.99  			break;
   1.100  	}
   1.101  
   1.102 @@ -653,7 +677,7 @@
   1.103  	new_screen_size = width * height * ((new_depth)>>3);
   1.104  	new_screen_size += 256; /* To align on a 256 byte adress */	
   1.105  
   1.106 -	if (new_depth == 8) {
   1.107 +	if (new_video_mode->flags & XBIOSMODE_C2P) {
   1.108  		XBIOS_shadowscreen = Atari_SysMalloc(new_screen_size, MX_PREFTTRAM);
   1.109  
   1.110  		if (XBIOS_shadowscreen == NULL) {
   1.111 @@ -664,10 +688,8 @@
   1.112  	}
   1.113  
   1.114  	/* Output buffer needs to be twice in size for the software double-line mode */
   1.115 -	XBIOS_doubleline = SDL_FALSE;
   1.116 -	if (new_video_mode->doubleline) {
   1.117 +	if (new_video_mode->flags & XBIOSMODE_DOUBLELINE) {
   1.118  		new_screen_size <<= 1;
   1.119 -		XBIOS_doubleline = SDL_TRUE;
   1.120  	}
   1.121  
   1.122  	/* Double buffer ? */
   1.123 @@ -706,14 +728,15 @@
   1.124  		return(NULL);
   1.125  	}
   1.126  
   1.127 -	current->w = XBIOS_width = width;
   1.128 -	current->h = XBIOS_height = height;
   1.129 +	XBIOS_current = new_video_mode;
   1.130 +	current->w = width;
   1.131 +	current->h = height;
   1.132  	current->pitch = (width * new_depth)>>3;
   1.133  
   1.134  	/* this is for C2P conversion */
   1.135  	XBIOS_pitch = (new_video_mode->width * new_video_mode->depth)>>3;
   1.136  
   1.137 -	if (new_depth == 8)
   1.138 +	if (new_video_mode->flags & XBIOSMODE_C2P)
   1.139  		current->pixels = XBIOS_shadowscreen;
   1.140  	else
   1.141  		current->pixels = XBIOS_screens[0];
   1.142 @@ -736,7 +759,11 @@
   1.143  
   1.144  #ifndef DEBUG_VIDEO_XBIOS
   1.145  	/* Now set the video mode */
   1.146 -	Setscreen(-1,XBIOS_screens[0],-1);
   1.147 +	if ((XBIOS_cvdo>>16) == VDO_MILAN) {
   1.148 +		VsetScreen(-1, XBIOS_screens[0], MI_MAGIC, CMD_SETADR);
   1.149 +	} else {
   1.150 +		Setscreen(-1,XBIOS_screens[0],-1);
   1.151 +	}
   1.152  
   1.153  	switch(XBIOS_cvdo >> 16) {
   1.154  		case VDO_ST:
   1.155 @@ -772,7 +799,14 @@
   1.156  			}
   1.157  
   1.158  			/* Set hardware palette to black in True Colour */
   1.159 -			if (new_depth == 16) {
   1.160 +			if (new_depth > 8) {
   1.161 +				SDL_memset(F30_palette, 0, sizeof(F30_palette));
   1.162 +				VsetRGB(0,256,F30_palette);
   1.163 +			}
   1.164 +			break;
   1.165 +		case VDO_MILAN:
   1.166 +			/* Set hardware palette to black in True Colour */
   1.167 +			if (new_depth > 8) {
   1.168  				SDL_memset(F30_palette, 0, sizeof(F30_palette));
   1.169  				VsetRGB(0,256,F30_palette);
   1.170  			}
   1.171 @@ -814,8 +848,9 @@
   1.172  
   1.173  	surface = this->screen;
   1.174  
   1.175 -	if ((surface->format->BitsPerPixel) == 8) {
   1.176 +	if (XBIOS_current->flags & XBIOSMODE_C2P) {
   1.177  		int i;
   1.178 +		int doubleline = (XBIOS_current->flags & XBIOSMODE_DOUBLELINE ? 1 : 0);
   1.179  
   1.180  		for (i=0;i<numrects;i++) {
   1.181  			void *source,*destination;
   1.182 @@ -841,7 +876,7 @@
   1.183  				destination,
   1.184  				x2-x1,
   1.185  				rects[i].h,
   1.186 -				XBIOS_doubleline,
   1.187 +				doubleline,
   1.188  				surface->pitch,
   1.189  				XBIOS_pitch
   1.190  			);
   1.191 @@ -849,14 +884,18 @@
   1.192  	}
   1.193  
   1.194  #ifndef DEBUG_VIDEO_XBIOS
   1.195 -	Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
   1.196 +	if ((XBIOS_cvdo>>16) == VDO_MILAN) {
   1.197 +		VsetScreen(-1, XBIOS_screens[XBIOS_fbnum], MI_MAGIC, CMD_SETADR);
   1.198 +	} else {
   1.199 +		Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
   1.200 +	}
   1.201  
   1.202  	Vsync();
   1.203  #endif
   1.204  
   1.205  	if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) {
   1.206  		XBIOS_fbnum ^= 1;
   1.207 -		if ((surface->format->BitsPerPixel) > 8) {
   1.208 +		if ((XBIOS_current->flags & XBIOSMODE_C2P) == 0) {
   1.209  			surface->pixels=XBIOS_screens[XBIOS_fbnum];
   1.210  		}
   1.211  	}
   1.212 @@ -864,14 +903,15 @@
   1.213  
   1.214  static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)
   1.215  {
   1.216 -	if ((surface->format->BitsPerPixel) == 8) {
   1.217 +	if (XBIOS_current->flags & XBIOSMODE_C2P) {
   1.218  		void *destscr;
   1.219  		int destx;
   1.220 +		int doubleline = (XBIOS_current->flags & XBIOSMODE_DOUBLELINE ? 1 : 0);
   1.221  			
   1.222  		/* Center on destination screen */
   1.223  		destscr = XBIOS_screens[XBIOS_fbnum];
   1.224 -		destscr += XBIOS_pitch * ((XBIOS_height - surface->h) >> 1);
   1.225 -		destx = (XBIOS_width - surface->w) >> 1;
   1.226 +		destscr += XBIOS_pitch * ((XBIOS_current->height - surface->h) >> 1);
   1.227 +		destx = (XBIOS_current->width - surface->w) >> 1;
   1.228  		destx &= ~15;
   1.229  		destscr += destx;
   1.230  
   1.231 @@ -881,21 +921,25 @@
   1.232  			destscr,
   1.233  			surface->w,
   1.234  			surface->h,
   1.235 -			XBIOS_doubleline,
   1.236 +			doubleline,
   1.237  			surface->pitch,
   1.238  			XBIOS_pitch
   1.239  		);
   1.240  	}
   1.241  
   1.242  #ifndef DEBUG_VIDEO_XBIOS
   1.243 -	Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
   1.244 +	if ((XBIOS_cvdo>>16) == VDO_MILAN) {
   1.245 +		VsetScreen(-1, XBIOS_screens[XBIOS_fbnum], MI_MAGIC, CMD_SETADR);
   1.246 +	} else {
   1.247 +		Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
   1.248 +	}
   1.249  
   1.250  	Vsync();
   1.251  #endif
   1.252  
   1.253  	if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) {
   1.254  		XBIOS_fbnum ^= 1;
   1.255 -		if ((surface->format->BitsPerPixel) > 8) {
   1.256 +		if ((XBIOS_current->flags & XBIOSMODE_C2P) == 0) {
   1.257  			surface->pixels=XBIOS_screens[XBIOS_fbnum];
   1.258  		}
   1.259  	}
   1.260 @@ -934,6 +978,7 @@
   1.261  			EsetPalette(firstcolor,ncolors,TT_palette);
   1.262  			break;
   1.263  		case VDO_F30:
   1.264 +		case VDO_MILAN:
   1.265  			for(i = 0; i < ncolors; i++)
   1.266  			{
   1.267  				r = colors[i].r;	
   1.268 @@ -987,6 +1032,12 @@
   1.269  				VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
   1.270  			}
   1.271  			break;
   1.272 +		case VDO_MILAN:
   1.273 +			VsetScreen(-1, &XBIOS_oldvmode, MI_MAGIC, CMD_SETMODE);
   1.274 +			if (XBIOS_oldnumcol) {
   1.275 +				VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
   1.276 +			}
   1.277 +			break;
   1.278  	}
   1.279  	Vsync();
   1.280  #endif
     2.1 --- a/src/video/xbios/SDL_xbios.h	Sat Sep 19 21:58:59 2009 +0000
     2.2 +++ b/src/video/xbios/SDL_xbios.h	Sun Sep 20 12:08:51 2009 +0000
     2.3 @@ -30,13 +30,16 @@
     2.4  /* Hidden "this" pointer for the video functions */
     2.5  #define _THIS	SDL_VideoDevice *this
     2.6  
     2.7 +#define XBIOSMODE_DOUBLELINE (1<<0)
     2.8 +#define XBIOSMODE_C2P (1<<1)
     2.9 +
    2.10  typedef struct
    2.11  {
    2.12  	Uint16 number;		/* Video mode number */
    2.13  	Uint16 width;		/* Size */	
    2.14  	Uint16 height;
    2.15  	Uint16 depth;		/* bits per plane */
    2.16 -	SDL_bool doubleline;	/* Double the lines ? */
    2.17 +	Uint16 flags;
    2.18  } xbiosmode_t;
    2.19  
    2.20  /* Private display data */
    2.21 @@ -44,7 +47,7 @@
    2.22  
    2.23  struct SDL_PrivateVideoData {
    2.24  	long cookie_vdo;
    2.25 -	int old_video_mode;				/* Old video mode before entering SDL */
    2.26 +	long old_video_mode;				/* Old video mode before entering SDL */
    2.27  	void *old_video_base;			/* Old pointer to screen buffer */
    2.28  	void *old_palette;				/* Old palette */
    2.29  	Uint32 old_num_colors;			/* Nb of colors in saved palette */
    2.30 @@ -52,13 +55,12 @@
    2.31  	void *screens[2];		/* Pointers to aligned screen buffer */
    2.32  	void *screensmem[2];	/* Pointers to screen buffer */
    2.33  	void *shadowscreen;		/* Shadow screen for c2p conversion */
    2.34 -	int doubleline;			/* Double line mode ? */
    2.35  	int frame_number;		/* Number of frame for double buffer */
    2.36  	int pitch;				/* Destination line width for C2P */
    2.37 -	int width, height;		/* Screen size for centered C2P */
    2.38  
    2.39  	SDL_bool centscreen;	/* Centscreen extension present ? */
    2.40  
    2.41 +	xbiosmode_t *current;	/* Current set mode */
    2.42  	int SDL_nummodes[NUM_MODELISTS];
    2.43  	SDL_Rect **SDL_modelist[NUM_MODELISTS];
    2.44  	xbiosmode_t **SDL_xbiosmode[NUM_MODELISTS];
    2.45 @@ -107,12 +109,10 @@
    2.46  #define XBIOS_screens		(this->hidden->screens)
    2.47  #define XBIOS_screensmem	(this->hidden->screensmem)
    2.48  #define XBIOS_shadowscreen	(this->hidden->shadowscreen)
    2.49 -#define XBIOS_doubleline	(this->hidden->doubleline)
    2.50  #define XBIOS_fbnum			(this->hidden->frame_number)
    2.51  #define XBIOS_pitch			(this->hidden->pitch)
    2.52 -#define XBIOS_width			(this->hidden->width)
    2.53 -#define XBIOS_height		(this->hidden->height)
    2.54  #define XBIOS_centscreen	(this->hidden->centscreen)
    2.55 +#define XBIOS_current		(this->hidden->current)
    2.56  
    2.57  /*--- Functions prototypes ---*/
    2.58  
     3.1 --- a/src/video/xbios/SDL_xbios_blowup.c	Sat Sep 19 21:58:59 2009 +0000
     3.2 +++ b/src/video/xbios/SDL_xbios_blowup.c	Sun Sep 20 12:08:51 2009 +0000
     3.3 @@ -68,7 +68,7 @@
     3.4  				modeinfo.width = blow_mode->width + 1;
     3.5  				modeinfo.height = blow_mode->height + 1;
     3.6  				modeinfo.depth = (num_mode == 3 ? 8 : 16);
     3.7 -				modeinfo.doubleline = SDL_FALSE;
     3.8 +				modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
     3.9  
    3.10  				SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
    3.11  			}
     4.1 --- a/src/video/xbios/SDL_xbios_centscreen.c	Sat Sep 19 21:58:59 2009 +0000
     4.2 +++ b/src/video/xbios/SDL_xbios_centscreen.c	Sun Sep 20 12:08:51 2009 +0000
     4.3 @@ -57,7 +57,7 @@
     4.4  					modeinfo.width = listedmode.physx;
     4.5  					modeinfo.height = listedmode.physy;
     4.6  					modeinfo.depth = listedmode.plan;
     4.7 -					modeinfo.doubleline = SDL_FALSE;
     4.8 +					modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
     4.9  
    4.10  					SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
    4.11  				}
     5.1 --- a/src/video/xbios/SDL_xbios_milan.c	Sat Sep 19 21:58:59 2009 +0000
     5.2 +++ b/src/video/xbios/SDL_xbios_milan.c	Sun Sep 20 12:08:51 2009 +0000
     5.3 @@ -73,7 +73,7 @@
     5.4  	modeinfo.width = inf->scrWidth;
     5.5  	modeinfo.height = inf->scrHeight;
     5.6  	modeinfo.depth = inf->scrPlanes;
     5.7 -	modeinfo.doubleline = SDL_FALSE;
     5.8 +	modeinfo.flags = 0;
     5.9  
    5.10  	SDL_XBIOS_AddMode(enum_this, enum_actually_add, &modeinfo);
    5.11  
    5.12 @@ -84,8 +84,6 @@
    5.13  {
    5.14  	int i;
    5.15  
    5.16 -	/* Read infos about current mode */ 
    5.17 -
    5.18  	/* Read validated predefined modes */
    5.19  	for (i=0; i<NUM_PREDEFINED_MODES; i++) {
    5.20  		int j;
    5.21 @@ -99,7 +97,7 @@
    5.22  				modeinfo.width = mode_list[i].width;
    5.23  				modeinfo.height = mode_list[i].height;
    5.24  				modeinfo.depth = mode_bpp[j-1];
    5.25 -				modeinfo.doubleline = SDL_FALSE;
    5.26 +				modeinfo.flags = 0;
    5.27  
    5.28  				SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
    5.29  			}
     6.1 --- a/src/video/xbios/SDL_xbios_milan.h	Sat Sep 19 21:58:59 2009 +0000
     6.2 +++ b/src/video/xbios/SDL_xbios_milan.h	Sun Sep 20 12:08:51 2009 +0000
     6.3 @@ -70,10 +70,23 @@
     6.4  	BLK_CLEARED
     6.5  };
     6.6  
     6.7 -/* bitFlags */ 
     6.8 -#define STANDARD_BITS  1 
     6.9 -#define FALCON_BITS   2 
    6.10 -#define INTEL_BITS   8 
    6.11 +/* scrFlags */
    6.12 +#define SCRINFO_OK 1
    6.13 +
    6.14 +/* scrClut */
    6.15 +#define NO_CLUT 0
    6.16 +#define HARD_CLUT 1
    6.17 +#define SOFT_CLUT 2
    6.18 +
    6.19 +/* scrFormat */
    6.20 +#define INTERLEAVE_PLANES 0
    6.21 +#define STANDARD_PLANES  1
    6.22 +#define PACKEDPIX_PLANES 2
    6.23 +
    6.24 +/* bitFlags */
    6.25 +#define STANDARD_BITS  1
    6.26 +#define FALCON_BITS   2
    6.27 +#define INTEL_BITS   8
    6.28  
    6.29  /*--- Structures ---*/
    6.30  
     7.1 --- a/src/video/xbios/SDL_xbios_sb3.c	Sat Sep 19 21:58:59 2009 +0000
     7.2 +++ b/src/video/xbios/SDL_xbios_sb3.c	Sun Sep 20 12:08:51 2009 +0000
     7.3 @@ -77,7 +77,7 @@
     7.4  	modeinfo.width = scrinfo->virtual_width;
     7.5  	modeinfo.height = scrinfo->virtual_height;
     7.6  	modeinfo.depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]);
     7.7 -	modeinfo.doubleline = SDL_FALSE;
     7.8 +	modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
     7.9  
    7.10  	SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
    7.11  }