- add VESA mode 0x6a (same as 0x102)

- add a macro to check if a mode is a VESA mode
- output the unsupported VGA mode in hex (all VGA/VESA docs use hex
  for that)
This commit is contained in:
Michael Stefaniuc 2004-01-09 05:03:43 +00:00 committed by Alexandre Julliard
parent ed69f0bff6
commit 6c34235f3e
1 changed files with 10 additions and 4 deletions

View File

@ -162,6 +162,7 @@ static const INT10_MODE INT10_modelist[] =
{0x0010, 640, 350, 4},
{0x0012, 640, 480, 4},
{0x0013, 320, 200, 8},
{0x006a, 800, 600, 4}, /* VESA mode, same as 0x102 */
{0x0100, 640, 400, 8},
{0x0101, 640, 480, 8},
{0x0102, 800, 600, 4},
@ -193,6 +194,11 @@ static const INT10_MODE INT10_modelist[] =
{0xffff, 0, 0, 0}
};
/* True if video mode is a vesa mode, false otherwise.
* More correct would be to use something like (x > 0xff || x == 0x6a)
* but as long as we have only the standard VGA and VESA modes this is ok too */
#define IS_VESA_MODE(x) ((x) >= 0x6a)
/* Forward declarations. */
static INT10_HEAP *INT10_GetHeap(void);
static void INT10_SetCursorPos(BIOSDATA*, unsigned, unsigned, unsigned);
@ -352,7 +358,7 @@ static BOOL INT10_FillModeInformation( struct _ModeInfoBlock *mib, WORD mode )
attr |= 0x0010;
/* Not VGA-compatible? */
if (mode > 0xff)
if (IS_VESA_MODE(mode))
attr |= 0x0020;
mib->ModeAttributes = attr;
@ -776,7 +782,7 @@ static BOOL INT10_SetVideoMode( BIOSDATA *data, WORD mode )
{
/* Text mode. */
TRACE( "Setting %s %dx%d text mode (screen %s)\n",
mode <= 0xff ? "VGA" : "VESA",
IS_VESA_MODE(mode) ? "VESA" : "VGA",
ptr->Width, ptr->Height,
clearScreen ? "cleared" : "preserved" );
@ -799,7 +805,7 @@ static BOOL INT10_SetVideoMode( BIOSDATA *data, WORD mode )
{
/* Graphics mode. */
TRACE( "Setting %s %dx%dx%d graphics mode (screen %s)\n",
mode <= 0xff ? "VGA" : "VESA",
IS_VESA_MODE(mode) ? "VESA" : "VGA",
ptr->Width, ptr->Height, ptr->Depth,
clearScreen ? "cleared" : "preserved" );
@ -1041,7 +1047,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context )
case 0x00: /* SET VIDEO MODE */
TRACE( "Set VGA video mode %02x\n", AL_reg(context) );
if (!INT10_SetVideoMode( data, AL_reg(context) ))
FIXME( "Unsupported VGA video mode requested: %d\n",
FIXME( "Unsupported VGA video mode requested: %#x\n",
AL_reg(context) );
break;