unsigned short ModeIdIndex, index = 0;
unsigned short RefreshRateTableIndex = 0;
- unsigned short VRE, VBE, VRS, VBS, VDE, VT;
- unsigned short HRE, HBE, HRS, HBS, HDE, HT;
+ unsigned short VRE, VBE, VRS, VDE;
+ unsigned short HRE, HBE, HRS, HDE;
unsigned char sr_data, cr_data, cr_data2;
- unsigned long cr_data3;
- int A, B, C, D, E, F, temp, j;
+ int B, C, D, E, F, temp, j;
InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr);
if (!XGI_SearchModeID(ModeNo, &ModeIdIndex, XGI_Pr))
return 0;
sr_data = XGI_CRT1Table[index].CR[5];
- cr_data = XGI_CRT1Table[index].CR[0];
-
- /* Horizontal total */
- HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8);
- A = HT + 5;
-
HDE = (XGI330_RefIndex[RefreshRateTableIndex].XRes >> 3) - 1;
E = HDE + 1;
HRS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0xC0) << 2);
F = HRS - E - 3;
- cr_data = XGI_CRT1Table[index].CR[1];
-
- /* Horizontal blank start */
- HBS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x30) << 4);
-
sr_data = XGI_CRT1Table[index].CR[6];
cr_data = XGI_CRT1Table[index].CR[2];
sr_data = XGI_CRT1Table[index].CR[14];
- cr_data = XGI_CRT1Table[index].CR[8];
-
cr_data2 = XGI_CRT1Table[index].CR[9];
- /* Vertical total */
- VT = (cr_data & 0xFF) | ((unsigned short) (cr_data2 & 0x01) << 8)
- | ((unsigned short) (cr_data2 & 0x20) << 4)
- | ((unsigned short) (sr_data & 0x01) << 10);
- A = VT + 2;
-
VDE = XGI330_RefIndex[RefreshRateTableIndex].YRes - 1;
E = VDE + 1;
| ((unsigned short) (sr_data & 0x08) << 7);
F = VRS + 1 - E;
- cr_data = XGI_CRT1Table[index].CR[12];
-
- cr_data3 = (XGI_CRT1Table[index].CR[14] & 0x80) << 5;
-
- /* Vertical blank start */
- VBS = (cr_data & 0xff) | ((unsigned short) (cr_data2 & 0x08) << 5)
- | ((unsigned short) (cr_data3 & 0x20) << 4)
- | ((unsigned short) (sr_data & 0x04) << 8);
-
cr_data = XGI_CRT1Table[index].CR[13];
/* Vertical blank end */