⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.c

📁 底层驱动开发
💻 C
📖 第 1 页 / 共 5 页
字号:
				ModeIndex = ModeIndex_1280x1024[Depth];				break;		}		break;	case 1360:		if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];		if(VGAEngine == SIS_300_VGA) {			if(VDisplay == 1024) ModeIndex = ModeIndex_300_1360x1024[Depth];		}		break;	case 1400:		if(VGAEngine == SIS_315_VGA) {			if(VDisplay == 1050) {				ModeIndex = ModeIndex_1400x1050[Depth];			}		}		break;	case 1600:		if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];		break;	case 1680:		if(VGAEngine == SIS_315_VGA) {			if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];		}		break;	case 1920:		if(VDisplay == 1440) ModeIndex = ModeIndex_1920x1440[Depth];		else if(VGAEngine == SIS_315_VGA) {			if(VDisplay == 1080) ModeIndex = ModeIndex_1920x1080[Depth];		}		break;	case 2048:		if(VDisplay == 1536) {			if(VGAEngine == SIS_300_VGA) {				ModeIndex = ModeIndex_300_2048x1536[Depth];			} else {				ModeIndex = ModeIndex_310_2048x1536[Depth];			}		}		break;   }   return ModeIndex;}unsigned shortSiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,		int Depth, BOOLEAN FSTN, unsigned short CustomT, int LCDwidth, int LCDheight,		unsigned int VBFlags2){   unsigned short ModeIndex = 0;   if(VBFlags2 & (VB2_LVDS | VB2_30xBDH)) {      switch(HDisplay)      {	case 320:	     if((CustomT != CUT_PANEL848) && (CustomT != CUT_PANEL856)) {		if(VDisplay == 200) {		   if(!FSTN) ModeIndex = ModeIndex_320x200[Depth];		} else if(VDisplay == 240) {		   if(!FSTN) ModeIndex = ModeIndex_320x240[Depth];		   else if(VGAEngine == SIS_315_VGA) {		      ModeIndex = ModeIndex_320x240_FSTN[Depth];		   }		}	     }	     break;	case 400:	     if((CustomT != CUT_PANEL848) && (CustomT != CUT_PANEL856)) {		if(!((VGAEngine == SIS_300_VGA) && (VBFlags2 & VB2_TRUMPION))) {		   if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];		}	     }	     break;	case 512:	     if((CustomT != CUT_PANEL848) && (CustomT != CUT_PANEL856)) {		if(!((VGAEngine == SIS_300_VGA) && (VBFlags2 & VB2_TRUMPION))) {		   if(LCDwidth >= 1024 && LCDwidth != 1152 && LCDheight >= 768) {		      if(VDisplay == 384) {		         ModeIndex = ModeIndex_512x384[Depth];		      }		   }		}	     }	     break;	case 640:	     if(VDisplay == 480) ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) {		if((CustomT != CUT_PANEL848) && (CustomT != CUT_PANEL856))		   ModeIndex = ModeIndex_640x400[Depth];	     }	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     break;	case 848:	     if(CustomT == CUT_PANEL848) {	        if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];	     }	     break;	case 856:	     if(CustomT == CUT_PANEL856) {	        if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];	     }	     break;	case 1024:	     if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];	     else if(VGAEngine == SIS_300_VGA) {		if((VDisplay == 600) && (LCDheight == 600)) {		   ModeIndex = ModeIndex_1024x600[Depth];		}	     }	     break;	case 1152:	     if(VGAEngine == SIS_300_VGA) {		if((VDisplay == 768) && (LCDheight == 768)) {		   ModeIndex = ModeIndex_1152x768[Depth];		}	     }	     break;        case 1280:	     if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];	     else if(VGAEngine == SIS_315_VGA) {		if((VDisplay == 768) && (LCDheight == 768)) {		   ModeIndex = ModeIndex_310_1280x768[Depth];		}	     }	     break;	case 1360:	     if(VGAEngine == SIS_300_VGA) {		if(CustomT == CUT_BARCO1366) {		   if(VDisplay == 1024) ModeIndex = ModeIndex_300_1360x1024[Depth];		}	     }	     if(CustomT == CUT_PANEL848) {		if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];	     }	     break;	case 1400:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];	     }	     break;	case 1600:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];	     }	     break;      }   } else if(VBFlags2 & VB2_SISBRIDGE) {      switch(HDisplay)      {	case 320:	     if(VDisplay == 200)      ModeIndex = ModeIndex_320x200[Depth];	     else if(VDisplay == 240) ModeIndex = ModeIndex_320x240[Depth];	     break;	case 400:	     if(LCDwidth >= 800 && LCDheight >= 600) {		if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];	     }	     break;	case 512:	     if(LCDwidth >= 1024 && LCDheight >= 768 && LCDwidth != 1152) {		if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];	     }	     break;	case 640:	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];	     break;	case 720:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 480)      ModeIndex = ModeIndex_720x480[Depth];		else if(VDisplay == 576) ModeIndex = ModeIndex_720x576[Depth];	     }	     break;	case 768:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];	     }	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 480) ModeIndex = ModeIndex_800x480[Depth];	     }	     break;	case 848:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];	     }	     break;	case 856:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];	     }	     break;	case 960:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 540)      ModeIndex = ModeIndex_960x540[Depth];		else if(VDisplay == 600) ModeIndex = ModeIndex_960x600[Depth];	     }	     break;	case 1024:	     if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];	     }	     break;	case 1152:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 864) ModeIndex = ModeIndex_1152x864[Depth];	     }	     break;	case 1280:	     switch(VDisplay) {	     case 720:		ModeIndex = ModeIndex_1280x720[Depth];	     case 768:		if(VGAEngine == SIS_300_VGA) {		   ModeIndex = ModeIndex_300_1280x768[Depth];		} else {		   ModeIndex = ModeIndex_310_1280x768[Depth];		}		break;	     case 800:		if(VGAEngine == SIS_315_VGA) {		   ModeIndex = ModeIndex_1280x800[Depth];		}		break;	     case 854:		if(VGAEngine == SIS_315_VGA) {		   ModeIndex = ModeIndex_1280x854[Depth];		}		break;	     case 960:		ModeIndex = ModeIndex_1280x960[Depth];		break;	     case 1024:		ModeIndex = ModeIndex_1280x1024[Depth];		break;	     }	     break;	case 1360:	     if(VGAEngine == SIS_315_VGA) {  /* OVER1280 only? */		if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];	     }	     break;	case 1400:	     if(VGAEngine == SIS_315_VGA) {		if(VBFlags2 & VB2_LCDOVER1280BRIDGE) {		   if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];		}	     }	     break;	case 1600:	     if(VGAEngine == SIS_315_VGA) {		if(VBFlags2 & VB2_LCDOVER1280BRIDGE) {		   if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];		}	     }	     break;#ifndef VB_FORBID_CRT2LCD_OVER_1600	case 1680:	     if(VGAEngine == SIS_315_VGA) {		if(VBFlags2 & VB2_LCDOVER1280BRIDGE) {		   if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];		}	     }	     break;	case 1920:	     if(VGAEngine == SIS_315_VGA) {		if(VBFlags2 & VB2_LCDOVER1600BRIDGE) {		   if(VDisplay == 1440) ModeIndex = ModeIndex_1920x1440[Depth];		}	     }	     break;	case 2048:	     if(VGAEngine == SIS_315_VGA) {		if(VBFlags2 & VB2_LCDOVER1600BRIDGE) {		   if(VDisplay == 1536) ModeIndex = ModeIndex_310_2048x1536[Depth];		}	     }	     break;#endif      }   }   return ModeIndex;}unsigned shortSiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, int Depth,			unsigned int VBFlags2){   unsigned short ModeIndex = 0;   if(VBFlags2 & VB2_CHRONTEL) {      switch(HDisplay)      {	case 512:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];	     }	     break;	case 640:	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     break;	case 1024:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];	     }	     break;      }   } else if(VBFlags2 & VB2_SISTVBRIDGE) {      switch(HDisplay)      {	case 320:	     if(VDisplay == 200)      ModeIndex = ModeIndex_320x200[Depth];	     else if(VDisplay == 240) ModeIndex = ModeIndex_320x240[Depth];	     break;	case 400:	     if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];	     break;	case 512:	     if( ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR750P | TV_YPBPR1080I))) ||		 (VBFlags & TV_HIVISION) 					      ||		 ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {		if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];	     }	     break;	case 640:	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];	     break;	case 720:	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {		if(VDisplay == 480) {		   ModeIndex = ModeIndex_720x480[Depth];		} else if(VDisplay == 576) {		   if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||		       ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) )		      ModeIndex = ModeIndex_720x576[Depth];		}	     }             break;	case 768:	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {		if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||		    ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {		   if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];		}             }	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     else if(VDisplay == 480) {		if(!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P))) {		   ModeIndex = ModeIndex_800x480[Depth];		}	     }	     break;	case 960:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 600) {		   if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {		      ModeIndex = ModeIndex_960x600[Depth];		   }		}	     }	     break;	case 1024:	     if(VDisplay == 768) {		if(VBFlags2 & VB2_30xBLV) {		   ModeIndex = ModeIndex_1024x768[Depth];		}	     } else if(VDisplay == 576) {		if( (VBFlags & TV_HIVISION) ||		    ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)) ||		    ((VBFlags2 & VB2_30xBLV) &&		     ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL))) ) {		   ModeIndex = ModeIndex_1024x576[Depth];		}	     }	     break;	case 1280:	     if(VDisplay == 720) {		if((VBFlags & TV_HIVISION) ||		   ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR1080I | TV_YPBPR750P)))) {		   ModeIndex = ModeIndex_1280x720[Depth];		}	     } else if(VDisplay == 1024) {		if((VBFlags & TV_HIVISION) ||		   ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {		   ModeIndex = ModeIndex_1280x1024[Depth];		}	     }	     break;      }   }   return ModeIndex;}unsigned shortSiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, int Depth,			unsigned int VBFlags2){   if(!(VBFlags2 & VB2_SISVGA2BRIDGE)) return 0;   if(HDisplay >= 1920) return 0;   switch(HDisplay)   {	case 1600:		if(VDisplay == 1200) {			if(VGAEngine != SIS_315_VGA) return 0;			if(!(VBFlags2 & VB2_30xB)) return 0;		}		break;	case 1680:		if(VDisplay == 1050) {			if(VGAEngine != SIS_315_VGA) return 0;			if(!(VBFlags2 & VB2_30xB)) return 0;		}		break;   }   return SiS_GetModeID(VGAEngine, 0, HDisplay, VDisplay, Depth, FALSE, 0, 0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -