Commit 8eeb1d6d authored by Patrice Mandin's avatar Patrice Mandin

Define flags for double line and c2p operations. More Milan video work.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403829
parent 266ad8cf
...@@ -98,40 +98,40 @@ static unsigned long F30_palette[256]; ...@@ -98,40 +98,40 @@ static unsigned long F30_palette[256];
/* Default list of video modes */ /* Default list of video modes */
static const xbiosmode_t stmodes[1]={ static const xbiosmode_t stmodes[1]={
{ST_LOW>>8,320,200,4,SDL_FALSE} {ST_LOW>>8,320,200,4, XBIOSMODE_C2P}
}; };
static const xbiosmode_t ttmodes[2]={ static const xbiosmode_t ttmodes[2]={
{TT_LOW,320,480,8,SDL_FALSE}, {TT_LOW,320,480,8, XBIOSMODE_C2P},
{TT_LOW,320,240,8,SDL_TRUE} /* Software double-lined mode */ {TT_LOW,320,240,8, XBIOSMODE_C2P|XBIOSMODE_DOUBLELINE}
}; };
static const xbiosmode_t falconrgbmodes[16]={ static const xbiosmode_t falconrgbmodes[16]={
{BPS16|COL80|OVERSCAN|VERTFLAG,768,480,16,SDL_FALSE}, {BPS16|COL80|OVERSCAN|VERTFLAG,768,480,16,0},
{BPS16|COL80|OVERSCAN,768,240,16,SDL_FALSE}, {BPS16|COL80|OVERSCAN,768,240,16,0},
{BPS16|COL80|VERTFLAG,640,400,16,SDL_FALSE}, {BPS16|COL80|VERTFLAG,640,400,16,0},
{BPS16|COL80,640,200,16,SDL_FALSE}, {BPS16|COL80,640,200,16,0},
{BPS16|OVERSCAN|VERTFLAG,384,480,16,SDL_FALSE}, {BPS16|OVERSCAN|VERTFLAG,384,480,16,0},
{BPS16|OVERSCAN,384,240,16,SDL_FALSE}, {BPS16|OVERSCAN,384,240,16,0},
{BPS16|VERTFLAG,320,400,16,SDL_FALSE}, {BPS16|VERTFLAG,320,400,16,0},
{BPS16,320,200,16,SDL_FALSE}, {BPS16,320,200,16,0},
{BPS8|COL80|OVERSCAN|VERTFLAG,768,480,8,SDL_FALSE}, {BPS8|COL80|OVERSCAN|VERTFLAG,768,480,8,XBIOSMODE_C2P},
{BPS8|COL80|OVERSCAN,768,240,8,SDL_FALSE}, {BPS8|COL80|OVERSCAN,768,240,8,XBIOSMODE_C2P},
{BPS8|COL80|VERTFLAG,640,400,8,SDL_FALSE}, {BPS8|COL80|VERTFLAG,640,400,8,XBIOSMODE_C2P},
{BPS8|COL80,640,200,8,SDL_FALSE}, {BPS8|COL80,640,200,8,XBIOSMODE_C2P},
{BPS8|OVERSCAN|VERTFLAG,384,480,8,SDL_FALSE}, {BPS8|OVERSCAN|VERTFLAG,384,480,8,XBIOSMODE_C2P},
{BPS8|OVERSCAN,384,240,8,SDL_FALSE}, {BPS8|OVERSCAN,384,240,8,XBIOSMODE_C2P},
{BPS8|VERTFLAG,320,400,8,SDL_FALSE}, {BPS8|VERTFLAG,320,400,8,XBIOSMODE_C2P},
{BPS8,320,200,8,SDL_FALSE} {BPS8,320,200,8,XBIOSMODE_C2P}
}; };
static const xbiosmode_t falconvgamodes[6]={ static const xbiosmode_t falconvgamodes[6]={
{BPS16,320,480,16,SDL_FALSE}, {BPS16,320,480,16,0},
{BPS16|VERTFLAG,320,240,16,SDL_FALSE}, {BPS16|VERTFLAG,320,240,16,0},
{BPS8|COL80,640,480,8,SDL_FALSE}, {BPS8|COL80,640,480,8,XBIOSMODE_C2P},
{BPS8|COL80|VERTFLAG,640,240,8,SDL_FALSE}, {BPS8|COL80|VERTFLAG,640,240,8,XBIOSMODE_C2P},
{BPS8,320,480,8,SDL_FALSE}, {BPS8,320,480,8,XBIOSMODE_C2P},
{BPS8|VERTFLAG,320,240,8,SDL_FALSE} {BPS8|VERTFLAG,320,240,8,XBIOSMODE_C2P}
}; };
/* Xbios driver bootstrap functions */ /* Xbios driver bootstrap functions */
...@@ -492,7 +492,31 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat) ...@@ -492,7 +492,31 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
} }
break; break;
case VDO_MILAN: case VDO_MILAN:
SDL_XBIOS_ListMilanModes(this, 0); {
SCREENINFO si;
/* Read infos about current mode */
VsetScreen(-1, &XBIOS_oldvmode, MI_MAGIC, CMD_GETMODE);
this->info.current_w = si.scrWidth;
this->info.current_h = si.scrHeight;
si.size = sizeof(SCREENINFO);
si.devID = XBIOS_oldvmode;
si.scrFlags = 0;
VsetScreen(-1, &si, MI_MAGIC, CMD_GETINFO);
XBIOS_oldnumcol = 0;
if (si.scrFlags & SCRINFO_OK) {
if (si.scrPlanes <= 8) {
XBIOS_oldnumcol = 1<<si.scrPlanes;
}
}
if (XBIOS_oldnumcol) {
VgetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
}
SDL_XBIOS_ListMilanModes(this, 0);
}
break; break;
} }
...@@ -653,7 +677,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -653,7 +677,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
new_screen_size = width * height * ((new_depth)>>3); new_screen_size = width * height * ((new_depth)>>3);
new_screen_size += 256; /* To align on a 256 byte adress */ new_screen_size += 256; /* To align on a 256 byte adress */
if (new_depth == 8) { if (new_video_mode->flags & XBIOSMODE_C2P) {
XBIOS_shadowscreen = Atari_SysMalloc(new_screen_size, MX_PREFTTRAM); XBIOS_shadowscreen = Atari_SysMalloc(new_screen_size, MX_PREFTTRAM);
if (XBIOS_shadowscreen == NULL) { if (XBIOS_shadowscreen == NULL) {
...@@ -664,10 +688,8 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -664,10 +688,8 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
} }
/* Output buffer needs to be twice in size for the software double-line mode */ /* Output buffer needs to be twice in size for the software double-line mode */
XBIOS_doubleline = SDL_FALSE; if (new_video_mode->flags & XBIOSMODE_DOUBLELINE) {
if (new_video_mode->doubleline) {
new_screen_size <<= 1; new_screen_size <<= 1;
XBIOS_doubleline = SDL_TRUE;
} }
/* Double buffer ? */ /* Double buffer ? */
...@@ -706,14 +728,15 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -706,14 +728,15 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
return(NULL); return(NULL);
} }
current->w = XBIOS_width = width; XBIOS_current = new_video_mode;
current->h = XBIOS_height = height; current->w = width;
current->h = height;
current->pitch = (width * new_depth)>>3; current->pitch = (width * new_depth)>>3;
/* this is for C2P conversion */ /* this is for C2P conversion */
XBIOS_pitch = (new_video_mode->width * new_video_mode->depth)>>3; XBIOS_pitch = (new_video_mode->width * new_video_mode->depth)>>3;
if (new_depth == 8) if (new_video_mode->flags & XBIOSMODE_C2P)
current->pixels = XBIOS_shadowscreen; current->pixels = XBIOS_shadowscreen;
else else
current->pixels = XBIOS_screens[0]; current->pixels = XBIOS_screens[0];
...@@ -736,7 +759,11 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -736,7 +759,11 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
#ifndef DEBUG_VIDEO_XBIOS #ifndef DEBUG_VIDEO_XBIOS
/* Now set the video mode */ /* Now set the video mode */
Setscreen(-1,XBIOS_screens[0],-1); if ((XBIOS_cvdo>>16) == VDO_MILAN) {
VsetScreen(-1, XBIOS_screens[0], MI_MAGIC, CMD_SETADR);
} else {
Setscreen(-1,XBIOS_screens[0],-1);
}
switch(XBIOS_cvdo >> 16) { switch(XBIOS_cvdo >> 16) {
case VDO_ST: case VDO_ST:
...@@ -772,7 +799,14 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -772,7 +799,14 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
} }
/* Set hardware palette to black in True Colour */ /* Set hardware palette to black in True Colour */
if (new_depth == 16) { if (new_depth > 8) {
SDL_memset(F30_palette, 0, sizeof(F30_palette));
VsetRGB(0,256,F30_palette);
}
break;
case VDO_MILAN:
/* Set hardware palette to black in True Colour */
if (new_depth > 8) {
SDL_memset(F30_palette, 0, sizeof(F30_palette)); SDL_memset(F30_palette, 0, sizeof(F30_palette));
VsetRGB(0,256,F30_palette); VsetRGB(0,256,F30_palette);
} }
...@@ -814,8 +848,9 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -814,8 +848,9 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
surface = this->screen; surface = this->screen;
if ((surface->format->BitsPerPixel) == 8) { if (XBIOS_current->flags & XBIOSMODE_C2P) {
int i; int i;
int doubleline = (XBIOS_current->flags & XBIOSMODE_DOUBLELINE ? 1 : 0);
for (i=0;i<numrects;i++) { for (i=0;i<numrects;i++) {
void *source,*destination; void *source,*destination;
...@@ -841,7 +876,7 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -841,7 +876,7 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
destination, destination,
x2-x1, x2-x1,
rects[i].h, rects[i].h,
XBIOS_doubleline, doubleline,
surface->pitch, surface->pitch,
XBIOS_pitch XBIOS_pitch
); );
...@@ -849,14 +884,18 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -849,14 +884,18 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
} }
#ifndef DEBUG_VIDEO_XBIOS #ifndef DEBUG_VIDEO_XBIOS
Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1); if ((XBIOS_cvdo>>16) == VDO_MILAN) {
VsetScreen(-1, XBIOS_screens[XBIOS_fbnum], MI_MAGIC, CMD_SETADR);
} else {
Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
}
Vsync(); Vsync();
#endif #endif
if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) { if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) {
XBIOS_fbnum ^= 1; XBIOS_fbnum ^= 1;
if ((surface->format->BitsPerPixel) > 8) { if ((XBIOS_current->flags & XBIOSMODE_C2P) == 0) {
surface->pixels=XBIOS_screens[XBIOS_fbnum]; surface->pixels=XBIOS_screens[XBIOS_fbnum];
} }
} }
...@@ -864,14 +903,15 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -864,14 +903,15 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface) static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)
{ {
if ((surface->format->BitsPerPixel) == 8) { if (XBIOS_current->flags & XBIOSMODE_C2P) {
void *destscr; void *destscr;
int destx; int destx;
int doubleline = (XBIOS_current->flags & XBIOSMODE_DOUBLELINE ? 1 : 0);
/* Center on destination screen */ /* Center on destination screen */
destscr = XBIOS_screens[XBIOS_fbnum]; destscr = XBIOS_screens[XBIOS_fbnum];
destscr += XBIOS_pitch * ((XBIOS_height - surface->h) >> 1); destscr += XBIOS_pitch * ((XBIOS_current->height - surface->h) >> 1);
destx = (XBIOS_width - surface->w) >> 1; destx = (XBIOS_current->width - surface->w) >> 1;
destx &= ~15; destx &= ~15;
destscr += destx; destscr += destx;
...@@ -881,21 +921,25 @@ static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface) ...@@ -881,21 +921,25 @@ static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)
destscr, destscr,
surface->w, surface->w,
surface->h, surface->h,
XBIOS_doubleline, doubleline,
surface->pitch, surface->pitch,
XBIOS_pitch XBIOS_pitch
); );
} }
#ifndef DEBUG_VIDEO_XBIOS #ifndef DEBUG_VIDEO_XBIOS
Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1); if ((XBIOS_cvdo>>16) == VDO_MILAN) {
VsetScreen(-1, XBIOS_screens[XBIOS_fbnum], MI_MAGIC, CMD_SETADR);
} else {
Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
}
Vsync(); Vsync();
#endif #endif
if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) { if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) {
XBIOS_fbnum ^= 1; XBIOS_fbnum ^= 1;
if ((surface->format->BitsPerPixel) > 8) { if ((XBIOS_current->flags & XBIOSMODE_C2P) == 0) {
surface->pixels=XBIOS_screens[XBIOS_fbnum]; surface->pixels=XBIOS_screens[XBIOS_fbnum];
} }
} }
...@@ -934,6 +978,7 @@ static int XBIOS_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors ...@@ -934,6 +978,7 @@ static int XBIOS_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors
EsetPalette(firstcolor,ncolors,TT_palette); EsetPalette(firstcolor,ncolors,TT_palette);
break; break;
case VDO_F30: case VDO_F30:
case VDO_MILAN:
for(i = 0; i < ncolors; i++) for(i = 0; i < ncolors; i++)
{ {
r = colors[i].r; r = colors[i].r;
...@@ -987,6 +1032,12 @@ static void XBIOS_VideoQuit(_THIS) ...@@ -987,6 +1032,12 @@ static void XBIOS_VideoQuit(_THIS)
VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette); VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
} }
break; break;
case VDO_MILAN:
VsetScreen(-1, &XBIOS_oldvmode, MI_MAGIC, CMD_SETMODE);
if (XBIOS_oldnumcol) {
VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
}
break;
} }
Vsync(); Vsync();
#endif #endif
......
...@@ -30,13 +30,16 @@ ...@@ -30,13 +30,16 @@
/* Hidden "this" pointer for the video functions */ /* Hidden "this" pointer for the video functions */
#define _THIS SDL_VideoDevice *this #define _THIS SDL_VideoDevice *this
#define XBIOSMODE_DOUBLELINE (1<<0)
#define XBIOSMODE_C2P (1<<1)
typedef struct typedef struct
{ {
Uint16 number; /* Video mode number */ Uint16 number; /* Video mode number */
Uint16 width; /* Size */ Uint16 width; /* Size */
Uint16 height; Uint16 height;
Uint16 depth; /* bits per plane */ Uint16 depth; /* bits per plane */
SDL_bool doubleline; /* Double the lines ? */ Uint16 flags;
} xbiosmode_t; } xbiosmode_t;
/* Private display data */ /* Private display data */
...@@ -44,7 +47,7 @@ typedef struct ...@@ -44,7 +47,7 @@ typedef struct
struct SDL_PrivateVideoData { struct SDL_PrivateVideoData {
long cookie_vdo; long cookie_vdo;
int old_video_mode; /* Old video mode before entering SDL */ long old_video_mode; /* Old video mode before entering SDL */
void *old_video_base; /* Old pointer to screen buffer */ void *old_video_base; /* Old pointer to screen buffer */
void *old_palette; /* Old palette */ void *old_palette; /* Old palette */
Uint32 old_num_colors; /* Nb of colors in saved palette */ Uint32 old_num_colors; /* Nb of colors in saved palette */
...@@ -52,13 +55,12 @@ struct SDL_PrivateVideoData { ...@@ -52,13 +55,12 @@ struct SDL_PrivateVideoData {
void *screens[2]; /* Pointers to aligned screen buffer */ void *screens[2]; /* Pointers to aligned screen buffer */
void *screensmem[2]; /* Pointers to screen buffer */ void *screensmem[2]; /* Pointers to screen buffer */
void *shadowscreen; /* Shadow screen for c2p conversion */ void *shadowscreen; /* Shadow screen for c2p conversion */
int doubleline; /* Double line mode ? */
int frame_number; /* Number of frame for double buffer */ int frame_number; /* Number of frame for double buffer */
int pitch; /* Destination line width for C2P */ int pitch; /* Destination line width for C2P */
int width, height; /* Screen size for centered C2P */
SDL_bool centscreen; /* Centscreen extension present ? */ SDL_bool centscreen; /* Centscreen extension present ? */
xbiosmode_t *current; /* Current set mode */
int SDL_nummodes[NUM_MODELISTS]; int SDL_nummodes[NUM_MODELISTS];
SDL_Rect **SDL_modelist[NUM_MODELISTS]; SDL_Rect **SDL_modelist[NUM_MODELISTS];
xbiosmode_t **SDL_xbiosmode[NUM_MODELISTS]; xbiosmode_t **SDL_xbiosmode[NUM_MODELISTS];
...@@ -107,12 +109,10 @@ enum { ...@@ -107,12 +109,10 @@ enum {
#define XBIOS_screens (this->hidden->screens) #define XBIOS_screens (this->hidden->screens)
#define XBIOS_screensmem (this->hidden->screensmem) #define XBIOS_screensmem (this->hidden->screensmem)
#define XBIOS_shadowscreen (this->hidden->shadowscreen) #define XBIOS_shadowscreen (this->hidden->shadowscreen)
#define XBIOS_doubleline (this->hidden->doubleline)
#define XBIOS_fbnum (this->hidden->frame_number) #define XBIOS_fbnum (this->hidden->frame_number)
#define XBIOS_pitch (this->hidden->pitch) #define XBIOS_pitch (this->hidden->pitch)
#define XBIOS_width (this->hidden->width)
#define XBIOS_height (this->hidden->height)
#define XBIOS_centscreen (this->hidden->centscreen) #define XBIOS_centscreen (this->hidden->centscreen)
#define XBIOS_current (this->hidden->current)
/*--- Functions prototypes ---*/ /*--- Functions prototypes ---*/
......
...@@ -68,7 +68,7 @@ void SDL_XBIOS_ListBlowupModes(_THIS, int actually_add, blow_cookie_t *cookie_bl ...@@ -68,7 +68,7 @@ void SDL_XBIOS_ListBlowupModes(_THIS, int actually_add, blow_cookie_t *cookie_bl
modeinfo.width = blow_mode->width + 1; modeinfo.width = blow_mode->width + 1;
modeinfo.height = blow_mode->height + 1; modeinfo.height = blow_mode->height + 1;
modeinfo.depth = (num_mode == 3 ? 8 : 16); modeinfo.depth = (num_mode == 3 ? 8 : 16);
modeinfo.doubleline = SDL_FALSE; modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
SDL_XBIOS_AddMode(this, actually_add, &modeinfo); SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
} }
......
...@@ -57,7 +57,7 @@ int SDL_XBIOS_ListCentscreenModes(_THIS, int actually_add) ...@@ -57,7 +57,7 @@ int SDL_XBIOS_ListCentscreenModes(_THIS, int actually_add)
modeinfo.width = listedmode.physx; modeinfo.width = listedmode.physx;
modeinfo.height = listedmode.physy; modeinfo.height = listedmode.physy;
modeinfo.depth = listedmode.plan; modeinfo.depth = listedmode.plan;
modeinfo.doubleline = SDL_FALSE; modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
SDL_XBIOS_AddMode(this, actually_add, &modeinfo); SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
} }
......
...@@ -73,7 +73,7 @@ static unsigned long /*cdecl*/ enumfunc(SCREENINFO *inf, unsigned long flag) ...@@ -73,7 +73,7 @@ static unsigned long /*cdecl*/ enumfunc(SCREENINFO *inf, unsigned long flag)
modeinfo.width = inf->scrWidth; modeinfo.width = inf->scrWidth;
modeinfo.height = inf->scrHeight; modeinfo.height = inf->scrHeight;
modeinfo.depth = inf->scrPlanes; modeinfo.depth = inf->scrPlanes;
modeinfo.doubleline = SDL_FALSE; modeinfo.flags = 0;
SDL_XBIOS_AddMode(enum_this, enum_actually_add, &modeinfo); SDL_XBIOS_AddMode(enum_this, enum_actually_add, &modeinfo);
...@@ -84,8 +84,6 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) ...@@ -84,8 +84,6 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add)
{ {
int i; int i;
/* Read infos about current mode */
/* Read validated predefined modes */ /* Read validated predefined modes */
for (i=0; i<NUM_PREDEFINED_MODES; i++) { for (i=0; i<NUM_PREDEFINED_MODES; i++) {
int j; int j;
...@@ -99,7 +97,7 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) ...@@ -99,7 +97,7 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add)
modeinfo.width = mode_list[i].width; modeinfo.width = mode_list[i].width;
modeinfo.height = mode_list[i].height; modeinfo.height = mode_list[i].height;
modeinfo.depth = mode_bpp[j-1]; modeinfo.depth = mode_bpp[j-1];
modeinfo.doubleline = SDL_FALSE; modeinfo.flags = 0;
SDL_XBIOS_AddMode(this, actually_add, &modeinfo); SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
} }
......
...@@ -70,10 +70,23 @@ enum { ...@@ -70,10 +70,23 @@ enum {
BLK_CLEARED BLK_CLEARED
}; };
/* bitFlags */ /* scrFlags */
#define STANDARD_BITS 1 #define SCRINFO_OK 1
#define FALCON_BITS 2
#define INTEL_BITS 8 /* scrClut */
#define NO_CLUT 0
#define HARD_CLUT 1
#define SOFT_CLUT 2
/* scrFormat */
#define INTERLEAVE_PLANES 0
#define STANDARD_PLANES 1
#define PACKEDPIX_PLANES 2
/* bitFlags */
#define STANDARD_BITS 1
#define FALCON_BITS 2
#define INTEL_BITS 8
/*--- Structures ---*/ /*--- Structures ---*/
......
...@@ -77,7 +77,7 @@ void SDL_XBIOS_ListSB3Modes(_THIS, int actually_add, scpn_cookie_t *cookie_scpn) ...@@ -77,7 +77,7 @@ void SDL_XBIOS_ListSB3Modes(_THIS, int actually_add, scpn_cookie_t *cookie_scpn)
modeinfo.width = scrinfo->virtual_width; modeinfo.width = scrinfo->virtual_width;
modeinfo.height = scrinfo->virtual_height; modeinfo.height = scrinfo->virtual_height;
modeinfo.depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]); modeinfo.depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]);
modeinfo.doubleline = SDL_FALSE; modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0);
SDL_XBIOS_AddMode(this, actually_add, &modeinfo); SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment