fixes: DOS gamma, modetabl.h timings (avoid shimmering),

Napalm memory probing, more DJGPP MMX specializations,
new 32bit texture files, Linux build valid again, etc.
This commit is contained in:
dborca
2003-06-19 08:38:28 +00:00
parent e791da7f5d
commit 5be1e23a0c
13 changed files with 670 additions and 366 deletions

View File

@@ -376,55 +376,60 @@ Information:
Return: FxU32 The size of memory in MBs.
----------------------------------------------------------------------*/
FxU32
h3InitGetMemSize(FxU32 regBase) // init io-register base
FxU32 h3InitGetMemSize (FxU32 regBase, FxBool isNapalm)
{
FxU32
memType, // SGRAM or SDRAM
partSize, // size of SGRAM chips in Mbits
memSize, // total size of memory in MBytes
nChips, // # of chips of SDRAM/SGRAM
dramInit1_strap,
dramInit0_strap;
// determine memory type: SDRAM or SGRAM
memType = MEM_TYPE_SGRAM;
dramInit1_strap = IGET32(dramInit1);
dramInit1_strap &= SST_MCTL_TYPE_SDRAM;
if ( dramInit1_strap & SST_MCTL_TYPE_SDRAM )
memType = MEM_TYPE_SDRAM;
FxU32 partSize, // size of SGRAM chips in Mbits
nChips, // # of chips of SDRAM/SGRAM
dramInit0_strap;
// determine memory size from strapping pins (dramInit0 and dramInit1)
dramInit0_strap = IGET32(dramInit0);
dramInit0_strap &= SST_SGRAM_TYPE | SST_SGRAM_NUM_CHIPSETS;
/* Determine memory size from strapping pins (dramInit0). */
if ( memType == MEM_TYPE_SDRAM ) {
nChips = 8;
partSize = 16;
memSize = 16;
// avoid minor performance hit when using SDRAM
dramInit0_strap &= ~SST_SGRAM_NUM_CHIPSETS;
dramInit0_strap = IGET32(dramInit0);
#ifdef FX_GLIDE_NAPALM
if (isNapalm) {
// Napalm memory sizing
dramInit0_strap &= SST_H5_SGRAM_TYPE | SST_SGRAM_NUM_CHIPSETS;
} else {
nChips = ((dramInit0_strap & SST_SGRAM_NUM_CHIPSETS) == 0) ? 4 : 8;
if ( (dramInit0_strap & SST_SGRAM_TYPE) == SST_SGRAM_TYPE_8MBIT ) {
partSize = 8;
} else if ( (dramInit0_strap & SST_SGRAM_TYPE) == SST_SGRAM_TYPE_16MBIT) {
partSize = 16;
} else {
MESSAGE("h3InitGetMemSize: invalid sgram type = 0x%x",
(dramInit0_strap & SST_SGRAM_TYPE) << SST_SGRAM_TYPE_SHIFT );
return 0;
switch (dramInit0_strap & SST_H5_SGRAM_TYPE) {
case SST_SGRAM_TYPE_8MBIT: partSize = 8; break;
case SST_SGRAM_TYPE_16MBIT: partSize = 16; break;
case SST_SGRAM_TYPE_32MBIT: partSize = 32; break;
case SST_SGRAM_TYPE_64MBIT: partSize = 64; break;
case SST_SGRAM_TYPE_128MBIT: partSize = 128; break;
default: return 0; // invalid sgram type!
}
}
} else
#endif /* FX_GLIDE_NAPALM */
memSize = (nChips * partSize) / 8; // in MBytes
{
// Banshee and Avenger memory sizing
// determine memory type: SDRAM or SGRAM
FxU32 dramInit1_strap = IGET32(dramInit1);
return (memSize);
if (dramInit1_strap & SST_MCTL_TYPE_SDRAM) {
nChips = 8;
partSize = 16;
} else {
dramInit0_strap &= SST_H4_SGRAM_TYPE | SST_SGRAM_NUM_CHIPSETS;
nChips = ((dramInit0_strap & SST_SGRAM_NUM_CHIPSETS) == 0) ? 4 : 8;
switch (dramInit0_strap & SST_H4_SGRAM_TYPE) {
case SST_SGRAM_TYPE_8MBIT: partSize = 8; break;
case SST_SGRAM_TYPE_16MBIT: partSize = 16; break;
default: return 0; // invalid sgram type!
}
}
}
/* Compute memory size in megabytes. */
return (nChips * partSize) / 8;
}
@@ -792,26 +797,25 @@ Information:
Return: (FxU16 *) Ptr to the entry in the mode table,
NULL if failure.
----------------------------------------------------------------------*/
FxU16 *
h3InitFindVideoMode(FxU32 xRes,
FxU32 yRes,
FxU32 refresh)
FxU16 *h3InitFindVideoMode (FxU32 xRes, FxU32 yRes, FxU32 refresh)
{
int i = 0;
int i = 0;
int best = -1;
FxU32 error = -1;
while (mode_table[i][0] != 0)
{
if ((mode_table[i][0] == xRes) &&
(mode_table[i][1] == yRes) &&
(mode_table[i][2] == refresh))
{
return &mode_table[i][3];
}
while (mode_table[i][0] != 0) {
if ((mode_table[i][0] == xRes) && (mode_table[i][1] == yRes)) {
FxU32 d = abs(mode_table[i][2] - refresh);
if (error > d) {
error = d;
best = i;
}
}
i += 1;
}
i++;
}
return NULL;
return (best == -1) ? NULL : (&mode_table[best][3]);
}

View File

@@ -1,3 +1,5 @@
/* -*-c++-*- */
/* $Header$ */
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
@@ -17,24 +19,9 @@
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** File name: h3cinit.h
**
** Description: Macros & function definitions for Banshee/Avenger.
**
** $Revision$
** $Date$
**
** $History: h3cinit.h $
**
** ***************** Version 1 *****************
** User: Sapphire Date: 3/16/99 Time: 7:28p
** Created in $/Releases/Voodoo3/V3_OEM_100/3dfx/devel/H3/cinit
**
** ***************** Version 21 *****************
** User: Michael Date: 1/05/99 Time: 8:45a
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
*/
@@ -54,25 +41,26 @@
#define DEFAULT_GRXCLK_SPEED H3_GRXCLK_SPEED
#endif
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase);// init register base
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase, // init register base
FxBool isNapalm);// Napalm
FxU32 // return # of MB of memory
h3InitSgram(FxU32 regBase, // init iegister base
FxU32 sgramMode,
FxU32 sgramMask,
FxU32 sgramColor,
char *vendorName); // NULL or name of SGRAM vendor
char *vendorName); // NULL or name of SGRAM vendor
void
h3InitPlls(FxU32 regBase, // init iegister base
FxU32 grxSpeedInMHz, // desired GRX clock frequency (MHz)
h3InitPlls(FxU32 regBase, // init iegister base
FxU32 grxSpeedInMHz, // desired GRX clock frequency (MHz)
FxU32 memSpeedInMHz); // desired MEM clock frequency (MHz)
void
h4InitPlls(FxU32 regBase, // init register base
FxU32 deviceID, // H4 or H4_OEM
FxU32 grxSpeedInMHz); // desired clock frequency (MHz)
h4InitPlls(FxU32 regBase, // init register base
FxU32 deviceID, // H4 or H4_OEM
FxU32 grxSpeedInMHz); // desired clock frequency (MHz)
void
h3InitVga(
@@ -82,7 +70,7 @@ h3InitVga(
void
h3InitVideoProc(
FxU32 regBase, // memory base address
FxU32 vidProcCfg); // vidProcCfg register control bits
FxU32 vidProcCfg); // vidProcCfg register control bits
FxBool
h3InitSetVideoMode(
@@ -90,46 +78,46 @@ h3InitSetVideoMode(
FxU32 xRes, // x resolution
FxU32 yRes, // y resolution
FxU32 refresh, // refresh freq
#if defined(H3VDD)
#if defined(H3VDD) && defined(H3_B0)
FxU32 loadClut, // really a bool, should we load the lookup table
FxU32 scanlinedouble); // set scanline double bit and double y?
#else
FxU32 loadClut) ; // initialize clut entries?
FxU32 loadClut) ; // initialize clut entries?
#endif
void
h3InitVideoDesktopSurface(
FxU32 regBase,
FxU32 enable, // 1=enable desktop surface (DS), 1=disable
FxU32 tiled, // 0=DS linear, 1=tiled
FxU32 pixFmt, // pixel format of DS
FxU32 clutBypass, // bypass clut for DS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of DS
FxU32 stride); // distance between scanlines of the DS, in
// units of bytes for linear DS's and tiles for
// tiled DS's
FxU32 enable, // 1=enable desktop surface (DS), 1=disable
FxU32 tiled, // 0=DS linear, 1=tiled
FxU32 pixFmt, // pixel format of DS
FxU32 clutBypass, // bypass clut for DS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of DS
FxU32 stride); // distance between scanlines of the DS, in
// units of bytes for linear DS's and tiles for
// tiled DS's
void
h3InitVideoOverlaySurface(
FxU32 regBase,
FxU32 enable, // 1=enable Overlay surface (OS), 1=disable
FxU32 stereo, // 1=enable OS stereo, 0=disable
FxU32 horizScaling, // 1=enable horizontal scaling, 0=disable
FxU32 dudx, // horizontal scale factor (ignored if not
// scaling)
FxU32 verticalScaling, // 1=enable vertical scaling, 0=disable
FxU32 dvdy, // vertical scale factor (ignored if not
// scaling)
FxU32 filterMode, // duh
FxU32 tiled, // 0=OS linear, 1=tiled
FxU32 pixFmt, // pixel format of OS
FxU32 clutBypass, // bypass clut for OS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of OS
FxU32 stride); // distance between scanlines of the OS, in
// units of bytes for linear OS's and tiles for
// tiled OS's
FxU32 enable, // 1=enable Overlay surface (OS), 1=disable
FxU32 stereo, // 1=enable OS stereo, 0=disable
FxU32 horizScaling, // 1=enable horizontal scaling, 0=disable
FxU32 dudx, // horizontal scale factor (ignored if not
// scaling)
FxU32 verticalScaling, // 1=enable vertical scaling, 0=disable
FxU32 dvdy, // vertical scale factor (ignored if not
// scaling)
FxU32 filterMode, // duh
FxU32 tiled, // 0=OS linear, 1=tiled
FxU32 pixFmt, // pixel format of OS
FxU32 clutBypass, // bypass clut for OS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of OS
FxU32 stride); // distance between scanlines of the OS, in
// units of bytes for linear OS's and tiles for
// tiled OS's
#ifndef H3VDD
void
@@ -140,8 +128,8 @@ h3InitMeasureSiProcess(
void
h3InitBlockWrite(
FxU32 regBase,
FxU32 enable, // 1=enable block writes, 0=disable
FxU32 threshhold); // block write threshhold
FxU32 enable, // 1=enable block writes, 0=disable
FxU32 threshhold); // block write threshhold
void
h3InitResetAll(

View File

@@ -153,176 +153,136 @@
// x y rr, 0h 1h 2h 3h 4h 5h 6h 7h 9h 10h 11h 12h 15h 16h 1ah 1bh 3c2 SR1 pllctrl0 dacmode
// x y rr, Htotl HDEnE HBlSt HBlEn HSySt HSyEn Vtotl Ovflw MxSLn VSySt VSyEn VDEnE VBlSt VBlEn HExtn VExtn MiscO SR1 pllctrl0 dacmode
// New Standardized modetable for both 3Dfx and STB
{ 320, 200, 70, 0x2d, 0x27, 0x27, 0x91, 0x29, 0x8f, 0xbf, 0x1f, 0xc0, 0x9c,
0x2e, 0x8f, 0x97, 0xb8, 0x80, 0x00, 0x4f, 0x21, 0x73, 0xd1, 0x00},
{ 320, 200, 85, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xbb, 0x1f, 0xc0, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x80, 0x00, 0x4f, 0x21, 0xd5, 0x77, 0x00},
{ 320, 240, 60, 0x2d, 0x27, 0x27, 0x91, 0x29, 0x8f, 0x0b, 0x3e, 0xc0, 0xe9,
{ 640, 480, 60, 0x5f, 0x4f, 0x4f, 0x83, 0x51, 0x9d, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x00, 0x00, 0xcf, 0x21, 0x37, 0xd1, 0x00},
{ 640, 480, 72, 0x63, 0x4f, 0x4f, 0x87, 0x52, 0x97, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x00, 0x00, 0xcf, 0x21, 0x0f, 0x56, 0x00},
{ 640, 480, 75, 0x64, 0x4f, 0x4f, 0x88, 0x51, 0x99, 0xf2, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x00, 0x00, 0xcf, 0x21, 0x0f, 0x56, 0x00},
{ 640, 480, 85, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9d, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x00, 0x00, 0xcf, 0x21, 0x1f, 0xb3, 0x00},
{ 800, 600, 56, 0x7b, 0x63, 0x63, 0x9f, 0x66, 0x8f, 0x6f, 0xf0, 0x60, 0x58,
0x2a, 0x57, 0x57, 0x70, 0x80, 0x00, 0x0f, 0x21, 0x1f, 0xb3, 0x00},
{ 800, 600, 60, 0x7f, 0x63, 0x63, 0x83, 0x68, 0x18, 0x72, 0xf0, 0x60, 0x58,
0x2c, 0x57, 0x57, 0x73, 0xa0, 0x00, 0x0f, 0x21, 0x27, 0xf4, 0x00},
{ 800, 600, 72, 0x7d, 0x63, 0x63, 0x81, 0x6a, 0x19, 0x98, 0xf0, 0x60, 0x7c,
0x22, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0x1f, 0xf9, 0x00},
{ 800, 600, 75, 0x7f, 0x63, 0x63, 0x83, 0x65, 0x0f, 0x6f, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x07, 0x51, 0x00},
{ 800, 600, 85, 0x7e, 0x63, 0x63, 0x82, 0x67, 0x0f, 0x75, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0x17, 0xda, 0x00},
{ 1024, 768, 60, 0xa3, 0x7f, 0x7f, 0x87, 0x82, 0x93, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x07, 0x6b, 0x00},
{ 1024, 768, 70, 0xa1, 0x7f, 0x7f, 0x85, 0x82, 0x93, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2a, 0xf9, 0x00},
{ 1024, 768, 75, 0x9f, 0x7f, 0x7f, 0x83, 0x81, 0x8d, 0x1e, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x20, 0x00, 0x0f, 0x21, 0x06, 0x40, 0x00},
{ 1024, 768, 85, 0xa7, 0x7f, 0x7f, 0x8b, 0x85, 0x91, 0x26, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x27, 0x20, 0x00, 0x0f, 0x21, 0x0e, 0x82, 0x00},
{ 1152, 864, 60, 0xb3, 0x8f, 0x8f, 0x97, 0x93, 0x9f, 0x87, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x88, 0x00, 0x00, 0x0f, 0x21, 0x26, 0xf4, 0x00},
{ 1152, 864, 70, 0xb4, 0x8f, 0x8f, 0x98, 0x93, 0x9f, 0x8e, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8f, 0x00, 0x00, 0x0f, 0x21, 0x0e, 0x82, 0x00},
{ 1152, 864, 75, 0xc3, 0x8f, 0x8f, 0x87, 0x97, 0x07, 0x82, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x83, 0xa0, 0x00, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1152, 864, 85, 0xbf, 0x8f, 0x8f, 0x83, 0x97, 0x07, 0x8d, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8e, 0xa0, 0x00, 0x0f, 0x21, 0x06, 0x64, 0x00},
{ 1280, 960, 60, 0xdc, 0x9f, 0x9f, 0x80, 0xab, 0x99, 0xe6, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xe7, 0xa0, 0x00, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1280, 960, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa7, 0x1b, 0xf1, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xf2, 0xa0, 0x00, 0x0f, 0x21, 0x0a, 0xa4, 0x00},
{ 1280, 1024, 60, 0xce, 0x9f, 0x9f, 0x92, 0xa5, 0x13, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1280, 1024, 75, 0xce, 0x9f, 0x9f, 0x92, 0xa1, 0x13, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x0a, 0x95, 0x00},
{ 1280, 1024, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa7, 0x1b, 0x2e, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x2f, 0xa0, 0x41, 0x0f, 0x21, 0x05, 0x40, 0x00},
{ 1600, 1024, 60, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x0e, 0xb9, 0x00},
{ 1600, 1024, 76, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x15, 0xa4, 0x00},
{ 1600, 1024, 85, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x09, 0x68, 0x00},
{ 1600, 1200, 60, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x19, 0xad, 0x00},
{ 1600, 1200, 65, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x21, 0xeb, 0x00},
{ 1600, 1200, 70, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x09, 0x64, 0x00},
{ 1600, 1200, 75, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x05, 0x50, 0x00},
{ 1600, 1200, 80, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x11, 0xad, 0x00},
{ 1600, 1200, 85, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x05, 0x5b, 0x00},
{ 1600, 1200, 100, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x15, 0xfd, 0x00},
{ 1792, 1344, 60, 0x94, 0x6f, 0x6f, 0x98, 0x77, 0x04, 0x70, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x71, 0x20, 0x55, 0x4f, 0x21, 0x0d, 0x8d, 0x01},
{ 1792, 1344, 75, 0x95, 0x6f, 0x6f, 0x99, 0x75, 0x03, 0x87, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x88, 0x20, 0x55, 0x4f, 0x21, 0x15, 0xfd, 0x01},
{ 1856, 1392, 60, 0x99, 0x73, 0x73, 0x9d, 0x79, 0x07, 0x9d, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0x9e, 0x20, 0x55, 0x4f, 0x21, 0x09, 0x78, 0x01},
{ 1856, 1392, 75, 0x9b, 0x73, 0x73, 0x9f, 0x7b, 0x09, 0xda, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x09, 0x9f, 0x01},
{ 1920, 1080, 60, 0x8f, 0x77, 0x77, 0x93, 0x79, 0x02, 0x63, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x64, 0x20, 0x55, 0xcf, 0x21, 0x05, 0x41, 0x01},
{ 1920, 1080, 72, 0x9b, 0x77, 0x77, 0x9f, 0x7a, 0x08, 0x92, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x93, 0x20, 0x55, 0xcf, 0x21, 0x11, 0xb3, 0x01},
{ 1920, 1200, 60, 0x9d, 0x77, 0x77, 0x81, 0x7b, 0x8b, 0xe0, 0x10, 0x40, 0xb2,
0x25, 0xaf, 0xaf, 0xe1, 0x20, 0x55, 0xcf, 0x21, 0x1d, 0xf2, 0x01},
{ 1920, 1200, 76, 0x9d, 0x77, 0x77, 0x81, 0x7b, 0x8b, 0xe0, 0x10, 0x40, 0xb2,
0x25, 0xaf, 0xaf, 0xe1, 0x20, 0x55, 0xcf, 0x21, 0x15, 0xee, 0x01},
{ 1920, 1440, 60, 0x9e, 0x77, 0x77, 0x82, 0x7f, 0x8c, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x05, 0x60, 0x01},
{ 1920, 1440, 75, 0xa0, 0x77, 0x77, 0x84, 0x80, 0x8e, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x09, 0xa4, 0x01},
{ 2048, 1536, 60, 0x98, 0x7f, 0x7f, 0x9c, 0x82, 0x10, 0x3b, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x3c, 0x20, 0x55, 0x0f, 0x21, 0x09, 0x84, 0x01},
{ 2048, 1536, 75, 0xa1, 0x7f, 0x7f, 0x85, 0x83, 0x91, 0x44, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x45, 0x20, 0x55, 0x0f, 0x21, 0x05, 0x84, 0x01},
{ 320, 200, 70, 0x2d, 0x27, 0x27, 0x91, 0x28, 0x8e, 0xbf, 0x1f, 0xc0, 0x9c,
0x2e, 0x8f, 0x8f, 0xc0, 0x80, 0x00, 0x4f, 0x21, 0x73, 0xd1, 0x00},
{ 320, 200, 85, 0x2f, 0x27, 0x27, 0x93, 0x29, 0x8d, 0xbb, 0x1f, 0xc0, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x80, 0x00, 0x4f, 0x21, 0x0f, 0x2a, 0x00},
{ 320, 240, 60, 0x2d, 0x27, 0x27, 0x91, 0x28, 0x8e, 0x0b, 0x3e, 0xc0, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x80, 0x00, 0xcf, 0x21, 0x73, 0xd1, 0x00},
{ 320, 240, 72, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8c, 0x06, 0x3e, 0xc0, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x80, 0x00, 0xcf, 0x21, 0xd5, 0x77, 0x00},
{ 320, 240, 75, 0x30, 0x27, 0x27, 0x94, 0x29, 0x8d, 0xf2, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x80, 0x00, 0xcf, 0x21, 0xca, 0xe5, 0x00},
{ 320, 240, 85, 0x2f, 0x27, 0x27, 0x93, 0x2b, 0x8f, 0xfb, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x86, 0xae, 0x00},
{ 400, 300, 60, 0x3d, 0x31, 0x31, 0x81, 0x35, 0x1d, 0x72, 0xf0, 0xe0, 0x58,
{ 320, 240, 72, 0x2f, 0x27, 0x27, 0x93, 0x29, 0x8b, 0x06, 0x3e, 0xc0, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x80, 0x00, 0xcf, 0x21, 0x0f, 0x2a, 0x00},
{ 320, 240, 75, 0x30, 0x27, 0x27, 0x94, 0x28, 0x8c, 0xf2, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x80, 0x00, 0xcf, 0x21, 0x63, 0xe5, 0x00},
{ 320, 240, 85, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xfb, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x43, 0xb3, 0x00},
{ 400, 300, 60, 0x3d, 0x31, 0x31, 0x81, 0x34, 0x1c, 0x72, 0xf0, 0xe0, 0x58,
0x2c, 0x57, 0x57, 0x73, 0xa0, 0x00, 0x0f, 0x21, 0x3f, 0xbc, 0x00},
{ 400, 300, 72, 0x3c, 0x31, 0x31, 0x80, 0x36, 0x1d, 0x98, 0xf0, 0xe0, 0x7c,
0x22, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0xfd, 0xe1, 0x00},
{ 400, 300, 75, 0x3d, 0x31, 0x31, 0x81, 0x33, 0x18, 0x6f, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x8a, 0xf7, 0x00},
{ 400, 300, 85, 0x3d, 0x31, 0x31, 0x81, 0x34, 0x18, 0x75, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0x2f, 0xcc, 0x00},
{ 512, 384, 60, 0x4f, 0x3f, 0x3f, 0x93, 0x42, 0x0a, 0x24, 0xf5, 0xe0, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0xc1, 0xe1, 0x00},
{ 512, 384, 70, 0x4e, 0x3f, 0x3f, 0x92, 0x42, 0x0a, 0x24, 0xf5, 0xe0, 0x02,
{ 400, 300, 72, 0x3c, 0x31, 0x31, 0x80, 0x35, 0x1c, 0x98, 0xf0, 0xe0, 0x7c,
0x22, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0x43, 0xf9, 0x00},
{ 400, 300, 75, 0x3d, 0x31, 0x31, 0x81, 0x32, 0x17, 0x6f, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x13, 0x51, 0x00},
{ 400, 300, 85, 0x3d, 0x31, 0x31, 0x81, 0x33, 0x17, 0x75, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0x13, 0x5d, 0x00},
{ 512, 384, 60, 0x4f, 0x3f, 0x3f, 0x93, 0x41, 0x09, 0x24, 0xf5, 0xe0, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2f, 0xea, 0x00},
{ 512, 384, 70, 0x4e, 0x3f, 0x3f, 0x92, 0x41, 0x09, 0x24, 0xf5, 0xe0, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2b, 0xf9, 0x00},
{ 512, 384, 75, 0x4d, 0x3f, 0x3f, 0x91, 0x41, 0x07, 0x1e, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x20, 0x00, 0xcf, 0x21, 0x26, 0x77, 0x00},
{ 512, 384, 85, 0x51, 0x3f, 0x3f, 0x95, 0x43, 0x09, 0x26, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x27, 0x20, 0x00, 0xcf, 0x21, 0x21, 0x40, 0x00},
{ 640, 400, 70, 0x5f, 0x4f, 0x50, 0x82, 0x52, 0x9e, 0xbf, 0x1f, 0x40, 0x9c,
0x2e, 0x8f, 0x97, 0xb8, 0x20, 0x00, 0x4f, 0x21, 0x72, 0xd1, 0x00},
{ 640, 400, 85, 0x63, 0x4f, 0x4f, 0x87, 0x54, 0x9c, 0xbb, 0x1f, 0x40, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x20, 0x00, 0x4f, 0x21, 0xd4, 0x77, 0x00},
{ 640, 480, 60, 0x5f, 0x4f, 0x50, 0x82, 0x52, 0x9e, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xe7, 0x04, 0x20, 0x00, 0xcf, 0x21, 0x72, 0xd1, 0x00},
{ 640, 480, 72, 0x63, 0x4f, 0x50, 0x86, 0x53, 0x98, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xe7, 0xff, 0x20, 0x00, 0xcf, 0x21, 0xd4, 0x77, 0x00},
{ 640, 480, 75, 0x64, 0x4f, 0x4f, 0x88, 0x52, 0x9a, 0xf2, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x20, 0x00, 0xcf, 0x21, 0xd4, 0x77, 0x00},
{ 640, 480, 85, 0x63, 0x4f, 0x4f, 0x87, 0x57, 0x9e, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x20, 0x00, 0xcf, 0x21, 0x85, 0xae, 0x00},
{ 640, 480, 100, 0x65, 0x4f, 0x4f, 0x89, 0x55, 0x9d, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x20, 0x00, 0x4f, 0x21, 0x1f, 0xd7, 0x00},
{ 640, 480, 120, 0x65, 0x4f, 0x4f, 0x89, 0x55, 0x9d, 0x01, 0x3e, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0x02, 0x20, 0x00, 0x4f, 0x21, 0x17, 0xcb, 0x00},
{ 640, 480, 140, 0x67, 0x4f, 0x4f, 0x8b, 0x55, 0x9e, 0x07, 0x3e, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0x08, 0x20, 0x00, 0x4f, 0x21, 0x22, 0xae, 0x00},
{ 640, 480, 160, 0x67, 0x4f, 0x4f, 0x8b, 0x55, 0x9e, 0x0d, 0x3e, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0x0e, 0x20, 0x00, 0x4f, 0x21, 0x24, 0x36, 0x00},
{ 720, 480, 60, 0x6b, 0x59, 0x59, 0x8f, 0x5c, 0x8b, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0xa0, 0x00, 0xcf, 0x21, 0xfc, 0x7e, 0x00},
{ 720, 480, 72, 0x6e, 0x59, 0x59, 0x92, 0x5c, 0x8d, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0xa0, 0x00, 0xcf, 0x21, 0xc9, 0xfb, 0x00},
{ 720, 480, 85, 0x70, 0x59, 0x59, 0x94, 0x62, 0x8a, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0xa0, 0x00, 0xcf, 0x21, 0x1b, 0xb3, 0x00},
{ 720, 576, 72, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x8a, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0xa0, 0x00, 0x0f, 0x21, 0x2a, 0x8f, 0x00},
{ 720, 576, 100, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x8a, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0xa0, 0x00, 0x0f, 0x21, 0x17, 0xe9, 0x00},
{ 800, 600, 60, 0x7f, 0x63, 0x63, 0x83, 0x69, 0x19, 0x72, 0xf0, 0x60, 0x58,
0x2c, 0x57, 0x57, 0x73, 0x80, 0x00, 0x0f, 0x21, 0x26, 0x79, 0x00},
{ 800, 600, 72, 0x7d, 0x63, 0x63, 0x81, 0x6b, 0x1a, 0x98, 0xf0, 0x60, 0x7c,
0x22, 0x57, 0x57, 0x99, 0x80, 0x00, 0x0f, 0x21, 0x1f, 0xf9, 0x00},
{ 800, 600, 75, 0x7f, 0x63, 0x63, 0x83, 0x66, 0x10, 0x6f, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x70, 0x80, 0x00, 0x0f, 0x21, 0x1f, 0xf7, 0x00},
{ 800, 600, 85, 0x7e, 0x63, 0x63, 0x82, 0x68, 0x10, 0x75, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x76, 0x80, 0x00, 0x0f, 0x21, 0x17, 0xda, 0x00},
{ 800, 600, 100, 0x81, 0x63, 0x63, 0x85, 0x6a, 0x15, 0x7a, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x7b, 0x80, 0x00, 0x4f, 0x21, 0x2a, 0xe3, 0x00},
{ 800, 600, 120, 0x83, 0x63, 0x63, 0x87, 0x6b, 0x16, 0x81, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x82, 0x80, 0x00, 0x4f, 0x21, 0x1e, 0xd1, 0x00},
{ 800, 600, 140, 0x83, 0x63, 0x63, 0x87, 0x6b, 0x16, 0x89, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x8a, 0x80, 0x00, 0x4f, 0x21, 0x15, 0x5f, 0x00},
{ 800, 600, 160, 0x85, 0x63, 0x63, 0x89, 0x6c, 0x17, 0x91, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x92, 0x80, 0x00, 0x4f, 0x21, 0x29, 0xc1, 0x00},
{ 960, 720, 60, 0x97, 0x77, 0x77, 0x9b, 0x7e, 0x0a, 0xe8, 0xf0, 0x60, 0xd0,
0x23, 0xcf, 0xcf, 0xe9, 0x00, 0x00, 0x4f, 0x21, 0x22, 0x9a, 0x00},
{ 960, 720, 75, 0x9b, 0x77, 0x77, 0x9f, 0x7f, 0x0c, 0xee, 0xf0, 0x60, 0xd0,
0x23, 0xcf, 0xcf, 0xef, 0x00, 0x00, 0x4f, 0x21, 0x29, 0x77, 0x00},
{ 960, 720, 85, 0x9b, 0x77, 0x77, 0x9f, 0x7f, 0x0c, 0xf2, 0xf0, 0x60, 0xd0,
0x23, 0xcf, 0xcf, 0xf3, 0x00, 0x00, 0x4f, 0x21, 0x21, 0x71, 0x00},
{ 1024, 768, 60, 0xa3, 0x7f, 0x7f, 0x87, 0x83, 0x94, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x29, 0x6b, 0x00},
{ 1024, 768, 70, 0xa1, 0x7f, 0x7f, 0x85, 0x83, 0x94, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x2a, 0xf9, 0x00},
{ 1024, 768, 75, 0x9f, 0x7f, 0x7f, 0x83, 0x82, 0x8e, 0x1e, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x0f, 0x21, 0x25, 0x77, 0x00},
{ 1024, 768, 85, 0xa7, 0x7f, 0x7f, 0x8b, 0x86, 0x92, 0x26, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x20, 0x40, 0x00},
{ 1024, 768, 100, 0xa9, 0x7f, 0x7f, 0x8d, 0x89, 0x97, 0x2c, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x2d, 0x00, 0x00, 0x4f, 0x21, 0x28, 0x5d, 0x00},
{ 1024, 768, 120, 0xab, 0x7f, 0x7f, 0x8f, 0x8a, 0x98, 0x35, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x36, 0x00, 0x00, 0x4f, 0x21, 0x15, 0x86, 0x00},
{ 1152, 864, 60, 0xb3, 0x8f, 0x8f, 0x97, 0x94, 0x80, 0x87, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x88, 0x80, 0x00, 0x0f, 0x21, 0x25, 0x79, 0x00},
{ 1152, 864, 70, 0xb4, 0x8f, 0x8f, 0x98, 0x94, 0x80, 0x8e, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8f, 0x80, 0x00, 0x0f, 0x21, 0x20, 0x40, 0x00},
{ 1152, 864, 75, 0xc3, 0x8f, 0x8f, 0x87, 0x98, 0x08, 0x82, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x83, 0xa0, 0x00, 0x0f, 0x21, 0x29, 0xb3, 0x00},
{ 1152, 864, 85, 0xbf, 0x8f, 0x8f, 0x83, 0x98, 0x08, 0x8d, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8e, 0xa0, 0x00, 0x0f, 0x21, 0x28, 0x64, 0x00},
{ 1152, 864, 100, 0xbf, 0x8f, 0x8f, 0x83, 0x9a, 0x0a, 0x91, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x92, 0xa0, 0x00, 0x4f, 0x21, 0x24, 0x6c, 0x00},
{ 1152, 864, 120, 0xc1, 0x8f, 0x8f, 0x85, 0x9b, 0x0b, 0x9c, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x9d, 0xa0, 0x00, 0x4f, 0x21, 0x21, 0xf4, 0x00},
{ 1280, 960, 60, 0xdc, 0x9f, 0x9f, 0x80, 0xac, 0x9a, 0xe6, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xe7, 0xa0, 0x00, 0x0f, 0x21, 0x29, 0xb3, 0x00},
{ 1280, 960, 75, 0xd3, 0x9f, 0x9f, 0x97, 0xab, 0x1c, 0xe8, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xe9, 0xa0, 0x00, 0x4f, 0x21, 0x15, 0x7d, 0x00},
{ 1280, 960, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa8, 0x1c, 0xf1, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xf2, 0xa0, 0x00, 0x0f, 0x21, 0x18, 0x51, 0x00},
{ 1280, 1024, 60, 0xce, 0x9f, 0x9f, 0x92, 0xa6, 0x14, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x29, 0xb3, 0x00},
{ 1280, 1024, 75, 0xce, 0x9f, 0x9f, 0x92, 0xa2, 0x14, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x14, 0x40, 0x00},
{ 1280, 1024, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa8, 0x1c, 0x2e, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x2f, 0xa0, 0x41, 0x0f, 0x21, 0x24, 0x77, 0x00},
{ 1280, 1024, 100, 0x69, 0x4f, 0x4f, 0x8d, 0x56, 0x9f, 0x3b, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x3c, 0x20, 0x41, 0x4f, 0x21, 0x28, 0x9e, 0x01},
{ 1600, 1024, 60, 0x07, 0xc7, 0xc7, 0x8b, 0xd5, 0x0a, 0x22, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x23, 0x81, 0x41, 0x4f, 0x21, 0x29, 0xe3, 0x00},
{ 1600, 1024, 76, 0x01, 0xc7, 0xc7, 0x85, 0xcc, 0x00, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x81, 0x41, 0xcf, 0x21, 0x21, 0xec, 0x00},
{ 1600, 1024, 85, 0x83, 0x63, 0x63, 0x87, 0x6b, 0x16, 0x31, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x32, 0x80, 0x41, 0x4f, 0x21, 0x1d, 0xf8, 0x01},
{ 1600, 1200, 60, 0x09, 0xc7, 0xc7, 0x8d, 0xd0, 0x08, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x81, 0x55, 0x0f, 0x21, 0x19, 0xb3, 0x00},
{ 1600, 1200, 65, 0x09, 0xc7, 0xc7, 0x8d, 0xd0, 0x08, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x81, 0x55, 0x0f, 0x21, 0x28, 0x91, 0x00},
{ 1600, 1200, 70, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x20, 0x82, 0x01},
{ 1600, 1200, 75, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x14, 0x61, 0x01},
{ 1600, 1200, 80, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x11, 0xb3, 0x01},
{ 1600, 1200, 85, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x0c, 0x4e, 0x01},
{ 1600, 1200, 100, 0x85, 0x63, 0x63, 0x89, 0x6c, 0x17, 0xf5, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xf6, 0x80, 0x55, 0x4f, 0x21, 0x0c, 0x60, 0x01},
{ 1792, 1344, 60, 0x94, 0x6f, 0x6f, 0x98, 0x78, 0x05, 0x70, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x71, 0x00, 0x55, 0x4f, 0x21, 0x0d, 0x8d, 0x01},
{ 1792, 1344, 75, 0x95, 0x6f, 0x6f, 0x99, 0x76, 0x04, 0x87, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x88, 0x00, 0x55, 0x4f, 0x21, 0x15, 0xfd, 0x01},
{ 1856, 1392, 60, 0x99, 0x73, 0x73, 0x9d, 0x7a, 0x08, 0x9d, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0x9e, 0x00, 0x55, 0x4f, 0x21, 0x11, 0xb5, 0x01},
{ 1856, 1392, 75, 0x9b, 0x73, 0x73, 0x9f, 0x7c, 0x0a, 0xda, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0xdb, 0x00, 0x55, 0x4f, 0x21, 0x09, 0x9f, 0x01},
{ 1920, 1080, 60, 0x23, 0xef, 0xef, 0x87, 0xf4, 0x86, 0x63, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x64, 0x01, 0x55, 0xcf, 0x21, 0x28, 0x84, 0x00},
{ 1920, 1080, 72, 0x9b, 0x77, 0x77, 0x9f, 0x7b, 0x09, 0x92, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x93, 0x00, 0x55, 0xcf, 0x21, 0x11, 0xb3, 0x01},
{ 1920, 1080, 75, 0x9e, 0x77, 0x77, 0x82, 0x81, 0x8e, 0x66, 0x10, 0x40, 0x38,
0x2b, 0x37, 0x37, 0x67, 0x00, 0x55, 0x4f, 0x21, 0x11, 0xb7, 0x01},
{ 1920, 1080, 85, 0x9f, 0x77, 0x77, 0x83, 0x81, 0x8e, 0x6c, 0x10, 0x40, 0x38,
0x2b, 0x37, 0x37, 0x6d, 0x00, 0x55, 0x4f, 0x21, 0x11, 0xd2, 0x01},
{ 1920, 1200, 60, 0x9d, 0x77, 0x77, 0x81, 0x80, 0x8d, 0xd8, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xd9, 0x00, 0x55, 0x4f, 0x21, 0x15, 0xbb, 0x01},
{ 1920, 1200, 76, 0x9d, 0x77, 0x77, 0x81, 0x7c, 0x8c, 0xe0, 0x10, 0x40, 0xb2,
0x25, 0xaf, 0xaf, 0xe1, 0x00, 0x55, 0xcf, 0x21, 0x14, 0x76, 0x01},
{ 1920, 1200, 85, 0xa0, 0x77, 0x77, 0x84, 0x82, 0x8f, 0xea, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xeb, 0x00, 0x55, 0x4f, 0x21, 0x08, 0x4d, 0x01},
{ 1920, 1440, 60, 0x9e, 0x77, 0x77, 0x82, 0x80, 0x8d, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x00, 0x55, 0x4f, 0x21, 0x10, 0x60, 0x01},
{ 1920, 1440, 75, 0xa0, 0x77, 0x77, 0x84, 0x81, 0x8f, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x00, 0x55, 0x4f, 0x21, 0x08, 0x51, 0x01},
{ 2048, 1536, 60, 0x98, 0x7f, 0x7f, 0x9c, 0x83, 0x11, 0x3b, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x3c, 0x00, 0x55, 0x0f, 0x21, 0x11, 0xc7, 0x01},
{ 2048, 1536, 75, 0xa1, 0x7f, 0x7f, 0x85, 0x84, 0x92, 0x44, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x45, 0x00, 0x55, 0x0f, 0x21, 0x10, 0x84, 0x01},
{ 2048, 1536, 85, 0x9c, 0x7f, 0x7f, 0x80, 0x80, 0x8c, 0x30, 0x3e, 0x40, 0xff,
0x22, 0xff, 0xff, 0x31, 0x00, 0x55, 0x0f, 0x21, 0x10, 0x8f, 0x01},
{ 512, 384, 75, 0x4d, 0x3f, 0x3f, 0x91, 0x40, 0x06, 0x1e, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x20, 0x00, 0xcf, 0x21, 0x07, 0x40, 0x00},
{ 512, 384, 85, 0x51, 0x3f, 0x3f, 0x95, 0x42, 0x08, 0x26, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x27, 0x20, 0x00, 0xcf, 0x21, 0x0f, 0x82, 0x00},
{ 640, 400, 70, 0x5f, 0x4f, 0x4f, 0x83, 0x51, 0x9d, 0xbf, 0x1f, 0x40, 0x9c,
0x2e, 0x8f, 0x8f, 0xc0, 0x00, 0x00, 0x4f, 0x21, 0x37, 0xd1, 0x00},
{ 640, 400, 85, 0x63, 0x4f, 0x4f, 0x87, 0x53, 0x9b, 0xbb, 0x1f, 0x40, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x00, 0x00, 0x4f, 0x21, 0x0f, 0x56, 0x00},
{ 720, 480, 60, 0x6b, 0x59, 0x59, 0x8f, 0x5b, 0x8a, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x80, 0x00, 0xcf, 0x21, 0x0b, 0x3d, 0x00},
{ 720, 480, 72, 0x6e, 0x59, 0x59, 0x92, 0x5b, 0x8c, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x80, 0x00, 0xcf, 0x21, 0x2f, 0xfb, 0x00},
{ 720, 480, 85, 0x70, 0x59, 0x59, 0x94, 0x61, 0x89, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x1b, 0xb3, 0x00},
{ 720, 576, 72, 0x70, 0x59, 0x59, 0x94, 0x5d, 0x89, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0x80, 0x00, 0x0f, 0x21, 0x13, 0x8f, 0x00},
{ 720, 576, 100, 0x70, 0x59, 0x59, 0x94, 0x5d, 0x89, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0x80, 0x00, 0x0f, 0x21, 0x17, 0xe9, 0x00},
#else // #ifdef H4
// STB End Changes

View File

@@ -0,0 +1,33 @@
/*
* Select the syntax appropriate to the 386 assembler being used.
*
* Copyright (c) 2002 - Borca Daniel
* Email : dborca@yahoo.com
* Web : http://www.geocities.com/dborca
*
* $Header$
* $Log$
*/
#ifndef ASSYNTAX_H_included
#define ASSYNTAX_H_included
#ifdef __DJGPP__
#define type version
#define size version
#define CONCAT(a,b) a##b
#define GLOBL(name) .globl CONCAT(_,name) ; CONCAT(_,name) :
#define ALIGN(n) .balign n
#define EXTRN(name) CONCAT(_,name)
#else
#define GLOBL(name) .globl name; .type name, @function; name:
#define ALIGN(n) .align n
#define EXTRN(name) name
#endif
#endif

View File

@@ -134,28 +134,28 @@ VINCLUDES = $(HAL_CSIM_INCLUDES)
#
# Special rules for assembly files.
#
cpudtect.o cpudtect.lo: cpudtect.S assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -c -o $*.o $<
cpudtect.o cpudtect.lo: cpudtect.S
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -c -o $*.o $<
xdraw2_def.o xdraw2_def.lo: xdraw2.S xdraw2.inc.S fxgasm.h assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -c -o $*.o $<
xdraw2_def.o xdraw2_def.lo: xdraw2.S xdraw2.inc.S fxgasm.h
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -c -o $*.o $<
xdraw3_def.o xdraw3_def.lo: xdraw3.S fxgasm.h assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -c -o $*.o $<
xdraw3_def.o xdraw3_def.lo: xdraw3.S fxgasm.h
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -c -o $*.o $<
# 3DNow!(tm) dependencies
# XXX_def.obj targets are the default targets
if GL_AMD3D
xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.S xdraw2.inc.S fxgasm.h assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.S xdraw2.inc.S fxgasm.h
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.S fxgasm.h assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.S fxgasm.h
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.S fxgasm.h assyntax.h
libtool --mode=compile $(CC) -$$ -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.S fxgasm.h
libtool --mode=compile $(CC) -$$ -I$(top_builddir)/@FX_GLIDE_HW@/glide3/src $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $*.o $<
endif
@@ -194,7 +194,7 @@ WHOLE_LIBS = $(top_builddir)/swlibs/fxmisc/libfxmisc.la \
$(top_builddir)/@FX_GLIDE_HW@/minihwc/libminihwc.la
LINK_LIBS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
CLEANFILES = fxinline.h fxgasm.h assyntax.h
CLEANFILES = fxinline.h fxgasm.h
noinst_PROGRAMS = fxgasm
include_HEADERS = g3ext.h glide.h glideutl.h glidesys.h
@@ -218,14 +218,12 @@ libglide3_la_LDFLAGS = -version-info 13:0:10
libglide3_la_LIBADD = $(WHOLE_LIBS) $(LINK_LIBS)
#--------------------------------------------------------------------------#
# special rules for making fxgasm.h, fxinclude.h, assyntax.h
# special rules for making fxgasm.h, fxinclude.h
#
fxgasm.h: fxgasm
./fxgasm -hex > fxgasm.h
fxinline.h: fxgasm
./fxgasm -inline > fxinline.h
assyntax.h: $(top_srcdir)/swlibs/fxmisc/assyntax.h
ln -sf $< $@
#--------------------------------------------------------------------------#
# special rules for using fxgasm.h, fxinclude.h

View File

@@ -21,6 +21,9 @@
/* $Header$ */
/* $Revision$ */
/* $Log$
/* Revision 1.2.8.1 2003/05/05 07:12:47 dborca
/* no message
/*
/* Revision 1.2 2000/02/15 22:35:59 joseph
/* Changes to support FreeBSD (patch submitted by Doug Rabson)
/*
@@ -355,8 +358,7 @@ GLOBL(_trisetup_clip_coor_thunk)
/* If debugging make sure that we're in clip coordinates */
#ifdef GLIDE_DEBUG
mov CoordinateSpace(%gc) , %eax
test $1 , %eax
testl $1, CoordinateSpace(%gc)
jnz L_trisetup_clip_coor_thunk__clipSpace
xor %eax , %eax
mov %eax , (%eax)
@@ -365,6 +367,7 @@ L_trisetup_clip_coor_thunk__clipSpace:
pushl $1 /* mode = grDrawVertexArray */
call %procPtr /* (*gc->curArchProcs.drawTrianglesProc)(grDrawVertexArray, 3, vPtr) */
add $12, %esp
ret /* pop 3 dwords (vertex addrs) and return */
L_END__trisetup_clip_coor_thunk:

View File

@@ -1,3 +1,5 @@
/* -*-c++-*- */
/* $Header$ */
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
@@ -17,27 +19,10 @@
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** File name: h3cinit.h
**
** Description: Macros & function definitions for Banshee/Avenger.
**
** $Revision$
** $Date$
**
** $History: h3cinit.h $
**
** ***************** Version 1 *****************
** User: Sapphire Date: 3/16/99 Time: 7:28p
** Created in $/Releases/Voodoo3/V3_OEM_100/3dfx/devel/H3/incsrc
**
** ***************** Version 21 *****************
** User: Michael Date: 1/05/99 Time: 8:45a
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
*/
/* -*-c++-*- */
/* $Header$ */
#ifndef __H3CINIT_H__
@@ -56,25 +41,26 @@
#define DEFAULT_GRXCLK_SPEED H3_GRXCLK_SPEED
#endif
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase);// init register base
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase, // init register base
FxBool isNapalm);// Napalm
FxU32 // return # of MB of memory
h3InitSgram(FxU32 regBase, // init iegister base
FxU32 sgramMode,
FxU32 sgramMask,
FxU32 sgramColor,
char *vendorName); // NULL or name of SGRAM vendor
char *vendorName); // NULL or name of SGRAM vendor
void
h3InitPlls(FxU32 regBase, // init iegister base
FxU32 grxSpeedInMHz, // desired GRX clock frequency (MHz)
h3InitPlls(FxU32 regBase, // init iegister base
FxU32 grxSpeedInMHz, // desired GRX clock frequency (MHz)
FxU32 memSpeedInMHz); // desired MEM clock frequency (MHz)
void
h4InitPlls(FxU32 regBase, // init register base
FxU32 deviceID, // H4 or H4_OEM
FxU32 grxSpeedInMHz); // desired clock frequency (MHz)
h4InitPlls(FxU32 regBase, // init register base
FxU32 deviceID, // H4 or H4_OEM
FxU32 grxSpeedInMHz); // desired clock frequency (MHz)
void
h3InitVga(
@@ -84,7 +70,7 @@ h3InitVga(
void
h3InitVideoProc(
FxU32 regBase, // memory base address
FxU32 vidProcCfg); // vidProcCfg register control bits
FxU32 vidProcCfg); // vidProcCfg register control bits
FxBool
h3InitSetVideoMode(
@@ -92,46 +78,46 @@ h3InitSetVideoMode(
FxU32 xRes, // x resolution
FxU32 yRes, // y resolution
FxU32 refresh, // refresh freq
#if defined(H3VDD)
#if defined(H3VDD) && defined(H3_B0)
FxU32 loadClut, // really a bool, should we load the lookup table
FxU32 scanlinedouble); // set scanline double bit and double y?
#else
FxU32 loadClut) ; // initialize clut entries?
FxU32 loadClut) ; // initialize clut entries?
#endif
void
h3InitVideoDesktopSurface(
FxU32 regBase,
FxU32 enable, // 1=enable desktop surface (DS), 1=disable
FxU32 tiled, // 0=DS linear, 1=tiled
FxU32 pixFmt, // pixel format of DS
FxU32 clutBypass, // bypass clut for DS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of DS
FxU32 stride); // distance between scanlines of the DS, in
// units of bytes for linear DS's and tiles for
// tiled DS's
FxU32 enable, // 1=enable desktop surface (DS), 1=disable
FxU32 tiled, // 0=DS linear, 1=tiled
FxU32 pixFmt, // pixel format of DS
FxU32 clutBypass, // bypass clut for DS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of DS
FxU32 stride); // distance between scanlines of the DS, in
// units of bytes for linear DS's and tiles for
// tiled DS's
void
h3InitVideoOverlaySurface(
FxU32 regBase,
FxU32 enable, // 1=enable Overlay surface (OS), 1=disable
FxU32 stereo, // 1=enable OS stereo, 0=disable
FxU32 horizScaling, // 1=enable horizontal scaling, 0=disable
FxU32 dudx, // horizontal scale factor (ignored if not
// scaling)
FxU32 verticalScaling, // 1=enable vertical scaling, 0=disable
FxU32 dvdy, // vertical scale factor (ignored if not
// scaling)
FxU32 filterMode, // duh
FxU32 tiled, // 0=OS linear, 1=tiled
FxU32 pixFmt, // pixel format of OS
FxU32 clutBypass, // bypass clut for OS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of OS
FxU32 stride); // distance between scanlines of the OS, in
// units of bytes for linear OS's and tiles for
// tiled OS's
FxU32 enable, // 1=enable Overlay surface (OS), 1=disable
FxU32 stereo, // 1=enable OS stereo, 0=disable
FxU32 horizScaling, // 1=enable horizontal scaling, 0=disable
FxU32 dudx, // horizontal scale factor (ignored if not
// scaling)
FxU32 verticalScaling, // 1=enable vertical scaling, 0=disable
FxU32 dvdy, // vertical scale factor (ignored if not
// scaling)
FxU32 filterMode, // duh
FxU32 tiled, // 0=OS linear, 1=tiled
FxU32 pixFmt, // pixel format of OS
FxU32 clutBypass, // bypass clut for OS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of OS
FxU32 stride); // distance between scanlines of the OS, in
// units of bytes for linear OS's and tiles for
// tiled OS's
#ifndef H3VDD
void
@@ -142,8 +128,8 @@ h3InitMeasureSiProcess(
void
h3InitBlockWrite(
FxU32 regBase,
FxU32 enable, // 1=enable block writes, 0=disable
FxU32 threshhold); // block write threshhold
FxU32 enable, // 1=enable block writes, 0=disable
FxU32 threshhold); // block write threshhold
void
h3InitResetAll(

View File

@@ -1568,6 +1568,7 @@ static FxBool grLfbReadRegionOrigin (GrBuffer_t src_buffer, GrOriginLocation_t o
}
rv=FXFALSE;
#ifndef __linux__ /* [dBorca] fixme :D */
/* We want to read using HWC if we using FSAA with 4 chips or want dithering */
/* or we are using forced 32 bit mode and want dithering */
wantHwc = (_GlideRoot.environment.useHwcAAforLfbRead & 1) &&
@@ -1621,6 +1622,7 @@ static FxBool grLfbReadRegionOrigin (GrBuffer_t src_buffer, GrOriginLocation_t o
rv=FXTRUE;
goto done;
}
#endif
if (_grLfbLock(GR_LFB_READ_ONLY,
src_buffer,

View File

@@ -266,7 +266,7 @@ typedef FxU32 GrLock_t;
#define GR_LFB_IDLE 0x00
#define GR_LFB_NOIDLE 0x10
#define GR_LFB_WRITE_ONLY_EXPLICIT_EXT 0x02 // explicitly not allow reading from the lfb pointer
#define GR_LFB_WRITE_ONLY_EXPLICIT_EXT 0x02 /* explicitly not allow reading from the lfb pointer */
typedef FxI32 GrLfbBypassMode_t;
#define GR_LFBBYPASS_DISABLE 0x0

Binary file not shown.

Binary file not shown.

View File

@@ -41,8 +41,9 @@
#define DEFAULT_GRXCLK_SPEED H3_GRXCLK_SPEED
#endif
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase);// init register base
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase, // init register base
FxBool isNapalm);// Napalm
FxU32 // return # of MB of memory
h3InitSgram(FxU32 regBase, // init iegister base

View File

@@ -2136,6 +2136,9 @@ hwcInit(FxU32 vID, FxU32 dID)
hwcReadConfigRegister(&hInfo.boardInfo[i], chip, offsetof(SstPCIConfigRegs, ioBaseAddr));
}
}
// Save realNumChips
hInfo.boardInfo[i].pciInfo.realNumChips = hInfo.boardInfo[i].pciInfo.numChips;
if(GETENV("FX_GLIDE_NUM_CHIPS", hInfo.boardInfo[monitor].RegPath)) {
FxU32 numChips;
@@ -2515,14 +2518,16 @@ hwcInitRegisters(hwcBoardInfo *bInfo)
/* read back the memory size, since we
* don't know it under DOS (see hwcInit) - dwj
*/
bInfo->h3Mem = h3InitGetMemSize(bInfo->regInfo.ioPortBase);
bInfo->h3Mem = h3InitGetMemSize(bInfo->regInfo.ioPortBase, IS_NAPALM(bInfo->pciInfo.deviceID));
/* Ugh, lame. We can only report back 16MB to Glide since we can't
* really map in all 64MB necessary for LFB accesses. */
#if 0 /* [dBorca] who sez? */
if(IS_NAPALM(bInfo->pciInfo.deviceID)) {
if(bInfo->h3Mem > 16) {
bInfo->h3Mem = 16;
}
}
#endif
h3InitVga(bInfo->regInfo.ioPortBase, FXTRUE);
}
@@ -4683,7 +4688,7 @@ hwcInitVideo(hwcBoardInfo *bInfo, FxBool tiled, FxVideoTimingInfo *vidTiming,
0, /* Filter mode */
FXTRUE, /* tiled */
pixFmt, /* pixel format of OS */
FXTRUE, /* bypass clut for OS? */
FXFALSE, /* bypass clut for OS? */
0, /* 0=lower 256 CLUT entries, 1=upper 256 */
bInfo->buffInfo.colBuffStart0[0],/* board address of beginning of OS */
stride); /* distance between scanlines of the OS, in
@@ -7179,10 +7184,61 @@ static void hwcCopyBuffer8888Flipped(hwcBoardInfo *bInfo, FxU16 *source, int w,
FxU8 *endline = dst+w*4;
w*= 4;
#ifndef __DJGPP__ /* [dBorca] should have this done, but it's 4:00am */
if (bInfo->CPUInfo.os_support & _CPU_FEATURE_MMX)
{
/* MMX Optimized Loop */
#ifdef __DJGPP__
__asm("\n\
emms /* mmx */ \n\
\n\
.p2align 3,,7 \n\
0: \n\
/* Read Pixel, Reduce to 32 bits */ \n\
movq (%%eax), %%mm0 \n\
packuswb %%mm0, %%mm0 \n\
movd %%mm0, %%ebx \n\
\n\
/* Gamma Correct Blue */ \n\
mov %%ebx, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_blue(, %%ecx, 4), %%bl \n\
\n\
/* Gamma Correct Green */ \n\
mov %%ebx, %%ecx \n\
shr $8, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_green(, %%ecx, 4), %%bh \n\
\n\
/* Gamma Correct Red */ \n\
mov %%ebx, %%ecx \n\
shr $16, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_red_shifted(, %%ecx, 4), %%ecx \n\
and $0xFF00FFFF, %%ebx \n\
or %%ecx, %%ebx \n\
\n\
/* Write */ \n\
mov %%ebx, (%%edx) \n\
\n\
/* Next Pixel */ \n\
add $8, %%eax \n\
add $4, %%edx \n\
cmp %%edi, %%edx /* if (dst!=endline) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
/* Next Scanline */ \n\
mov %4, %%ebx \n\
add %%ebx, %%edi /* endline += w; */ \n\
shl $2, %%ebx \n\
sub %%ebx, %%eax /* src -= w*2; */ \n\
cmp %%esi, %%edx /* if (dst!=end) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
emms"
:
:"a"(src), "d"(dst), "D"(endline), "S"(end), "m"(w)
:"%ebx", "%ecx");
#else
__asm
{
emms /* mmx */
@@ -7237,9 +7293,9 @@ static void hwcCopyBuffer8888Flipped(hwcBoardInfo *bInfo, FxU16 *source, int w,
emms /* mmx */
}
#endif
}
else
#endif
{
while (dst<end)
{
@@ -7263,10 +7319,63 @@ static void hwcCopyBuffer8888FlippedShifted(hwcBoardInfo *bInfo, FxU16 *source,
FxU8 *endline = dst+w*4;
w *= 4;
#ifndef __DJGPP__ /* [dBorca] should have this done, but it's 4:00am */
if (bInfo->CPUInfo.os_support & _CPU_FEATURE_MMX)
{
/* MMX Optimized Loop */
#ifdef __DJGPP__
__asm("\n\
emms /* mmx */ \n\
movd %5, %%mm6 /* mm6 = aaShift */ \n\
\n\
.p2align 3,,7 \n\
0: \n\
/* Read Pixel, Reduce to 32 bits */ \n\
movq (%%eax), %%mm0 \n\
psrlw %%mm6, %%mm0 \n\
packuswb %%mm0, %%mm0 \n\
movd %%mm0, %%ebx \n\
\n\
/* Gamma Correct Blue */ \n\
mov %%ebx, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_blue(, %%ecx, 4), %%bl \n\
\n\
/* Gamma Correct Green */ \n\
mov %%ebx, %%ecx \n\
shr $8, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_green(, %%ecx, 4), %%bh \n\
\n\
/* Gamma Correct Red */ \n\
mov %%ebx, %%ecx \n\
shr $16, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_red_shifted(, %%ecx, 4), %%ecx \n\
and $0xFF00FFFF, %%ebx \n\
or %%ecx, %%ebx \n\
\n\
/* Write */ \n\
mov %%ebx, (%%edx) \n\
\n\
/* Next Pixel */ \n\
add $8, %%eax \n\
add $4, %%edx \n\
cmp %%edi, %%edx /* if (dst!=endline) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
/* Next Scanline */ \n\
mov %4, %%ebx \n\
add %%ebx, %%edi /* endline += w; */ \n\
shl $2, %%ebx \n\
sub %%ebx, %%eax /* src -= w*2; */ \n\
cmp %%esi, %%edx /* if (dst!=end) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
emms"
:
:"a"(src), "d"(dst), "D"(endline), "S"(end), "m"(w), "m"(aaShift)
:"%ebx", "%ecx");
#else
__asm
{
emms /* mmx */
@@ -7323,9 +7432,9 @@ static void hwcCopyBuffer8888FlippedShifted(hwcBoardInfo *bInfo, FxU16 *source,
emms /* mmx */
}
#endif
}
else
#endif
{
while (dst<end)
{
@@ -7358,12 +7467,180 @@ static void hwcCopyBuffer8888FlippedDithered(hwcBoardInfo *bInfo, FxU16 *source,
val_max = (0xFF << aaShift);
dither_mask = ~((~0) << aaShift);
#ifndef __DJGPP__ /* [dBorca] should have this done, but it's 4:00am */
if (bInfo->CPUInfo.os_support & _CPU_FEATURE_MMX)
{
FxU32 sse_mmxplus = bInfo->CPUInfo.os_support & (_CPU_FEATURE_MMXPLUS|_CPU_FEATURE_SSE);
/* MMX Optimized Loop */
#ifdef __DJGPP__
__asm("\n\
emms /* mmx */ \n\
\n\
/* mm7 = all ones */ \n\
pcmpeqd %%mm7, %%mm7 \n\
\n\
/* mm6 = aaShift */ \n\
movd %7, %%mm6 \n\
\n\
/* mm5 = accumulated error */ \n\
pxor %%mm5, %%mm5 \n\
\n\
/* mm4 = error_mask */ \n\
movd %5, %%mm4 /* error_mask -> Low word */ \n\
punpcklwd %%mm4, %%mm4 /* Rep Low Words -> High Words */\n\
punpckldq %%mm4, %%mm4 /* Rep Low Dword -> High Dword */\n\
\n\
/* mm3 = val_max */ \n\
movd %6, %%mm3 /* val_max -> Low word */ \n\
punpcklwd %%mm3, %%mm3 /* Rep Low Words -> High Words */\n\
punpckldq %%mm3, %%mm3 /* Rep Low Dword -> High Dword */\n\
\n\
/* mm2 = min mask */ \n\
\n\
/* mm1 = masked maximum cols */ \n\
\n\
/* mm0 = colour */ \n\
\n\
/* Check to see if we support MMXPlus or SSE */ \n\
test %%ecx, %%ecx \n\
jz 1f \n\
\n\
/* SSE/MMX+ Loop */ \n\
.p2align 3,,7 \n\
0: \n\
/* Read Pixel and add error */ \n\
/* c = *src + er - (*src>>8) */ \n\
movq (%%eax), %%mm0 \n\
movq %%mm0, %%mm1 \n\
psrlw $8, %%mm1 \n\
psubsw %%mm1, %%mm0 \n\
paddsw %%mm5, %%mm0 \n\
\n\
/* Clamp to max */ \n\
/* c = min(c,val_max) */ \n\
pminsw %%mm3, %%mm0 \n\
\n\
/* Find error */ \n\
/* er = c & dither_mask; */ \n\
movq %%mm0, %%mm5 /* er = c */ \n\
pand %%mm4, %%mm5 /* er &= dither_mask */ \n\
\n\
/* Reduce to 32 bits */ \n\
psrlw %%mm6, %%mm0 \n\
packuswb %%mm0, %%mm0 \n\
movd %%mm0, %%ebx \n\
\n\
/* Gamma Correct Blue */ \n\
mov %%ebx, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_blue(, %%ecx, 4), %%bl \n\
\n\
/* Gamma Correct Green */ \n\
mov %%ebx, %%ecx \n\
shr $8, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_green(, %%ecx, 4), %%bh \n\
\n\
/* Gamma Correct Red */ \n\
mov %%ebx, %%ecx \n\
shr $16, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_red_shifted(, %%ecx, 4), %%ecx \n\
and $0xFF00FFFF, %%ebx \n\
or %%ecx, %%ebx \n\
\n\
/* Write */ \n\
mov %%ebx, (%%edx) \n\
\n\
/* Next Pixel */ \n\
add $8, %%eax \n\
add $4, %%edx \n\
cmp %%edi, %%edx /* if (dst!=endline) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
/* Next Scanline */ \n\
mov %4, %%ebx \n\
add %%ebx, %%edi /* endline += w; */ \n\
shl $2, %%ebx \n\
sub %%ebx, %%eax /* src -= w*2; */ \n\
cmp %%esi, %%edx /* if (dst!=end) */ \n\
jne 0b /* goto loop_begin; */ \n\
jmp 2f \n\
\n\
/* MMX Optimized Loop */ \n\
.p2align 3,,7 \n\
1: \n\
/* Read Pixel and add error */ \n\
/* c = *src + er - (*src>>8) */ \n\
movq (%%eax), %%mm0 \n\
movq %%mm0, %%mm1 \n\
psrlw $8, %%mm1 \n\
psubsw %%mm1, %%mm0 \n\
paddsw %%mm5, %%mm0 \n\
\n\
/* Clamp to max */ \n\
/* c = min(c,val_max) */ \n\
movq %%mm3, %%mm2 \n\
pcmpgtw %%mm0, %%mm2 /* Compare col to max. Sets mm2 if clipping req */\n\
pand %%mm2, %%mm0 /* mm0 = masked col vals */ \n\
pandn %%mm7, %%mm2 /* mm2 = (~mm2) & ~0 */ \n\
movq %%mm3, %%mm1 /* mm1 = max vals */ \n\
pand %%mm2, %%mm1 /* mm1 = masked max vals */ \n\
por %%mm1, %%mm0 /* Combine max and cols */ \n\
\n\
/* Find error */ \n\
/* er = c & dither_mask; */ \n\
movq %%mm0, %%mm5 /* er = c */ \n\
pand %%mm4, %%mm5 /* er &= dither_mask */ \n\
\n\
/* Reduce to 32 bits */ \n\
psrlw %%mm6, %%mm0 \n\
packuswb %%mm0, %%mm0 \n\
movd %%mm0, %%ebx \n\
\n\
/* Gamma Correct Blue */ \n\
mov %%ebx, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_blue(, %%ecx, 4), %%bl \n\
\n\
/* Gamma Correct Green */ \n\
mov %%ebx, %%ecx \n\
shr $8, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_green(, %%ecx, 4), %%bh \n\
\n\
/* Gamma Correct Red */ \n\
mov %%ebx, %%ecx \n\
shr $16, %%ecx \n\
and $0xff, %%ecx \n\
mov _gss_red_shifted(, %%ecx, 4), %%ecx \n\
and $0xFF00FFFF, %%ebx \n\
or %%ecx, %%ebx \n\
\n\
/* Write */ \n\
mov %%ebx, (%%edx) \n\
\n\
/* Next Pixel */ \n\
add $8, %%eax \n\
add $4, %%edx \n\
cmp %%edi, %%edx /* if (dst!=endline) */ \n\
jne 1b /* goto mmx_loop_begin; */ \n\
\n\
/* Next Scanline */ \n\
mov %4, %%ebx \n\
add %%ebx, %%edi /* endline += w; */ \n\
shl $2, %%ebx \n\
sub %%ebx, %%eax /* src -= w*2; */ \n\
cmp %%esi, %%edx /* if (dst!=end) */ \n\
jne 1b /* goto mmx_loop_begin; */ \n\
\n\
2: \n\
\n\
emms /* mmx */"
:
:"a"(src), "d"(dst), "D"(endline), "S"(end), "m"(w), "m"(dither_mask), "g"(val_max), "m"(aaShift), "c"(sse_mmxplus)
:"%ebx");
#else
__asm
{
emms /* mmx */
@@ -7543,9 +7820,9 @@ static void hwcCopyBuffer8888FlippedDithered(hwcBoardInfo *bInfo, FxU16 *source,
emms /* mmx */
}
#endif
}
else
#endif
{
while (dst<end)
{
@@ -7791,11 +8068,61 @@ static void hwcCopyBuffer565Shifted(hwcBoardInfo *bInfo, FxU16 *src, int w, int
bshift = 3 + aaShift;
gshift = 3 - aaShift;
rshift = 8 - aaShift;
#ifndef __DJGPP__ /* [dBorca] fixme :D */
if (bInfo->CPUInfo.os_support & _CPU_FEATURE_MMX)
{
/* MMX Optimized Loop */
#ifdef __DJGPP__
__asm("\n\
emms /* mmx */ \n\
\n\
/* mm6 = aaShift */ \n\
movd %6, %%mm6 \n\
\n\
/* mm5 = mask */ \n\
pushl $0x0000F800; /* a r */ \n\
pushl $0xFC00F800; /* g b */ \n\
movq (%%esp), %%mm5 \n\
add $8, %%esp \n\
\n\
.p2align 3,,7 \n\
0: \n\
/* Read Pixel, Reduce to 32 bits */ \n\
movq (%%eax), %%mm0 \n\
psrlw %%mm6, %%mm0 /* AA Shift to 32 bit */\n\
packuswb %%mm0, %%mm0 \n\
movd %%mm0, %%ebx \n\
\n\
/* Convert to 565 */ \n\
mov %%ebx, %%ecx \n\
and 0x0000FCF8, %%ebx \n\
and 0x00F80000, %%ecx \n\
shr $2, %%bh \n\
shr $8, %%ecx \n\
shr $3, %%ebx \n\
or %%ecx, %%ebx \n\
\n\
/* Write */ \n\
mov %%bx, (%%edx) \n\
\n\
/* Next Pixel */ \n\
add $8, %%eax \n\
add $2, %%edx \n\
cmp %%edi, %%edx /* if (dst!=endline) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
/* Next Scanline */ \n\
add %4, %%edi /* endline += stride_dest; */\n\
add %5, %%edx /* dest += stride_diff; */\n\
cmp %%esi, %%edx /* if (dst!=end) */ \n\
jne 0b /* goto loop_begin; */ \n\
\n\
emms"
:
: "a"(src), "d"(dst), "D"(endline), "S"(end), "m"(stride_dest), "m"(stride_diff), "m"(aaShift)
: "%ebx", "%ecx");
#else
__asm
{
emms /* mmx */
@@ -7848,9 +8175,11 @@ loop_begin:
emms /* mmx */
}
}
else
#endif
#endif
}
else
while (dst<end)
{
while (dst<endline)