mirror of
https://github.com/X11Libre/xf86-video-xgi.git
synced 2026-03-24 01:24:35 +00:00
Unify DAC data tables
This commit is contained in:
@@ -910,6 +910,11 @@ XGI_New_SetCRT1ModeRegs(XGI_Private *XGI_Pr, PXGI_HW_DEVICE_INFO HwInfo,
|
||||
/* LOAD DAC */
|
||||
/*********************************************/
|
||||
|
||||
extern const uint8_t XGI_MDA_DAC[];
|
||||
extern const uint8_t XGI_CGA_DAC[];
|
||||
extern const uint8_t XGI_EGA_DAC[];
|
||||
extern const uint8_t XGI_VGA_DAC[];
|
||||
|
||||
void
|
||||
XGI_New_LoadDAC(XGI_Private *XGI_Pr, PXGI_HW_DEVICE_INFO HwInfo,
|
||||
USHORT ModeNo, USHORT ModeIdIndex)
|
||||
@@ -919,7 +924,7 @@ XGI_New_LoadDAC(XGI_Private *XGI_Pr, PXGI_HW_DEVICE_INFO HwInfo,
|
||||
USHORT si,di,bx,dl,al,ah,dh;
|
||||
USHORT shiftflag;
|
||||
XGIIOADDRESS DACAddr, DACData;
|
||||
const USHORT *table = NULL;
|
||||
const uint8_t *table = NULL;
|
||||
|
||||
if(ModeNo <= 0x13) {
|
||||
data = XGI_Pr->XGI_SModeIDTable[ModeIdIndex].St_ModeFlag;
|
||||
|
||||
50
src/init.h
50
src/init.h
@@ -112,56 +112,6 @@ static const USHORT ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66};
|
||||
static const USHORT ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b};
|
||||
static const USHORT ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
|
||||
|
||||
static const USHORT XGI_MDA_DAC[] =
|
||||
{
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
|
||||
0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
|
||||
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
|
||||
0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
|
||||
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGI_CGA_DAC[] =
|
||||
{
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGI_EGA_DAC[] =
|
||||
{
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
|
||||
0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
|
||||
0x08,0x18,0x0C,0x1C,0x09,0x19,0x0D,0x1D,
|
||||
0x28,0x38,0x2C,0x3C,0x29,0x39,0x2D,0x3D,
|
||||
0x02,0x12,0x06,0x16,0x03,0x13,0x07,0x17,
|
||||
0x22,0x32,0x26,0x36,0x23,0x33,0x27,0x37,
|
||||
0x0A,0x1A,0x0E,0x1E,0x0B,0x1B,0x0F,0x1F,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGI_VGA_DAC[] =
|
||||
{
|
||||
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
|
||||
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
|
||||
0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18,
|
||||
0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F,
|
||||
0x00,0x10,0x1F,0x2F,0x3F,0x1F,0x27,0x2F,
|
||||
0x37,0x3F,0x2D,0x31,0x36,0x3A,0x3F,0x00,
|
||||
0x07,0x0E,0x15,0x1C,0x0E,0x11,0x15,0x18,
|
||||
0x1C,0x14,0x16,0x18,0x1A,0x1C,0x00,0x04,
|
||||
0x08,0x0C,0x10,0x08,0x0A,0x0C,0x0E,0x10,
|
||||
0x0B,0x0C,0x0D,0x0F,0x10
|
||||
};
|
||||
|
||||
|
||||
void XGI_New_DisplayOn(XGI_Private *XGI_Pr);
|
||||
void XGI_New_DisplayOff(XGI_Private *XGI_Pr);
|
||||
|
||||
@@ -244,7 +244,7 @@ static const XGI301C_Tap4TimingStruct *XGI_GetTap4Ptr(USHORT tempcx,
|
||||
PVB_DEVICE_INFO pVBInfo);
|
||||
|
||||
|
||||
static const USHORT XGINew_MDA_DAC[] = {
|
||||
const uint8_t XGI_MDA_DAC[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
|
||||
0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15,
|
||||
@@ -255,7 +255,7 @@ static const USHORT XGINew_MDA_DAC[] = {
|
||||
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGINew_CGA_DAC[] = {
|
||||
const uint8_t XGI_CGA_DAC[] = {
|
||||
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15,
|
||||
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15,
|
||||
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F,
|
||||
@@ -266,7 +266,7 @@ static const USHORT XGINew_CGA_DAC[] = {
|
||||
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGINew_EGA_DAC[] = {
|
||||
const uint8_t XGI_EGA_DAC[] = {
|
||||
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x05, 0x15,
|
||||
0x20, 0x30, 0x24, 0x34, 0x21, 0x31, 0x25, 0x35,
|
||||
0x08, 0x18, 0x0C, 0x1C, 0x09, 0x19, 0x0D, 0x1D,
|
||||
@@ -277,7 +277,7 @@ static const USHORT XGINew_EGA_DAC[] = {
|
||||
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F
|
||||
};
|
||||
|
||||
static const USHORT XGINew_VGA_DAC[] = {
|
||||
const uint8_t XGI_VGA_DAC[] = {
|
||||
0x00, 0x10, 0x04, 0x14, 0x01, 0x11, 0x09, 0x15,
|
||||
0x2A, 0x3A, 0x2E, 0x3E, 0x2B, 0x3B, 0x2F, 0x3F,
|
||||
0x00, 0x05, 0x08, 0x0B, 0x0E, 0x11, 0x14, 0x18,
|
||||
@@ -1723,7 +1723,7 @@ void
|
||||
XGI_LoadDAC(USHORT ModeNo, USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo)
|
||||
{
|
||||
USHORT data, data2, time, i, j, k, m, n, o, si, di, bx, dl, al, ah, dh;
|
||||
const USHORT *table = NULL;
|
||||
const uint8_t *table = NULL;
|
||||
|
||||
if (ModeNo <= 0x13)
|
||||
data = pVBInfo->SModeIDTable[ModeIdIndex].St_ModeFlag;
|
||||
@@ -1734,14 +1734,14 @@ XGI_LoadDAC(USHORT ModeNo, USHORT ModeIdIndex, PVB_DEVICE_INFO pVBInfo)
|
||||
time = 64;
|
||||
|
||||
if (data == 0x00)
|
||||
table = XGINew_MDA_DAC;
|
||||
table = XGI_MDA_DAC;
|
||||
else if (data == 0x08)
|
||||
table = XGINew_CGA_DAC;
|
||||
table = XGI_CGA_DAC;
|
||||
else if (data == 0x10)
|
||||
table = XGINew_EGA_DAC;
|
||||
table = XGI_EGA_DAC;
|
||||
else if (data == 0x18) {
|
||||
time = 256;
|
||||
table = XGINew_VGA_DAC;
|
||||
table = XGI_VGA_DAC;
|
||||
}
|
||||
|
||||
if (time == 256)
|
||||
|
||||
Reference in New Issue
Block a user