Go to the documentation of this file.
56 #define IS_SIS330 (SiS_Pr->ChipType == SIS_330)
57 #define IS_SIS550 (SiS_Pr->ChipType == SIS_550)
58 #define IS_SIS650 (SiS_Pr->ChipType == SIS_650)
59 #define IS_SIS740 (SiS_Pr->ChipType == SIS_740)
60 #define IS_SIS651 (SiS_Pr->SiS_SysFlags & (SF_Is651 | SF_Is652))
61 #define IS_SISM650 (SiS_Pr->SiS_SysFlags & (SF_IsM650 | SF_IsM652 | SF_IsM653))
62 #define IS_SIS65x (IS_SIS651 || IS_SISM650)
63 #define IS_SIS661 (SiS_Pr->ChipType == SIS_661)
64 #define IS_SIS741 (SiS_Pr->ChipType == SIS_741)
65 #define IS_SIS660 (SiS_Pr->ChipType == SIS_660)
66 #define IS_SIS760 (SiS_Pr->ChipType == SIS_760)
67 #define IS_SIS761 (SiS_Pr->ChipType == SIS_761)
68 #define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760 || IS_SIS761)
69 #define IS_SIS650740 ((SiS_Pr->ChipType >= SIS_650) && (SiS_Pr->ChipType < SIS_330))
70 #define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)
71 #define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)
72 #define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660)
74 #define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))
77 #define VB_SIS301 0x0001
78 #define VB_SIS301B 0x0002
79 #define VB_SIS302B 0x0004
80 #define VB_SIS301LV 0x0008
81 #define VB_SIS302LV 0x0010
82 #define VB_SIS302ELV 0x0020
83 #define VB_SIS301C 0x0040
84 #define VB_SIS307T 0x0080
85 #define VB_SIS307LV 0x0100
87 #define VB_NoLCD 0x8000
88 #define VB_SIS30xB (VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)
89 #define VB_SIS30xC (VB_SIS301C | VB_SIS307T)
90 #define VB_SISTMDS (VB_SIS301 | VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)
91 #define VB_SISLVDS (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
92 #define VB_SIS30xBLV (VB_SIS30xB | VB_SISLVDS)
93 #define VB_SIS30xCLV (VB_SIS30xC | VB_SIS302ELV | VB_SIS307LV)
94 #define VB_SISVB (VB_SIS301 | VB_SIS30xBLV)
95 #define VB_SISLCDA (VB_SIS302B | VB_SIS301C | VB_SIS307T | VB_SISLVDS)
96 #define VB_SISTMDSLCDA (VB_SIS301C | VB_SIS307T)
97 #define VB_SISPART4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)
98 #define VB_SISHIVISION (VB_SIS301 | VB_SIS301B | VB_SIS302B)
99 #define VB_SISYPBPR (VB_SIS301C | VB_SIS307T | VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
100 #define VB_SISTAP4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)
101 #define VB_SISPART4OVERFLOW (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
102 #define VB_SISPWD (VB_SIS301C | VB_SIS307T | VB_SISLVDS)
103 #define VB_SISEMI (VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
104 #define VB_SISPOWER (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
105 #define VB_SISDUALLINK (VB_SIS302LV | VB_SIS302ELV | VB_SIS307T | VB_SIS307LV)
106 #define VB_SISVGA2 VB_SISTMDS
107 #define VB_SISRAMDAC202 (VB_SIS301C | VB_SIS307T)
110 #define SetSimuScanMode 0x0001
111 #define SwitchCRT2 0x0002
112 #define SetCRT2ToAVIDEO 0x0004
113 #define SetCRT2ToSVIDEO 0x0008
114 #define SetCRT2ToSCART 0x0010
115 #define SetCRT2ToLCD 0x0020
116 #define SetCRT2ToRAMDAC 0x0040
117 #define SetCRT2ToHiVision 0x0080
118 #define SetCRT2ToCHYPbPr SetCRT2ToHiVision
119 #define SetNTSCTV 0x0000
120 #define SetPALTV 0x0100
121 #define SetInSlaveMode 0x0200
122 #define SetNotSimuMode 0x0400
123 #define SetNotSimuTVMode SetNotSimuMode
124 #define SetDispDevSwitch 0x0800
125 #define SetCRT2ToYPbPr525750 0x0800
126 #define LoadDACFlag 0x1000
127 #define DisableCRT2Display 0x2000
128 #define DriverMode 0x4000
129 #define HotKeySwitch 0x8000
130 #define SetCRT2ToLCDA 0x8000
133 #define SetCRT2ToTV (SetCRT2ToYPbPr525750|SetCRT2ToHiVision|SetCRT2ToSCART|SetCRT2ToSVIDEO|SetCRT2ToAVIDEO)
134 #define SetCRT2ToTVNoYPbPrHiVision (SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)
135 #define SetCRT2ToTVNoHiVision (SetCRT2ToYPbPr525750 | SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)
138 #define ModeText 0x00
142 #define Mode15Bpp 0x04
143 #define Mode16Bpp 0x05
144 #define Mode24Bpp 0x06
145 #define Mode32Bpp 0x07
147 #define ModeTypeMask 0x07
148 #define IsTextMode 0x07
150 #define DACInfoFlag 0x0018
151 #define MemoryInfoFlag 0x01E0
152 #define MemorySizeShift 5
155 #define Charx8Dot 0x0200
156 #define LineCompareOff 0x0400
157 #define CRT2Mode 0x0800
158 #define HalfDCLK 0x1000
159 #define NoSupportSimuTV 0x2000
160 #define NoSupportLCDScale 0x4000
161 #define DoubleScanMode 0x8000
164 #define SupportTV 0x0008
165 #define SupportTV1024 0x0800
166 #define SupportCHTV 0x0800
167 #define Support64048060Hz 0x0800
168 #define SupportHiVision 0x0010
169 #define SupportYPbPr750p 0x1000
170 #define SupportLCD 0x0020
171 #define SupportRAMDAC2 0x0040
172 #define SupportRAMDAC2_135 0x0100
173 #define SupportRAMDAC2_162 0x0200
174 #define SupportRAMDAC2_202 0x0400
175 #define InterlaceMode 0x0080
176 #define SyncPP 0x0000
177 #define HaveWideTiming 0x2000
178 #define SyncPN 0x4000
179 #define SyncNP 0x8000
180 #define SyncNN 0xc000
183 #define ProgrammingCRT2 0x0001
184 #define LowModeTests 0x0002
187 #define LCDVESATiming 0x0008
188 #define EnableLVDSDDA 0x0010
189 #define SetDispDevSwitchFlag 0x0020
190 #define CheckWinDos 0x0040
191 #define SetDOSMode 0x0080
194 #define TVSetPAL 0x0001
195 #define TVSetNTSCJ 0x0002
196 #define TVSetPALM 0x0004
197 #define TVSetPALN 0x0008
198 #define TVSetCHOverScan 0x0010
199 #define TVSetYPbPr525i 0x0020
200 #define TVSetYPbPr525p 0x0040
201 #define TVSetYPbPr750p 0x0080
202 #define TVSetHiVision 0x0100
203 #define TVSetTVSimuMode 0x0200
204 #define TVRPLLDIV2XO 0x0400
205 #define TVSetNTSC1024 0x0800
206 #define TVSet525p1024 0x1000
207 #define TVAspect43 0x2000
208 #define TVAspect169 0x4000
209 #define TVAspect43LB 0x8000
212 #define YPbPr525p 0x0001
213 #define YPbPr750p 0x0002
214 #define YPbPr525i 0x0004
215 #define YPbPrHiVision 0x0008
216 #define YPbPrModeMask (YPbPr750p | YPbPr525p | YPbPr525i | YPbPrHiVision)
219 #define SF_Is651 0x0001
220 #define SF_IsM650 0x0002
221 #define SF_Is652 0x0004
222 #define SF_IsM652 0x0008
223 #define SF_IsM653 0x0010
224 #define SF_IsM661 0x0020
225 #define SF_IsM741 0x0040
226 #define SF_IsM760 0x0080
227 #define SF_760UMA 0x4000
228 #define SF_760LFB 0x8000
244 #define TVOverScan 0x10
245 #define TVOverScanShift 4
291 #define LCDRGB18Bit 0x0001
292 #define LCDNonExpanding 0x0010
293 #define LCDSync 0x0020
294 #define LCDPass11 0x0100
295 #define LCDDualLink 0x0200
297 #define DontExpandLCD LCDNonExpanding
298 #define LCDNonExpandingShift 4
299 #define DontExpandLCDShift LCDNonExpandingShift
300 #define LCDSyncBit 0x00e0
301 #define LCDSyncShift 6
304 #define EnableDualEdge 0x01
305 #define SetToLCDA 0x02
306 #define EnableCHScart 0x04
307 #define EnableCHYPbPr 0x08
308 #define EnableSiSYPbPr 0x08
309 #define EnableYPbPr525i 0x00
310 #define EnableYPbPr525p 0x10
311 #define EnableYPbPr750p 0x20
312 #define EnableYPbPr1080i 0x30
313 #define EnablePALM 0x40
314 #define EnablePALN 0x80
315 #define EnableNTSCJ EnablePALM
327 #define EnablePALMN 0x40
330 #define LCDPass1_1 0x01
331 #define Enable302LV_DualLink 0x04
386 #define Panel300_800x600 0x01
387 #define Panel300_1024x768 0x02
388 #define Panel300_1280x1024 0x03
389 #define Panel300_1280x960 0x04
390 #define Panel300_640x480 0x05
391 #define Panel300_1024x600 0x06
392 #define Panel300_1152x768 0x07
393 #define Panel300_1280x768 0x0a
394 #define Panel300_Custom 0x0f
395 #define Panel300_Barco1366 0x10
397 #define Panel310_800x600 0x01
398 #define Panel310_1024x768 0x02
399 #define Panel310_1280x1024 0x03
400 #define Panel310_640x480 0x04
401 #define Panel310_1024x600 0x05
402 #define Panel310_1152x864 0x06
403 #define Panel310_1280x960 0x07
404 #define Panel310_1152x768 0x08
405 #define Panel310_1400x1050 0x09
406 #define Panel310_1280x768 0x0a
407 #define Panel310_1600x1200 0x0b
408 #define Panel310_320x240_2 0x0c
409 #define Panel310_320x240_3 0x0d
410 #define Panel310_320x240_1 0x0e
411 #define Panel310_Custom 0x0f
413 #define Panel661_800x600 0x01
414 #define Panel661_1024x768 0x02
415 #define Panel661_1280x1024 0x03
416 #define Panel661_640x480 0x04
417 #define Panel661_1024x600 0x05
418 #define Panel661_1152x864 0x06
419 #define Panel661_1280x960 0x07
420 #define Panel661_1280x854 0x08
421 #define Panel661_1400x1050 0x09
422 #define Panel661_1280x768 0x0a
423 #define Panel661_1600x1200 0x0b
424 #define Panel661_1280x800 0x0c
425 #define Panel661_1680x1050 0x0d
426 #define Panel661_1280x720 0x0e
427 #define Panel661_Custom 0x0f
429 #define Panel_800x600 0x01
430 #define Panel_1024x768 0x02
431 #define Panel_1280x1024 0x03
432 #define Panel_640x480 0x04
433 #define Panel_1024x600 0x05
434 #define Panel_1152x864 0x06
435 #define Panel_1280x960 0x07
436 #define Panel_1152x768 0x08
437 #define Panel_1400x1050 0x09
438 #define Panel_1280x768 0x0a
439 #define Panel_1600x1200 0x0b
440 #define Panel_1280x800 0x0c
441 #define Panel_1680x1050 0x0d
442 #define Panel_1280x720 0x0e
443 #define Panel_Custom 0x0f
444 #define Panel_320x240_1 0x10
445 #define Panel_Barco1366 0x11
446 #define Panel_848x480 0x12
447 #define Panel_320x240_2 0x13
448 #define Panel_320x240_3 0x14
449 #define Panel_1280x768_2 0x15
450 #define Panel_1280x768_3 0x16
451 #define Panel_1280x800_2 0x17
452 #define Panel_856x480 0x18
453 #define Panel_1280x854 0x19
456 #define SIS_RI_320x200 0
457 #define SIS_RI_320x240 1
458 #define SIS_RI_320x400 2
459 #define SIS_RI_400x300 3
460 #define SIS_RI_512x384 4
461 #define SIS_RI_640x400 5
462 #define SIS_RI_640x480 6
463 #define SIS_RI_800x600 7
464 #define SIS_RI_1024x768 8
465 #define SIS_RI_1280x1024 9
466 #define SIS_RI_1600x1200 10
467 #define SIS_RI_1920x1440 11
468 #define SIS_RI_2048x1536 12
469 #define SIS_RI_720x480 13
470 #define SIS_RI_720x576 14
471 #define SIS_RI_1280x960 15
472 #define SIS_RI_800x480 16
473 #define SIS_RI_1024x576 17
474 #define SIS_RI_1280x720 18
475 #define SIS_RI_856x480 19
476 #define SIS_RI_1280x768 20
477 #define SIS_RI_1400x1050 21
478 #define SIS_RI_1152x864 22
479 #define SIS_RI_848x480 23
480 #define SIS_RI_1360x768 24
481 #define SIS_RI_1024x600 25
482 #define SIS_RI_1152x768 26
483 #define SIS_RI_768x576 27
484 #define SIS_RI_1360x1024 28
485 #define SIS_RI_1680x1050 29
486 #define SIS_RI_1280x800 30
487 #define SIS_RI_1920x1080 31
488 #define SIS_RI_960x540 32
489 #define SIS_RI_960x600 33
490 #define SIS_RI_1280x854 34
502 #define StHiTVVT 1126
503 #define StHiTextTVHT 1000
504 #define StHiTextTVVT 1126
505 #define ExtHiTVHT 2100
506 #define ExtHiTVVT 1125
512 #define VCLK65_300 0x09
513 #define VCLK108_2_300 0x14
514 #define VCLK81_300 0x3f
515 #define VCLK108_3_300 0x42
516 #define VCLK100_300 0x43
517 #define VCLK34_300 0x3d
518 #define VCLK_CUSTOM_300 0x47
520 #define VCLK65_315 0x0b
521 #define VCLK108_2_315 0x19
522 #define VCLK81_315 0x5b
523 #define VCLK162_315 0x5e
524 #define VCLK108_3_315 0x45
525 #define VCLK100_315 0x46
526 #define VCLK34_315 0x55
527 #define VCLK68_315 0x0d
528 #define VCLK_1280x800_315_2 0x5c
529 #define VCLK121_315 0x5d
530 #define VCLK130_315 0x72
531 #define VCLK_1280x720 0x5f
532 #define VCLK_1280x768_2 0x60
533 #define VCLK_1280x768_3 0x61
534 #define VCLK_CUSTOM_315 0x62
535 #define VCLK_1280x720_2 0x63
536 #define VCLK_720x480 0x67
537 #define VCLK_720x576 0x68
538 #define VCLK_768x576 0x68
539 #define VCLK_848x480 0x65
540 #define VCLK_856x480 0x66
541 #define VCLK_800x480 0x65
542 #define VCLK_1024x576 0x51
543 #define VCLK_1152x864 0x64
544 #define VCLK_1360x768 0x58
545 #define VCLK_1280x800_315 0x6c
546 #define VCLK_1280x854 0x76
548 #define TVCLKBASE_300 0x21
549 #define TVCLKBASE_315 0x3a
550 #define TVVCLKDIV2 0x00
552 #define HiTVVCLKDIV2 0x02
553 #define HiTVVCLK 0x03
554 #define HiTVSimuVCLK 0x04
555 #define HiTVTextVCLK 0x05
556 #define YPbPr750pVCLK 0x25
560 #define SetSCARTOutput 0x01
562 #define HotPlugFunction 0x08
564 #define StStructSize 0x06
566 #define SIS_VIDEO_CAPTURE 0x00 - 0x30
567 #define SIS_VIDEO_PLAYBACK 0x02 - 0x30
568 #define SIS_CRT2_PORT_04 0x04 - 0x30
569 #define SIS_CRT2_PORT_10 0x10 - 0x30
570 #define SIS_CRT2_PORT_12 0x12 - 0x30
571 #define SIS_CRT2_PORT_14 0x14 - 0x30
573 #define ADR_CRT2PtrData 0x20E
574 #define offset_Zurac 0x210
575 #define ADR_LVDSDesPtrData 0x212
576 #define ADR_LVDSCRT1DataPtr 0x214
577 #define ADR_CHTVVCLKPtr 0x216
578 #define ADR_CHTVRegDataPtr 0x218
581 #define HiTVDataLen 12
584 #define LVDSDataLen 6
585 #define LVDSDesDataLen 3
586 #define ActiveNonExpanding 0x40
587 #define ActiveNonExpandingShift 6
588 #define ActivePAL 0x20
589 #define ActivePALShift 5
590 #define ModeSwitchStatus 0x0F
591 #define SoftTVType 0x40
592 #define SoftSettingAddr 0x52
593 #define ModeSettingAddr 0x53
595 #define _PanelType00 0x00
596 #define _PanelType01 0x08
597 #define _PanelType02 0x10
598 #define _PanelType03 0x18
599 #define _PanelType04 0x20
600 #define _PanelType05 0x28
601 #define _PanelType06 0x30
602 #define _PanelType07 0x38
603 #define _PanelType08 0x40
604 #define _PanelType09 0x48
605 #define _PanelType0A 0x50
606 #define _PanelType0B 0x58
607 #define _PanelType0C 0x60
608 #define _PanelType0D 0x68
609 #define _PanelType0E 0x70
610 #define _PanelType0F 0x78
612 #define PRIMARY_VGA 0
614 #define BIOSIDCodeAddr 0x235
615 #define OEMUtilIDCodeAddr 0x237
616 #define VBModeIDTableAddr 0x239
617 #define OEMTVPtrAddr 0x241
618 #define PhaseTableAddr 0x243
619 #define NTSCFilterTableAddr 0x245
620 #define PALFilterTableAddr 0x247
621 #define OEMLCDPtr_1Addr 0x249
622 #define OEMLCDPtr_2Addr 0x24B
623 #define LCDHPosTable_1Addr 0x24D
624 #define LCDHPosTable_2Addr 0x24F
625 #define LCDVPosTable_1Addr 0x251
626 #define LCDVPosTable_2Addr 0x253
627 #define OEMLCDPIDTableAddr 0x255
629 #define VBModeStructSize 5
630 #define PhaseTableSize 4
631 #define FilterTableSize 4
632 #define LCDHPosTableSize 7
633 #define LCDVPosTableSize 5
634 #define OEMLVDSPIDTableSize 4
635 #define LVDSHPosTableSize 4
636 #define LVDSVPosTableSize 6
639 #define VB_TVTableIndex 1
640 #define VB_LCDTableIndex 2
641 #define VB_LCDHIndex 3
642 #define VB_LCDVIndex 4
644 #define OEMLCDEnable 0x0001
645 #define OEMLCDDelayEnable 0x0002
646 #define OEMLCDPOSEnable 0x0004
647 #define OEMTVEnable 0x0100
648 #define OEMTVDelayEnable 0x0200
649 #define OEMTVFlickerEnable 0x0400
650 #define OEMTVPhaseEnable 0x0800
651 #define OEMTVFilterEnable 0x1000
653 #define OEMLCDPanelIDSupport 0x0080
660 #define SoftDRAMType 0x80
661 #define SoftSetting_OFFSET 0x52
662 #define SR07_OFFSET 0x7C
663 #define SR15_OFFSET 0x7D
664 #define SR16_OFFSET 0x81
665 #define SR17_OFFSET 0x85
666 #define SR19_OFFSET 0x8D
667 #define SR1F_OFFSET 0x99
668 #define SR21_OFFSET 0x9A
669 #define SR22_OFFSET 0x9B
670 #define SR23_OFFSET 0x9C
671 #define SR24_OFFSET 0x9D
672 #define SR25_OFFSET 0x9E
673 #define SR31_OFFSET 0x9F
674 #define SR32_OFFSET 0xA0
675 #define SR33_OFFSET 0xA1
677 #define CR40_OFFSET 0xA2
678 #define SR25_1_OFFSET 0xF6
679 #define CR49_OFFSET 0xF7
681 #define VB310Data_1_2_Offset 0xB6
682 #define VB310Data_4_D_Offset 0xB7
683 #define VB310Data_4_E_Offset 0xB8
684 #define VB310Data_4_10_Offset 0xBB
686 #define RGBSenseDataOffset 0xBD
687 #define YCSenseDataOffset 0xBF
688 #define VideoSenseDataOffset 0xC1
689 #define OutputSelectOffset 0xF3
691 #define ECLK_MCLK_DISTANCE 0x14
692 #define VBIOSTablePointerStart 0x100
693 #define StandTablePtrOffset VBIOSTablePointerStart+0x02
694 #define EModeIDTablePtrOffset VBIOSTablePointerStart+0x04
695 #define CRT1TablePtrOffset VBIOSTablePointerStart+0x06
696 #define ScreenOffsetPtrOffset VBIOSTablePointerStart+0x08
697 #define VCLKDataPtrOffset VBIOSTablePointerStart+0x0A
698 #define MCLKDataPtrOffset VBIOSTablePointerStart+0x0E
699 #define CRT2PtrDataPtrOffset VBIOSTablePointerStart+0x10
700 #define TVAntiFlickPtrOffset VBIOSTablePointerStart+0x12
701 #define TVDelayPtr1Offset VBIOSTablePointerStart+0x14
702 #define TVPhaseIncrPtr1Offset VBIOSTablePointerStart+0x16
703 #define TVYFilterPtr1Offset VBIOSTablePointerStart+0x18
704 #define LCDDelayPtr1Offset VBIOSTablePointerStart+0x20
705 #define TVEdgePtr1Offset VBIOSTablePointerStart+0x24
706 #define CRT2Delay1Offset VBIOSTablePointerStart+0x28