aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/vstruct.h
blob: 705c85360526138c1fb236a41cf89c7f8f7be446 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
/* $XFree86$ */
/* $XdotOrg$ */
/*
 * General structure definitions for universal mode switching modules
 *
 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
 *
 * If distributed as part of the Linux kernel, the following license terms
 * apply:
 *
 * * This program is free software; you can redistribute it and/or modify
 * * it under the terms of the GNU General Public License as published by
 * * the Free Software Foundation; either version 2 of the named License,
 * * or any later version.
 * *
 * * This program is distributed in the hope that it will be useful,
 * * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * * GNU General Public License for more details.
 * *
 * * You should have received a copy of the GNU General Public License
 * * along with this program; if not, write to the Free Software
 * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
 *
 * Otherwise, the following license terms apply:
 *
 * * Redistribution and use in source and binary forms, with or without
 * * modification, are permitted provided that the following conditions
 * * are met:
 * * 1) Redistributions of source code must retain the above copyright
 * *    notice, this list of conditions and the following disclaimer.
 * * 2) Redistributions in binary form must reproduce the above copyright
 * *    notice, this list of conditions and the following disclaimer in the
 * *    documentation and/or other materials provided with the distribution.
 * * 3) The name of the author may not be used to endorse or promote products
 * *    derived from this software without specific prior written permission.
 * *
 * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Author: 	Thomas Winischhofer <thomas@winischhofer.net>
 *
 */

#ifndef _VSTRUCT_H_
#define _VSTRUCT_H_

struct SiS_PanelDelayTbl {
 	unsigned char timer[2];
};

struct SiS_LCDData {
	unsigned short RVBHCMAX;
	unsigned short RVBHCFACT;
	unsigned short VGAHT;
	unsigned short VGAVT;
	unsigned short LCDHT;
	unsigned short LCDVT;
};

struct SiS_TVData {
	unsigned short RVBHCMAX;
	unsigned short RVBHCFACT;
	unsigned short VGAHT;
	unsigned short VGAVT;
	unsigned short TVHDE;
	unsigned short TVVDE;
	unsigned short RVBHRS;
	unsigned char  FlickerMode;
	unsigned short HALFRVBHRS;
	unsigned short RVBHRS2;
	unsigned char  RY1COE;
	unsigned char  RY2COE;
	unsigned char  RY3COE;
	unsigned char  RY4COE;
};

struct SiS_LVDSData {
	unsigned short VGAHT;
	unsigned short VGAVT;
	unsigned short LCDHT;
	unsigned short LCDVT;
};

struct SiS_LVDSDes {
	unsigned short LCDHDES;
	unsigned short LCDVDES;
};

struct SiS_LVDSCRT1Data {
	unsigned char  CR[15];
};

struct SiS_CHTVRegData {
	unsigned char  Reg[16];
};

struct SiS_St {
	unsigned char  St_ModeID;
	unsigned short St_ModeFlag;
	unsigned char  St_StTableIndex;
	unsigned char  St_CRT2CRTC;
	unsigned char  St_ResInfo;
	unsigned char  VB_StTVFlickerIndex;
	unsigned char  VB_StTVEdgeIndex;
	unsigned char  VB_StTVYFilterIndex;
	unsigned char  St_PDC;
};

struct SiS_VBMode {
	unsigned char  ModeID;
	unsigned char  VB_TVDelayIndex;
	unsigned char  VB_TVFlickerIndex;
	unsigned char  VB_TVPhaseIndex;
	unsigned char  VB_TVYFilterIndex;
	unsigned char  VB_LCDDelayIndex;
	unsigned char  _VB_LCDHIndex;
	unsigned char  _VB_LCDVIndex;
};

struct SiS_StandTable_S {
	unsigned char  CRT_COLS;
	unsigned char  ROWS;
	unsigned char  CHAR_HEIGHT;
	unsigned short CRT_LEN;
	unsigned char  SR[4];
	unsigned char  MISC;
	unsigned char  CRTC[0x19];
	unsigned char  ATTR[0x14];
	unsigned char  GRC[9];
};

struct SiS_Ext {
	unsigned char  Ext_ModeID;
	unsigned short Ext_ModeFlag;
	unsigned short Ext_VESAID;
	unsigned char  Ext_RESINFO;
	unsigned char  VB_ExtTVFlickerIndex;
	unsigned char  VB_ExtTVEdgeIndex;
	unsigned char  VB_ExtTVYFilterIndex;
	unsigned char  VB_ExtTVYFilterIndexROM661;
	unsigned char  REFindex;
	char           ROMMODEIDX661;
};

struct SiS_Ext2 {
	unsigned short Ext_InfoFlag;
	unsigned char  Ext_CRT1CRTC;
	unsigned char  Ext_CRTVCLK;
	unsigned char  Ext_CRT2CRTC;
	unsigned char  Ext_CRT2CRTC_NS;
	unsigned char  ModeID;
	unsigned short XRes;
	unsigned short YRes;
	unsigned char  Ext_PDC;
	unsigned char  Ext_FakeCRT2CRTC;
	unsigned char  Ext_FakeCRT2Clk;
	unsigned char  Ext_CRT1CRTC_NORM;
	unsigned char  Ext_CRTVCLK_NORM;
	unsigned char  Ext_CRT1CRTC_WIDE;
	unsigned char  Ext_CRTVCLK_WIDE;
};

struct SiS_Part2PortTbl {
 	unsigned char  CR[12];
};

struct SiS_CRT1Table {
	unsigned char  CR[17];
};

struct SiS_MCLKData {
	unsigned char  SR28,SR29,SR2A;
	unsigned short CLOCK;
};

struct SiS_VCLKData {
	unsigned char  SR2B,SR2C;
	unsigned short CLOCK;
};

struct SiS_VBVCLKData {
	unsigned char  Part4_A,Part4_B;
	unsigned short CLOCK;
};

struct SiS_StResInfo_S {
	unsigned short HTotal;
	unsigned short VTotal;
};

struct SiS_ModeResInfo_S {
	unsigned short HTotal;
	unsigned short VTotal;
	unsigned char  XChar;
	unsigned char  YChar;
};

/* Defines for SiS_CustomT */
/* Never change these for sisfb compatibility */
#define CUT_NONE		 0
#define CUT_FORCENONE		 1
#define CUT_BARCO1366		 2
#define CUT_BARCO1024		 3
#define CUT_COMPAQ1280		 4
#define CUT_COMPAQ12802		 5
#define CUT_PANEL848		 6
#define CUT_CLEVO1024		 7
#define CUT_CLEVO10242		 8
#define CUT_CLEVO1400		 9
#define CUT_CLEVO14002		10
#define CUT_UNIWILL1024		11
#define CUT_ASUSL3000D		12
#define CUT_UNIWILL10242	13
#define CUT_ACER1280		14
#define CUT_COMPAL1400_1	15
#define CUT_COMPAL1400_2	16
#define CUT_ASUSA2H_1		17
#define CUT_ASUSA2H_2		18
#define CUT_UNKNOWNLCD		19
#define CUT_AOP8060		20
#define CUT_PANEL856		21

struct SiS_Private
{
	unsigned char			ChipType;
	unsigned char			ChipRevision;
#ifdef SIS_XORG_XF86
	PCITAG				PciTag;
#endif
#ifdef SIS_LINUX_KERNEL
	void				*ivideo;
#endif
	unsigned char 			*VirtualRomBase;
	bool				UseROM;
#ifdef SIS_LINUX_KERNEL
	unsigned char SISIOMEMTYPE	*VideoMemoryAddress;
	unsigned int			VideoMemorySize;
#endif
	SISIOADDRESS			IOAddress;
	SISIOADDRESS			IOAddress2;  /* For dual chip XGI volari */

#ifdef SIS_LINUX_KERNEL
	SISIOADDRESS			RelIO;
#endif
	SISIOADDRESS			SiS_P3c4;
	SISIOADDRESS			SiS_P3d4;
	SISIOADDRESS			SiS_P3c0;
	SISIOADDRESS			SiS_P3ce;
	SISIOADDRESS			SiS_P3c2;
	SISIOADDRESS			SiS_P3ca;
	SISIOADDRESS			SiS_P3c6;
	SISIOADDRESS			SiS_P3c7;
	SISIOADDRESS			SiS_P3c8;
	SISIOADDRESS			SiS_P3c9;
	SISIOADDRESS			SiS_P3cb;
	SISIOADDRESS			SiS_P3cc;
	SISIOADDRESS			SiS_P3cd;
	SISIOADDRESS			SiS_P3da;
	SISIOADDRESS			SiS_Part1Port;
	SISIOADDRESS			SiS_Part2Port;
	SISIOADDRESS			SiS_Part3Port;
	SISIOADDRESS			SiS_Part4Port;
	SISIOADDRESS			SiS_Part5Port;
	SISIOADDRESS			SiS_VidCapt;
	SISIOADDRESS			SiS_VidPlay;
	unsigned short			SiS_IF_DEF_LVDS;
	unsigned short			SiS_IF_DEF_CH70xx;
	unsigned short			SiS_IF_DEF_CONEX;
	unsigned short			SiS_IF_DEF_TRUMPION;
	unsigned short			SiS_IF_DEF_DSTN;
	unsigned short			SiS_IF_DEF_FSTN;
	unsigned short			SiS_SysFlags;
	unsigned char			SiS_VGAINFO;
#ifdef SIS_XORG_XF86
	unsigned short			SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
#endif
	bool				SiS_UseROM;
	bool				SiS_ROMNew;
	bool				SiS_XGIROM;
	bool				SiS_NeedRomModeData;
	bool				PanelSelfDetected;
	bool				DDCPortMixup;
	int				SiS_CHOverScan;
	bool				SiS_CHSOverScan;
	bool				SiS_ChSW;
	bool				SiS_UseLCDA;
	int				SiS_UseOEM;
	unsigned int			SiS_CustomT;
	int				SiS_UseWide, SiS_UseWideCRT2;
	int				SiS_TVBlue;
	unsigned short			SiS_Backup70xx;
	bool				HaveEMI;
	bool				HaveEMILCD;
	bool				OverruleEMI;
	unsigned char			EMI_30,EMI_31,EMI_32,EMI_33;
	unsigned short			SiS_EMIOffset;
	unsigned short			SiS_PWDOffset;
	short				PDC, PDCA;
	unsigned char			SiS_MyCR63;
	unsigned short			SiS_CRT1Mode;
	unsigned short			SiS_flag_clearbuffer;
	int				SiS_RAMType;
	unsigned char			SiS_ChannelAB;
	unsigned char			SiS_DataBusWidth;
	unsigned short			SiS_ModeType;
	unsigned short			SiS_VBInfo;
	unsigned short			SiS_TVMode;
	unsigned short			SiS_LCDResInfo;
	unsigned short			SiS_LCDTypeInfo;
	unsigned short			SiS_LCDInfo;
	unsigned short			SiS_LCDInfo661;
	unsigned short			SiS_VBType;
	unsigned short			SiS_VBExtInfo;
	unsigned short			SiS_YPbPr;
	unsigned short			SiS_SelectCRT2Rate;
	unsigned short			SiS_SetFlag;
	unsigned short			SiS_RVBHCFACT;
	unsigned short			SiS_RVBHCMAX;
	unsigned short			SiS_RVBHRS;
	unsigned short			SiS_RVBHRS2;
	unsigned short			SiS_VGAVT;
	unsigned short			SiS_VGAHT;
	unsigned short			SiS_VT;
	unsigned short			SiS_HT;
	unsigned short			SiS_VGAVDE;
	unsigned short			SiS_VGAHDE;
	unsigned short			SiS_VDE;
	unsigned short			SiS_HDE;
	unsigned short			SiS_NewFlickerMode;
	unsigned short			SiS_RY1COE;
	unsigned short			SiS_RY2COE;
	unsigned short			SiS_RY3COE;
	unsigned short			SiS_RY4COE;
	unsigned short			SiS_LCDHDES;
	unsigned short			SiS_LCDVDES;
	unsigned short			SiS_DDC_Port;
	unsigned short			SiS_DDC_Index;
	unsigned short			SiS_DDC_Data;
	unsigned short			SiS_DDC_NData;
	unsigned short			SiS_DDC_Clk;
	unsigned short			SiS_DDC_NClk;
	unsigned short			SiS_DDC_DeviceAddr;
	unsigned short			SiS_DDC_ReadAddr;
	unsigned short			SiS_DDC_SecAddr;
	unsigned short			SiS_ChrontelInit;
	bool				SiS_SensibleSR11;
	unsigned short			SiS661LCD2TableSize;

	unsigned short			SiS_PanelMinLVDS;
	unsigned short			SiS_PanelMin301;

	const struct SiS_St		*SiS_SModeIDTable;
	const struct SiS_StandTable_S	*SiS_StandTable;
	const struct SiS_Ext		*SiS_EModeIDTable;
	const struct SiS_Ext2		*SiS_RefIndex;
	const struct SiS_VBMode		*SiS_VBModeIDTable;
	const struct SiS_CRT1Table	*SiS_CRT1Table;
	const struct SiS_MCLKData	*SiS_MCLKData_0;
	const struct SiS_MCLKData	*SiS_MCLKData_1;
	struct SiS_VCLKData		*SiS_VCLKData;
	struct SiS_VBVCLKData		*SiS_VBVCLKData;
	const struct SiS_StResInfo_S	*SiS_StResInfo;
	const struct SiS_ModeResInfo_S	*SiS_ModeResInfo;

	const unsigned char		*pSiS_OutputSelect;
	const unsigned char		*pSiS_SoftSetting;

	const unsigned char		*SiS_SR15;

	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTbl;
	const struct SiS_PanelDelayTbl	*SiS_PanelDelayTblLVDS;

	/* SiS bridge */

	const struct SiS_LCDData	*SiS_ExtLCD1024x768Data;
	const struct SiS_LCDData	*SiS_St2LCD1024x768Data;
	const struct SiS_LCDData	*SiS_LCD1280x720Data;
	const struct SiS_LCDData	*SiS_StLCD1280x768_2Data;
	const struct SiS_LCDData	*SiS_ExtLCD1280x768_2Data;
	const struct SiS_LCDData	*SiS_LCD1280x800Data;
	const struct SiS_LCDData	*SiS_LCD1280x800_2Data;
	const struct SiS_LCDData	*SiS_LCD1280x854Data;
	const struct SiS_LCDData	*SiS_LCD1280x960Data;
	const struct SiS_LCDData	*SiS_ExtLCD1280x1024Data;
	const struct SiS_LCDData	*SiS_St2LCD1280x1024Data;
	const struct SiS_LCDData	*SiS_StLCD1400x1050Data;
	const struct SiS_LCDData	*SiS_ExtLCD1400x1050Data;
	const struct SiS_LCDData	*SiS_StLCD1600x1200Data;
	const struct SiS_LCDData	*SiS_ExtLCD1600x1200Data;
	const struct SiS_LCDData	*SiS_LCD1680x1050Data;
	const struct SiS_LCDData	*SiS_NoScaleData;
	const struct SiS_TVData		*SiS_StPALData;
	const struct SiS_TVData		*SiS_ExtPALData;
	const struct SiS_TVData		*SiS_StNTSCData;
	const struct SiS_TVData		*SiS_ExtNTSCData;
	const struct SiS_TVData		*SiS_St1HiTVData;
	const struct SiS_TVData		*SiS_St2HiTVData;
	const struct SiS_TVData		*SiS_ExtHiTVData;
	const struct SiS_TVData		*SiS_St525iData;
	const struct SiS_TVData		*SiS_St525pData;
	const struct SiS_TVData		*SiS_St750pData;
	const struct SiS_TVData		*SiS_Ext525iData;
	const struct SiS_TVData		*SiS_Ext525pData;
	const struct SiS_TVData		*SiS_Ext750pData;
	const unsigned char		*SiS_NTSCTiming;
	const unsigned char		*SiS_PALTiming;
	const unsigned char		*SiS_HiTVExtTiming;
	const unsigned char		*SiS_HiTVSt1Timing;
	const unsigned char		*SiS_HiTVSt2Timing;
	const unsigned char		*SiS_HiTVGroup3Data;
	const unsigned char		*SiS_HiTVGroup3Simu;
#if 0
	const unsigned char		*SiS_HiTVTextTiming;
	const unsigned char		*SiS_HiTVGroup3Text;
#endif

	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_1;
	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_2;
	const struct SiS_Part2PortTbl	*SiS_CRT2Part2_1024x768_3;

	/* LVDS, Chrontel */

	const struct SiS_LVDSData	*SiS_LVDS320x240Data_1;
	const struct SiS_LVDSData	*SiS_LVDS320x240Data_2;
	const struct SiS_LVDSData	*SiS_LVDS640x480Data_1;
	const struct SiS_LVDSData	*SiS_LVDS800x600Data_1;
	const struct SiS_LVDSData	*SiS_LVDS1024x600Data_1;
	const struct SiS_LVDSData	*SiS_LVDS1024x768Data_1;
	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_1;
	const struct SiS_LVDSData	*SiS_LVDSBARCO1366Data_2;
	const struct SiS_LVDSData	*SiS_LVDSBARCO1024Data_1;
	const struct SiS_LVDSData	*SiS_LVDS848x480Data_1;
	const struct SiS_LVDSData	*SiS_LVDS848x480Data_2;
	const struct SiS_LVDSData	*SiS_CHTVUNTSCData;
	const struct SiS_LVDSData	*SiS_CHTVONTSCData;
	const struct SiS_LVDSData	*SiS_CHTVUPALData;
	const struct SiS_LVDSData	*SiS_CHTVOPALData;
	const struct SiS_LVDSData	*SiS_CHTVUPALMData;
	const struct SiS_LVDSData	*SiS_CHTVOPALMData;
	const struct SiS_LVDSData	*SiS_CHTVUPALNData;
	const struct SiS_LVDSData	*SiS_CHTVOPALNData;
	const struct SiS_LVDSData	*SiS_CHTVSOPALData;

	const struct SiS_LVDSDes	*SiS_PanelType04_1a;
	const struct SiS_LVDSDes	*SiS_PanelType04_2a;
	const struct SiS_LVDSDes	*SiS_PanelType04_1b;
	const struct SiS_LVDSDes	*SiS_PanelType04_2b;

	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_1;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_2_H;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1320x240_3_H;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1;
	const struct SiS_LVDSCRT1Data	*SiS_LVDSCRT1640x480_1_H;
	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UNTSC;
	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1ONTSC;
	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1UPAL;
	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1OPAL;
	const struct SiS_LVDSCRT1Data	*SiS_CHTVCRT1SOPAL;

	const struct SiS_CHTVRegData	*SiS_CHTVReg_UNTSC;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_ONTSC;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPAL;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPAL;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALM;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALM;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_UPALN;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_OPALN;
	const struct SiS_CHTVRegData	*SiS_CHTVReg_SOPAL;

	const unsigned char		*SiS_CHTVVCLKUNTSC;
	const unsigned char		*SiS_CHTVVCLKONTSC;
	const unsigned char		*SiS_CHTVVCLKUPAL;
	const unsigned char		*SiS_CHTVVCLKOPAL;
	const unsigned char		*SiS_CHTVVCLKUPALM;
	const unsigned char		*SiS_CHTVVCLKOPALM;
	const unsigned char		*SiS_CHTVVCLKUPALN;
	const unsigned char		*SiS_CHTVVCLKOPALN;
	const unsigned char		*SiS_CHTVVCLKSOPAL;

	unsigned short			PanelXRes, PanelHT;
	unsigned short			PanelYRes, PanelVT;
	unsigned short			PanelHRS,  PanelHRE;
	unsigned short			PanelVRS,  PanelVRE;
	unsigned short			PanelVCLKIdx300;
	unsigned short			PanelVCLKIdx315;
	bool				Alternate1600x1200;

	bool				UseCustomMode;
	bool				CRT1UsesCustomMode;
	unsigned short			CHDisplay;
	unsigned short			CHSyncStart;
	unsigned short			CHSyncEnd;
	unsigned short			CHTotal;
	unsigned short			CHBlankStart;
	unsigned short			CHBlankEnd;
	unsigned short			CVDisplay;
	unsigned short			CVSyncStart;
	unsigned short			CVSyncEnd;
	unsigned short			CVTotal;
	unsigned short			CVBlankStart;
	unsigned short			CVBlankEnd;
	unsigned int			CDClock;
	unsigned int			CFlags;
	unsigned char			CCRT1CRTC[17];
	unsigned char			CSR2B;
	unsigned char			CSR2C;
	unsigned short			CSRClock;
	unsigned short			CSRClock_CRT1;
	unsigned short			CModeFlag;
	unsigned short			CModeFlag_CRT1;
	unsigned short			CInfoFlag;

	int				LVDSHL;

	bool				Backup;
	unsigned char			Backup_Mode;
	unsigned char			Backup_14;
	unsigned char			Backup_15;
	unsigned char			Backup_16;
	unsigned char			Backup_17;
	unsigned char			Backup_18;
	unsigned char			Backup_19;
	unsigned char			Backup_1a;
	unsigned char			Backup_1b;
	unsigned char			Backup_1c;
	unsigned char			Backup_1d;

	unsigned char			Init_P4_0E;

	int				UsePanelScaler;
	int				CenterScreen;

	unsigned short			CP_Vendor, CP_Product;
	bool				CP_HaveCustomData;
	int				CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
	int				CP_MaxX, CP_MaxY, CP_MaxClock;
	unsigned char			CP_PrefSR2B, CP_PrefSR2C;
	unsigned short			CP_PrefClock;
	bool				CP_Supports64048075;
	int				CP_HDisplay[7], CP_VDisplay[7];	/* For Custom LCD panel dimensions */
	int				CP_HTotal[7], CP_VTotal[7];
	int				CP_HSyncStart[7], CP_VSyncStart[7];
	int				CP_HSyncEnd[7], CP_VSyncEnd[7];
	int				CP_HBlankStart[7], CP_VBlankStart[7];
	int				CP_HBlankEnd[7], CP_VBlankEnd[7];
	int				CP_Clock[7];
	bool				CP_DataValid[7];
	bool				CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
};

#endif

961'>1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
ÐÏࡱá