📄 useradj.c
字号:
case pBOFFSET:
SetADCOffset(pBOFFSET);
//SaveFlag = 1;
break;
case pVCMVOL:
SetVCM_Vol();
//SaveFlag = 1;
break;
case pCONTRAST:
SetContrast();
//SaveFlag = 1;
break;
case pContMax:
case pContMin:
case pBrigMax:
case pBrigMin:
//SaveFlag = 1;
break;
};
SaveFlag = 1;
SavePointer = FuncPtr;
SaveTimer = SAVE_FUNC_TIME;
}
else
if(MenuPtr.Op == oINCFUNC || MenuPtr.Op == oDECFUNC)
{
switch(FuncPtr)
{
case pRCOLOR:
case pGCOLOR:
case pBCOLOR:
FuncBuf[pCOLORTEMP] = (MenuPtr.Ptr - 11)/3;
LoadColor(FuncBuf[pCOLORTEMP]);
SetContrast();
break;
default:
FuncBuf[pCOLORTEMP] = 3;
LoadColor(FuncBuf[pCOLORTEMP]);
SetContrast();
break;
};
}
}
}
//Trubo Menu -----------------------------------------------------------
if(MenuPtr.Menu == 4 && MenuPtr.Level == 1) //fact menu
{
if(EconomyMode){
TextMode = 0;
EconomyMode =~EconomyMode;
FuncBuf[pBACKLIGHT] = 0x7f;
}
else
{
if(TextMode)
{
EconomyMode = 1;
FuncBuf[pBACKLIGHT] = 0x2e;
}
else{
EconomyMode = 0;
TextMode = ~TextMode;
FuncBuf[pBACKLIGHT] = 0x49;
}
}
SetInverter();
Write24C16(ep_Status,StatusFlag);
Write24C16(ep_BackLight,(Byte)FuncBuf[pBACKLIGHT]);
}
}
void SetFuncMaxMin()
{
Byte code PolTab[7]={oINCVAL,oDECVAL,oDECVAL,oINCVAL,oINCFUNC,oDECFUNC,oUPDATE};
Byte Polary,Units;
bit Type;
Word Min,Max;
if(FuncPtr >= pFACTMENU)
return;
Type = 0;
switch(FuncPtr)
{
case pHPOSITION:
// Jacky 0201 removed
// case pOSDVPOSITION:
Max = FuncMax; //limited
Min = FuncMin;
Polary = 2;
Units = 1;
break;
case pVIDEOSOURCE: //cycle
Type = 1;
Max = FuncMax;
Min = FuncMin;
Polary = 6;
Units = 1;
break;
case pCOLORTEMP:
case pOSDHPOSITION:
case pLANGUAGE:
//case pSHARPNESS:
//case pVCMVOL:
Max = FuncMin;
Min = FuncMax;
Polary = 0;
Units = 1;
break;
case pVOLUME:
case pOSDTIMER:
Max = FuncMax;
Min = FuncMin;
Polary = 0;
Units = 5;
break;
default:
Max = FuncMax;
Min = FuncMin;
Polary = 0;
Units = 1;
break;
};
if(!Type)
{
if(MenuPtr.Op == PolTab[Polary])
{
if(FuncBuf[FuncPtr] < FuncMax && (FuncBuf[FuncPtr] + Units) <= FuncMax)
FuncBuf[FuncPtr] = FuncBuf[FuncPtr] + Units;
//FuncBuf[FuncPtr]++;
else
FuncBuf[FuncPtr] = Max;
}
if(MenuPtr.Op == PolTab[Polary+1])
{
if(FuncBuf[FuncPtr] > FuncMin && FuncBuf[FuncPtr] >= Units)
FuncBuf[FuncPtr] = FuncBuf[FuncPtr] - Units;
//FuncBuf[FuncPtr]--;
else
FuncBuf[FuncPtr] = Min;
}
}
else
{
/*
if(MenuPtr.Op == PolTab[Polary])
{
if(VideoSourcePtr< FuncMax)
VideoSourcePtr++;
else
VideoSourcePtr = Max;
}
if(MenuPtr.Op == PolTab[Polary+1])
{
if(VideoSourcePtr > FuncMin)
VideoSourcePtr--;
else
VideoSourcePtr = Min;
}
*/
if((MenuPtr.Op == PolTab[Polary]))
{
if(FuncBuf[FuncPtr] > FuncMax)
FuncBuf[FuncPtr] = Max;
}
}
}
void GetFuncRange(Byte Ptr)
{
FuncMin = 0;
switch(Ptr)
{
case pBRIGHTNESS:
FuncMax = 100;
//FuncMax = 255;
break;
case pCONTRAST:
FuncMax = FuncBuf[pContMax];
FuncMin= FuncBuf[pContMin];
//FuncMin = 20;
//FuncMax = 80;
break;
case pPHASE:
FuncMax = 0x3f;
break;
case pCLOCK:
FuncMax = ClockBase + 50;
FuncMin = ClockBase - 50;
//FuncMax = ClockBase / 10 * 11; ///10%
//FuncMin = ClockBase / 10 * 9;
break;
case pBACKLIGHT:
case pBACKLIGHT2:
FuncMax = FuncBuf[pBrigMax];
FuncMin= FuncBuf[pBrigMin];
//FuncMax = 0x7f;
break;
case pHPOSITION:
if(ModePoint >= UserModeSt){
// Set Minimum and Maximum
FuncMin = 1;
FuncMax = ClockBase - Hresolution - 2;
}
else{
// Set Minimum and Maximum
if(HPositionBase > (ClockBase - Hresolution)/4)
FuncMin = HPositionBase - (ClockBase - Hresolution)/4;
else
FuncMin = 1;
FuncMax = HPositionBase + (ClockBase - Hresolution)/4;
}
//if(FuncBuf[pHPOSITION] > (ClockBase - Hresolution)){
// FuncMax = ClockBase - Hresolution - 2;
//}
//FuncMin = 1;
//FuncMax = ClockBase - Hresolution - 2;
//FuncMax = FuncBuf[pCLOCK] - H_Act - 2;
break;
case pVPOSITION:
if(FuncBuf[pVPOSITION] < 2)
FuncMin = FuncBuf[pVPOSITION]-1;
else
FuncMin = 2;
FuncMax = VTotal - Vresolution + 20;
break;
case pOSDHPOSITION:
FuncMax = 4;
//FuncMax = (PanelWidth-OSD_WIDTH*12)/5;
break;
// Jacky 0201 removed
// case pOSDVPOSITION:
// FuncMax = (PanelHeight-OSD_HIGH*18)/5;
// break;
case pOSDTIMER:
FuncMin = 5;
FuncMax = 60;
break;
case pSATURATION:
FuncMax = 100;
break;
case pTINT:
FuncMax = 100;
break;
case pRCOLOR:
case pGCOLOR:
case pBCOLOR:
FuncMax = 255;
break;
case pCOLORTEMP:
FuncMax = MAX_COLOR_TEMP-1;
break;
case pLANGUAGE:
FuncMax = MAX_LANGUAGE-1;
break;
case pSHARPNESS:
if(FuncBuf[pVIDEOSOURCE] < 3)
FuncMax = 4;
//else
// FuncMax = 23;
break;
case pTRANSOSD:
FuncMax = 0x05;
break;
case pVIDEOSOURCE:
if(Saa7114En)
FuncMax = 4;
else
FuncMax = 1;
break;
case pVOLUME:
FuncMax = 100;
break;
case pVCMVOL:
FuncMax = 0xe6;
FuncMin = 0x63;
break;
case pRADC:
case pGADC:
case pBADC:
FuncMax = 255;
break;
case pROFFSET:
case pGOFFSET:
case pBOFFSET:
FuncMax = 255;
break;
case pContMax:
FuncMax = 100;
FuncMin = 0;
break;
case pContMin:
FuncMax = 50;
FuncMin = 0;
break;
case pBrigMax:
FuncMax = 127;
FuncMin = 0;
break;
case pBrigMin:
FuncMax = 50;
FuncMin = 0;
break;
case pLIGHTBRIGHT:
FuncMax = 100;
//FuncMax = 255;
break;
case pLIGHTCONTRAST:
//FuncMin = 20;
FuncMax = 100;
break;
case pLIGHTHSTART:
case pLIGHTHWIDTH:
FuncMin = 0;
FuncMax = 100;
break;
case pLIGHTVSTART:
case pLIGHTVHIGHT:
FuncMin = 0;
FuncMax = 100;
break;
};
}
void Recall(bit All)
{
Word addr;
Byte i;
if(FuncBuf[pVIDEOSOURCE] == 0 ||FuncBuf[pVIDEOSOURCE] == 2)
{
if(ModePoint < UserModeSt)
{
addr = ModePoint * 8;
for(i=0; i<6; i++)
{
Write24C16(addr+ep_Sync_Data,EEP_SyncMap[addr]);
addr++;
}
addr++;
Write24C16(addr+ep_Sync_Data,EEP_SyncMap[addr]);
}
if(All)
{
Write24C16(ep_Brightness,EEP_GeoMap[ep_Brightness-0x200]);
Write24C16(ep_Contrast,EEP_GeoMap[ep_Contrast-0x200]);
}
LoadModeIndependentSettings();
LoadModeDependentSettings();
//Write24C16(ep_Color_Ptr,EEP_GeoMap[ep_Color_Ptr-0x200]);
//FuncBuf[pCOLORTEMP] = Read24C16(ep_Color_Ptr);
//LoadColor(FuncBuf[pCOLORTEMP]);
SetADC_PLL();
SetADC_Phase();
if(SyncMode != 3)
{
SetHP();
SetVP();
}
if(Interlance){
WriteWordIIC563(0x032,Vresolution); // Capture V_Active
}
else{
WriteWordIIC563(0x032,Vresolution); // Capture V_Active
}
WriteWordIIC563(0x036,Hresolution); // Capture H_Active
//WriteWordIIC563(0x036,Hresolution + H_ActErrTab[ResolutionPtr]); // Capture H_Active
//SetScaler();
SetSharpness();
//SetBrightness();
//SetContrast();
//sRGB();
}
if(FuncBuf[pVIDEOSOURCE] == 1)
{
//Write24C16(ep_DVI_Contrast,EEP_GeoMap[ep_DVI_Contrast-0x200]);
Write24C16(ep_Contrast,EEP_GeoMap[ep_Contrast-0x200]);
Write24C16(ep_Brightness,EEP_GeoMap[ep_Brightness-0x200]);
Write24C16(ep_Color_Ptr,EEP_GeoMap[ep_Color_Ptr-0x200]);
//FuncBuf[pCONTRAST] = Read24C16(ep_DVI_Contrast);
FuncBuf[pCONTRAST] = Read24C16(ep_Contrast);
FuncBuf[pBRIGHTNESS] = Read24C16(ep_Brightness);
FuncBuf[pCOLORTEMP] = Read24C16(ep_Color_Ptr);
SetBrightness();
LoadColor(FuncBuf[pCOLORTEMP]);
SetContrast();
addr = ModePoint * 8;
Write24C16(addr+ep_Sync_Data,EEP_SyncMap[addr]);
FuncBuf[pSHARPNESS] = EEP_SyncMap[addr];
//addr = ep_Shape_Offset + (ModePoint * 8);
//FuncBuf[pSHARPNESS] = Read24C16(addr);
SetSharpness();
}
/*
if(FuncBuf[pVIDEOSOURCE] > 2)
{
Write24C16(ep_Video_Contrast,EEP_GeoMap[ep_Video_Contrast-0x200]);
Write24C16(ep_Video_Brightness,EEP_GeoMap[ep_Video_Brightness-0x200]);
Write24C16(ep_Video_Tint,EEP_GeoMap[ep_Video_Tint-0x200]);
Write24C16(ep_Video_Saturation,EEP_GeoMap[ep_Video_Saturation-0x200]);
Write24C16(ep_Video_Shapness,EEP_GeoMap[ep_Video_Shapness-0x200]);
FuncBuf[pBRIGHTNESS] = Read24C16(ep_Video_Brightness);
FuncBuf[pCONTRAST] = Read24C16(ep_Video_Contrast);
FuncBuf[pSATURATION] = Read24C16(ep_Video_Saturation);
FuncBuf[pSHARPNESS] = Read24C16(ep_Video_Shapness);
FuncBuf[pTINT] = Read24C16(ep_Video_Tint);
SetVideoBrightness();
SetVideoContrast();
SetVideoSaturation();
SetVideoSharpness();
SetVideoTint();
sRGB(50,(Byte)FuncBuf[pRCOLOR],(Byte)FuncBuf[pGCOLOR],(Byte)FuncBuf[pBCOLOR]);
}
*/
//common area
//---user color
Write24C16(ep_Color4_R,Read24C16(ep_Color6_R)); //R Gain
Write24C16(ep_Color4_G,Read24C16(ep_Color6_G)); //G Gain
Write24C16(ep_Color4_B,Read24C16(ep_Color6_B)); //B Gain
//---Color tempeture
Write24C16(ep_Color_Ptr,EEP_GeoMap[ep_Color_Ptr-0x200]); //Reset Color
//---Osd Timer
Write24C16(ep_Osd_Timer,EEP_GeoMap[ep_Osd_Timer-0x200]);
//---Osd Position
Write24C16(ep_OsdH_Pos,EEP_GeoMap[ep_OsdH_Pos-0x200]);
//Write24C16(ep_OsdV_Pos,EEP_GeoMap[ep_OsdV_Pos-0x200]);
//---Osd Effect
Write24C16(ep_Osd_Effect,EEP_GeoMap[ep_Osd_Effect-0x200]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -