Lcd_osd.lst
上传用户:xmyjxjd
上传日期:2013-05-04
资源大小:1517k
文件大小:725k
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 1
- C51 COMPILER V7.06, COMPILATION OF MODULE LCD_OSD
- OBJECT MODULE PLACED IN .OutputLcd_osd.obj
- COMPILER INVOKED BY: C:KeilC51BINC51.EXE CodeLcd_osd.c OPTIMIZE(9,SPEED) BROWSE DEBUG OBJECTEXTEND CODE SYMBOLS PRI
- -NT(.OutputLcd_osd.lst) PREPRINT(.OutputLcd_osd.i) OBJECT(.OutputLcd_osd.obj)
- stmt level source
- 1 #define __OSD__
- 2
- 3 #include "reg52.h"
- 4
- 5 #include "HeaderMAIN_DEF.H"
- 6 #include "HeaderCONFIG.H"
- 7 #include "HeaderACCESS.H"
- 8 #include "HeaderLCD_FUNC.H"
- 9 #include "HeaderLCD_AUTO.H"
- 10 #include "HeaderLCD_MSG.H"
- 11 #include "HeaderLCD_MAIN.H"
- 12 #include "HeaderLCD_OSD.H"
- 13 #include "HeaderFONT.H"
- 14 #include "HeaderOSD.H"
- 15 #include "HeaderSRC_CTRL.H"
- 16 #include "HeaderOSD_TREE.H"
- 17
- 18 #include "Headerrgb_echo.H"
- 19
- 20 #if (TV_CHIP != TV_NONE)
- #include "TUNER.H"
- #endif
- 23
- 24 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 25 // OSD Process Dispatch Table
- 26 // In this code, when input source is not VGA, AUTO CONFIG page will not be shown.
- 27 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 28
- 29 unsigned char GetNextPageIdx(unsigned char ucPageCurr)
- 30 {
- 31 1 switch (stGUD1.INPUT_SOURCE & 0x07)
- 32 1 {
- 33 2 case SOURCE_VGA :
- 34 2 return (5 <= ucPageCurr) ? 1 : ucPageCurr + 1;
- 35 2 case SOURCE_DVI :
- 36 2 return (5 <= ucPageCurr) ? 1 : ucPageCurr + 1;
- 37 2 case SOURCE_AV :
- 38 2 return (5 <= ucPageCurr) ? 1 : ucPageCurr + 1;
- 39 2 case SOURCE_SV :
- 40 2 return (5 <= ucPageCurr) ? 1 : ucPageCurr + 1;
- 41 2 case SOURCE_YUV :
- 42 2 return (5 <= ucPageCurr) ? 1 : ucPageCurr + 1;
- 43 2 default :
- 44 2 return 1;
- 45 2 }
- 46 1
- 47 1 }
- 48
- 49 unsigned char GetPrevPageIdx(unsigned char ucPageCurr)
- 50 {
- 51 1 switch (stGUD1.INPUT_SOURCE & 0x07)
- 52 1 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 2
- 53 2 case SOURCE_VGA :
- 54 2 return (1 >= ucPageCurr) ? 5 : ucPageCurr - 1;
- 55 2 case SOURCE_DVI :
- 56 2 return (1 >= ucPageCurr) ? 5 : ucPageCurr - 1;
- 57 2 case SOURCE_AV :
- 58 2 return (1 >= ucPageCurr) ? 5 : ucPageCurr - 1;
- 59 2 case SOURCE_SV :
- 60 2 return (1 >= ucPageCurr) ? 5 : ucPageCurr - 1;
- 61 2 case SOURCE_YUV :
- 62 2 return (1 >= ucPageCurr) ? 5 : ucPageCurr - 1;
- 63 2 default :
- 64 2 return 1;
- 65 2 }
- 66 1
- 67 1 }
- 68
- 69 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 70 // OSD Process Public Function
- 71 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 72
- 73 // OSD Window : Control OSD Windows
- 74 // win_no : bit 2 ~ 0 Window Number 0 ~ 7
- 75 // row_start : bit 10 ~ 0 Window Row Start Address
- 76 // row_end : bit 10 ~ 0 Window Row End Address
- 77 // col_start : bit 10 ~ 0 Window Column Start Address
- 78 // col_end : bit 10 ~ 0 Window Column End Address
- 79 // width : bit 2 ~ 0 shadow/border width or 3D button thickness in pixel unit 1~8 pixel
- 80 // height : bit 2 ~ 0 shadow/border height in line unit , it must the same with width for 3D button
- - thickness
- 81 // color : bit 3 ~ 0 window color index in 16-color LUT
- 82 // color_sb : bit 7 ~ 4 shadow color or left-top/bottom border color for 3D window
- 83 // : bit 3 ~ 0 border color or right-bottom/top border color
- 84 // gradient : bit 7 R Gradient Polarity 0 : Decrease 1 : Increase
- 85 // : bit 6 G Gradient Polarity 0 : Decrease 1 : Increase
- 86 // : bit 5 B Gradient Polarity 0 : Decrease 1 : Increase
- 87 // : bit 4 ~ 3 Gradient level 00~11 : 1 step ~ 4 setp per level
- 88 // : bit 2 Enable Red Color Gradient
- 89 // : bit 1 Enable Green Color Gradient
- 90 // : bit 0 Enable Blue Color Gradient
- 91 // gra_level : bit 2~0 111 ~ 001 : 7 level ~ 1 level per gradient, 000 : 8 level per gradient
- 92 // attr : bit 6 1 - Enable Gradient function 0 - Disable Gradient function
- 93 // : bit 5 1 - Vertical Gradient 0 - Horizontal Gradient
- 94 // : bit 4 1 - Enable Shadow/Border/3D button 0 - Disable
- 95 // : bit 3 ~ 1 000 : Shadow Type 1
- 96 // 001 : Shadow Type 2
- 97 // 010 : Shadow Type 3
- 98 // 011 : Shadow Type 4
- 99 // 100 : 3D Button Type 1
- 100 // 101 : 3D Button Type 2
- 101 // 110 : Reserved
- 102 // 111 : Border
- 103 // : bit 0 1 - Enable Window 0 - Disable Window
- 104 void OSD_Window(unsigned char win_no, unsigned int row_start, unsigned int row_end, unsigned int col_start
- -, unsigned int col_end,
- 105 unsigned char width, unsigned char height, unsigned char color, unsigned char color_sb, unsigned char
- - gradient,
- 106 unsigned char gray_level,unsigned char attr)
- 107 {
- 108 1 if(win_no > 7)
- 109 1 return;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 3
- 110 1
- 111 1 Data[0] = 5;
- 112 1 Data[1] = Y_INC;
- 113 1 Data[2] = OSD_ADDR_MSB_90;
- 114 1 Data[3] = 0xc1;
- 115 1 Data[4] = (win_no << 2);
- 116 1 Data[5] = 0;
- 117 1 RTDWrite(Data);
- 118 1 Data[0] = 6;
- 119 1 Data[1] = N_INC;
- 120 1 Data[2] = OSD_DATA_92;
- 121 1 Data[3] = ((width & 0x07) << 3) | (height & 0x07);
- 122 1 Data[4] = color_sb;
- 123 1 Data[5] = gradient;
- 124 1 Data[6] = 0;
- 125 1 RTDWrite(Data);
- 126 1
- 127 1 Data[0] = 5;
- 128 1 Data[1] = Y_INC;
- 129 1 Data[2] = OSD_ADDR_MSB_90;
- 130 1 Data[3] = 0xe1;
- 131 1 Data[4] = (win_no << 2) + 1;
- 132 1 Data[5] = 0;
- 133 1 RTDWrite(Data);
- 134 1 Data[0] = 9;
- 135 1 Data[1] = N_INC;
- 136 1 Data[2] = OSD_DATA_92;
- 137 1 Data[3] = (unsigned char)((unsigned int)(row_start & 0x003f) << 2);
- 138 1 Data[4] = (unsigned char)((unsigned int)(col_start & 0x0007) << 5) |
- 139 1 (unsigned char)((unsigned int)(row_start & 0x07c0) >> 6);
- 140 1 Data[5] = (unsigned char)((unsigned int)(col_start & 0x07f8) >> 3);
- 141 1
- 142 1 Data[6] = (unsigned char)((unsigned int)(row_end & 0x003f) << 2);
- 143 1 Data[7] = (unsigned char)((unsigned int)(col_end & 0x0007) << 5) |
- 144 1 (unsigned char)((unsigned int)(row_end & 0x07c0) >> 6);
- 145 1 Data[8] = (unsigned char)((unsigned int)(col_end & 0x07f8) >> 3);
- 146 1 Data[9] = 0;
- 147 1 RTDWrite(Data);
- 148 1
- 149 1 Delay_Xms(25);
- 150 1
- 151 1 /*
- 152 1 do
- 153 1 {
- 154 1 RTDRead(0x94, 0x01, Y_INC);
- 155 1 }
- 156 1 while( ((Data[0] >> 5) & 0x01) );
- 157 1 */
- 158 1
- 159 1 Data[0] = 5;
- 160 1 Data[1] = Y_INC;
- 161 1 Data[2] = OSD_ADDR_MSB_90;
- 162 1 Data[3] = 0xc1;
- 163 1 Data[4] = (win_no << 2) + 3;
- 164 1 Data[5] = 0;
- 165 1 RTDWrite(Data);
- 166 1 Data[0] = 6;
- 167 1 Data[1] = N_INC;
- 168 1 Data[2] = OSD_DATA_92;
- 169 1 Data[3] = 0x00;
- 170 1 Data[4] = (unsigned char)((gray_level & 0x07) << 4) |( color & 0x0f);
- 171 1 Data[5] = attr;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 4
- 172 1 Data[6] = 0;
- 173 1 RTDWrite(Data);
- 174 1
- 175 1 }
- 176
- 177 /////////////////////////////////////////////////////////////////////////////////////
- 178 //anson
- 179 /////////////////////////////////////////////////////////////////////////////////////
- 180 void OSD_Fact_Line(unsigned char row, unsigned char col, unsigned char length,
- 181 unsigned char value, unsigned char indicate)
- 182 {
- 183 1 unsigned int idata usStart_Addr;
- 184 1 unsigned char idata ucTemp;
- 185 1
- 186 1 usStart_Addr = FONT_SELECT_ADDRESS;
- 187 1
- 188 1 //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
- -Row(n-1)_length
- 189 1 for(ucTemp = 1; ucTemp < row+1; ucTemp ++)
- 190 1 usStart_Addr += FactRow_Info[0][ucTemp];
- 191 1
- 192 1 Data[0] = 5;
- 193 1 Data[1] = Y_INC;
- 194 1 Data[2] = OSD_ADDR_MSB_90;
- 195 1
- 196 1 if( (col+1) > FactRow_Info[0][row + 1]) // if column_start > row_length, then return
- 197 1 return;
- 198 1 else if((col + 1 + length) > FactRow_Info[0][row + 1]) // if column_start + length > row_length, then re-
- -calculate the length
- 199 1 length = FactRow_Info[0][row + 1] - col;
- 200 1
- 201 1 // indicate : 0, 1, 2, 3 set byte 0, 1, 2 and all byte
- 202 1 Data[3] = (unsigned char)( ((usStart_Addr + col) & 0x0fff) >> 8 ) | (((indicate << 2) + 1) << 4);
- 203 1 Data[4] = (unsigned char)((usStart_Addr + col) & 0x00ff);
- 204 1 Data[5] = 0;
- 205 1 RTDWrite(Data);
- 206 1
- 207 1 Data[0] = (indicate == 3) ? length * 3 + 3 : length + 3;
- 208 1 Data[1] = BURST;
- 209 1 Data[2] = OSD_DATA_92;
- 210 1 Data[3] = value;
- 211 1 Data[4] = 0;
- 212 1 RTDWrite(Data);
- 213 1
- 214 1 }
- 215
- 216 void OSD_Fact_Clear(unsigned char row_start, unsigned char height, unsigned char col_start, unsigned char
- -width)
- 217 {
- 218 1 width = width;
- 219 1 if (height)
- 220 1 {
- 221 2 do
- 222 2 {
- 223 3 OSD_Fact_Line(row_start, col_start, FactRow_Info[0][row_start+1], 0x00, 3);
- 224 3 //OSD_Line(row_start, col_start, width, 0x00, 3);
- 225 3 row_start++;
- 226 3 }
- 227 2 while (--height);
- 228 2 }
- 229 1 }
- 230
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 5
- 231 void ShowValue(unsigned char row, unsigned char col,unsigned char value, unsigned char color)
- 232 {
- 233 1 unsigned int idata usStart_Addr;
- 234 1 unsigned char idata ucTemp;
- 235 1
- 236 1 usStart_Addr = FONT_SELECT_ADDRESS;
- 237 1
- 238 1 //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
- -Row(n-1)_length
- 239 1 for(ucTemp = 1; ucTemp < row+1; ucTemp ++)
- 240 1 usStart_Addr += FactRow_Info[0][ucTemp];
- 241 1
- 242 1 Data[10] = value/100;
- 243 1 Data[11] = (value - (Data[10]*100))/10;
- 244 1 Data[12] = value - (Data[10]*100) - (Data[11]*10);
- 245 1 if(0 != Data[10])
- 246 1 {
- 247 2 Data[10] += _0_;
- 248 2 Data[11] += _0_;
- 249 2 }
- 250 1 else
- 251 1 {
- 252 2 if(0 != Data[11]) Data[11] += _0_;
- 253 2 }
- 254 1 Data[12] += _0_;
- 255 1 //Byte1
- 256 1 Data[0] = 5;
- 257 1 Data[1] = Y_INC;
- 258 1 Data[2] = OSD_ADDR_MSB_90;
- 259 1 Data[3] = (unsigned char)( ((usStart_Addr + col) & 0x0fff) >> 8 ) | 0x50;
- 260 1 Data[4] = (unsigned char)((usStart_Addr + col) & 0x00ff);
- 261 1 Data[5] = 0;
- 262 1 RTDWrite(Data);
- 263 1 Data[0] = 6;
- 264 1 Data[1] = N_INC;
- 265 1 Data[2] = OSD_DATA_92;
- 266 1 Data[3] = Data[10];
- 267 1 Data[4] = Data[11];
- 268 1 Data[5] = Data[12];
- 269 1 Data[6] = 0;
- 270 1 RTDWrite(Data);
- 271 1 //Byte2
- 272 1 Data[0] = 5;
- 273 1 Data[1] = Y_INC;
- 274 1 Data[2] = OSD_ADDR_MSB_90;
- 275 1 Data[3] = (unsigned char)( ((usStart_Addr + col) & 0x0fff) >> 8 ) | 0x90;
- 276 1 Data[4] = (unsigned char)((usStart_Addr + col) & 0x00ff);
- 277 1 Data[5] = 0;
- 278 1 RTDWrite(Data);
- 279 1 Data[0] = 6;
- 280 1 Data[1] = N_INC;
- 281 1 Data[2] = OSD_DATA_92;
- 282 1 Data[3] = color;
- 283 1 Data[4] = color;
- 284 1 Data[5] = color;
- 285 1 Data[6] = 0;
- 286 1 RTDWrite(Data);
- 287 1 }
- 288
- 289 void Value_Adjust(unsigned char *Var, unsigned char Key, unsigned char VMax, unsigned char VMin)
- 290 {
- 291 1 if(NOTIFY_LEFT_KEY == Key)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 6
- 292 1 {
- 293 2 if(bKeyTurbo)
- 294 2 *Var = (*Var < (VMax - 1)) ? (*Var + 2) : VMax;
- 295 2 else
- 296 2 *Var = (*Var < VMax) ? (*Var + 1) : VMax;
- 297 2 }
- 298 1 else
- 299 1 {
- 300 2 if(bKeyTurbo)
- 301 2 *Var = (*Var > (VMin + 1)) ? *Var - 2 : VMin;
- 302 2 else
- 303 2 *Var = (*Var > VMin) ? (*Var - 1) : VMin;
- 304 2 }
- 305 1 }
- 306
- 307 void SPREAD_Adjust(unsigned char* variable,unsigned char Key)
- 308 {
- 309 1 if (NOTIFY_LEFT_KEY == Key)
- 310 1 {
- 311 2 if (15 <= *variable)
- 312 2 return;
- 313 2
- 314 2 if (!bKeyTurbo)
- 315 2 *variable = 15 > *variable ? *variable + 1 : 15;
- 316 2 else
- 317 2 *variable = 14 > *variable ? *variable + 2 : 15;
- 318 2 }
- 319 1 else
- 320 1 {
- 321 2 if (0 == *variable)
- 322 2 return;
- 323 2
- 324 2 if (!bKeyTurbo)
- 325 2 *variable = 0 < *variable ? *variable - 1 : 0;
- 326 2 else
- 327 2 *variable = 1 < *variable ? *variable - 2 : 0;
- 328 2 }
- 329 1 }
- 330
- 331
- 332 /////////////////////////////////////////////////////////////////////////////////////
- 333 /////////////////////////////////////////////////////////////////////////////////////
- 334
- 335 void Get_OSD_Margin(void)
- 336 {
- 337 1 unsigned char ucH_Min, ucH_Max, ucV_Max;
- 338 1
- 339 1 #if (DISP_ALIGN)
- RTDRead(DH_ACT_STA_27, 0x02, Y_INC);
- Data[2] = Data[1] & 0x07;
- Data[3] = Data[0];
-
- ucH_Min = (((unsigned int *)Data)[1] / 4) + 1;
- ucH_Max = OSD_HMAX;
- #else
- 347 1 RTDRead(DH_ACT_END_29, 0x02, Y_INC);
- 348 1 Data[2] = Data[1] & 0x07;
- 349 1 Data[3] = Data[0];
- 350 1
- 351 1 //ucH_Max = ((((unsigned int *)Data)[1] - 312 - 8 - 16) / 4) + 1;
- 352 1 ucH_Max = ((((unsigned int *)Data)[1] - 512) / 4) + 1;
- 353 1 ucH_Min = OSD_HMIN;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 7
- 354 1 #endif
- 355 1
- 356 1 RTDRead(DV_ACT_END_34, 0x02, Y_INC);
- 357 1 Data[2] = Data[1] & 0x07;
- 358 1 Data[3] = Data[0];
- 359 1
- 360 1 ucV_Max = (((unsigned int *)Data)[1] - DV_ACT_STA_POS - 250 - 14) / 4;
- 361 1
- 362 1 Data[0] = ucH_Min;
- 363 1 Data[1] = ucH_Max;
- 364 1 Data[2] = OSD_VMIN;
- 365 1 Data[3] = ucV_Max;
- 366 1
- 367 1 }
- 368
- 369 // OSD_Position : Restore OSD position according to global settings
- 370 // para : OSD font parameter
- 371 // OSD_GLOBAL_BLINK : 0x10
- 372 // OSD_DISP_ZONE_LEFT : 0x04
- 373 // OSD_DISP_ZONE_RIGHT : 0x08
- 374 // OSD_ROTATE : 0x02
- 375 // OSD_ENABLE : 0x01
- 376
- 377 void OSD_Position(unsigned char para)
- 378 {
- 379 1 Get_OSD_Margin();
- 380 1
- 381 1 if (Data[0] > stGUD1.OSD_POSH || Data[1] < stGUD1.OSD_POSH ||
- 382 1 Data[2] > stGUD1.OSD_POSV || Data[3] < stGUD1.OSD_POSV)
- 383 1 {
- 384 2 stGUD1.OSD_POSV = OSD_VMID;
- 385 2 stGUD1.OSD_POSH = OSD_HMID;
- 386 2 Save_GUD1();
- 387 2 }
- 388 1
- 389 1 if(ucOSD_Page_Index == PAGE_Factory) //anson
- 390 1 {
- 391 2 stGUD1.OSD_POSH = 230;
- 392 2 stGUD1.OSD_POSV = 100;
- 393 2 }
- 394 1
- 395 1 Wait_For_Event(EVENT_DEN_STOP);
- 396 1
- 397 1 Data[0] = 5;
- 398 1 Data[1] = Y_INC;
- 399 1 Data[2] = OSD_ADDR_MSB_90;
- 400 1 Data[3] = 0xc0;
- 401 1 Data[4] = 0x00;
- 402 1 Data[5] = 6;
- 403 1 Data[6] = N_INC;
- 404 1 Data[7] = OSD_DATA_92;
- 405 1 Data[8] = stGUD1.OSD_POSV >> 1;
- 406 1 Data[9] = (unsigned char)(stGUD1.OSD_POSH >> 2);
- 407 1 Data[10] = ((unsigned char)(stGUD1.OSD_POSH & 0x0003) << 6) | ((stGUD1.OSD_POSV & 0x01) << 5) | para;
- 408 1 //+ (unsigned char)(OSD_Enable[10] & 0x1e) + osd_en;
- 409 1 Data[11] = 0;
- 410 1 RTDWrite(Data);
- 411 1
- 412 1 }
- 413
- 414 void OSD_Line(unsigned char row, unsigned char col, unsigned char length,
- 415 unsigned char value, unsigned char indicate)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 8
- 416 {
- 417 1 unsigned int idata usStart_Addr;
- 418 1 unsigned char idata ucTemp;
- 419 1
- 420 1 usStart_Addr = FONT_SELECT_ADDRESS;
- 421 1
- 422 1 //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
- -Row(n-1)_length
- 423 1 for(ucTemp = 1; ucTemp < row+1; ucTemp ++)
- 424 1 usStart_Addr += Row_Info[0][ucTemp];
- 425 1
- 426 1 Data[0] = 5;
- 427 1 Data[1] = Y_INC;
- 428 1 Data[2] = OSD_ADDR_MSB_90;
- 429 1
- 430 1 if( (col+1) > Row_Info[0][row + 1]) // if column_start > row_length, then return
- 431 1 return;
- 432 1 else if((col + 1 + length) > Row_Info[0][row + 1]) // if column_start + length > row_length, then re-calc
- -ulate the length
- 433 1 length = Row_Info[0][row + 1] - col;
- 434 1
- 435 1 // indicate : 0, 1, 2, 3 set byte 0, 1, 2 and all byte
- 436 1 Data[3] = (unsigned char)( ((usStart_Addr + col) & 0x0fff) >> 8 ) | (((indicate << 2) + 1) << 4);
- 437 1 Data[4] = (unsigned char)((usStart_Addr + col) & 0x00ff);
- 438 1 Data[5] = 0;
- 439 1 RTDWrite(Data);
- 440 1
- 441 1 Data[0] = (indicate == 3) ? length * 3 + 3 : length + 3;
- 442 1 Data[1] = BURST;
- 443 1 Data[2] = OSD_DATA_92;
- 444 1 Data[3] = value;
- 445 1 Data[4] = 0;
- 446 1 RTDWrite(Data);
- 447 1
- 448 1 }
- 449
- 450
- 451 void OSD_Slider(unsigned char row, unsigned char col, unsigned char length, unsigned char value, unsigned
- -char range,
- 452 unsigned char color, unsigned char color_slider)
- 453 {
- 454 1 unsigned int idata usStart_Addr;
- 455 1 unsigned char idata ucTemp;
- 456 1 unsigned int bound;
- 457 1
- 458 1 usStart_Addr = FONT_SELECT_ADDRESS;
- 459 1
- 460 1 for(ucTemp = 1; ucTemp < row+1; ucTemp ++)
- 461 1 usStart_Addr += Row_Info[0][ucTemp];
- 462 1
- 463 1 length = length -5;
- 464 1 bound = ((length-2)*6 + 2*3) * value;
- 465 1
- 466 1 // Set color
- 467 1 Data[0] = 6;
- 468 1 Data[1] = Y_INC;
- 469 1 Data[2] = OSD_ADDR_MSB_90;
- 470 1 Data[3] = (unsigned char)((((usStart_Addr + col) >>8 ) & 0x0f ) | 0x90);
- 471 1 Data[4] = (unsigned char)( (usStart_Addr + col) & 0x00ff);
- 472 1 Data[5] = (color << 4) & 0xf0;
- 473 1 Data[6] = 0;
- 474 1 RTDWrite(Data);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 9
- 475 1
- 476 1 Data[0] = 5;
- 477 1 Data[1] = N_INC;
- 478 1 Data[2] = OSD_DATA_92;
- 479 1 Data[3] = (color << 4) & 0xf0;
- 480 1 Data[4] = (color << 4) & 0xf0;
- 481 1 Data[5] = 0;
- 482 1 RTDWrite(Data);
- 483 1
- 484 1 OSD_Line(row,col+5,12,((color_slider<<4) & 0xf0),2);
- 485 1 Data[0] = 6;
- 486 1 Data[1] = Y_INC;
- 487 1 Data[2] = OSD_ADDR_MSB_90;
- 488 1
- 489 1 Data[6] = 0;
- 490 1
- 491 1 for (row = 0; row < length; row++)
- 492 1 {
- 493 2 Data[3] = (unsigned char)((((usStart_Addr + col + row + 5) >> 8 ) & 0x0f ) | 0x50);
- 494 2 Data[4] = (unsigned char)( (usStart_Addr + col + row + 5) & 0x00ff);
- 495 2
- 496 2 if( row == 0 || row == (length-1) )
- 497 2 {
- 498 3 if( bound )
- 499 3 {
- 500 4 if( bound >= (range*3) )
- 501 4 {
- 502 5 Data[5] = (row==0) ? 0x13 : 0x1e;
- 503 5 bound = bound - range*3;
- 504 5 }
- 505 4 else
- 506 4 {
- 507 5 color = (bound << 4) / (range*3);
- 508 5 bound = 0;
- 509 5
- 510 5 if (4 > color)
- 511 5 Data[5] = (row==0) ? 0x10 : 0x1b;
- 512 5 else if (8 > color)
- 513 5 Data[5] = (row==0) ? 0x11 : 0x1c;
- 514 5 else if (12 > color)
- 515 5 Data[5] = (row==0) ? 0x12 : 0x1d;
- 516 5 else
- 517 5 Data[5] = (row==0) ? 0x13 : 0x1e;
- 518 5 }
- 519 4 }
- 520 3 else
- 521 3 {
- 522 4 Data[5] = (row==0) ? 0x10 : 0x1b;
- 523 4 }
- 524 3 }
- 525 2 else
- 526 2 {
- 527 3 if( bound )
- 528 3 {
- 529 4 if( bound >= (range*6) )
- 530 4 {
- 531 5 Data[5] = 0x1a;
- 532 5 bound = bound - range*6;
- 533 5 }
- 534 4 else
- 535 4 {
- 536 5 color = (bound << 4) / (range*6);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 10
- 537 5 bound = 0;
- 538 5
- 539 5 if (1 > color)
- 540 5 Data[5] = 0x14;
- 541 5 else if (4 > color)
- 542 5 Data[5] = 0x15;
- 543 5 else if (6 > color)
- 544 5 Data[5] = 0x16;
- 545 5 else if (9 > color)
- 546 5 Data[5] = 0x17;
- 547 5 else if (11 > color)
- 548 5 Data[5] = 0x18;
- 549 5 else if (14 > color)
- 550 5 Data[5] = 0x19;
- 551 5 else
- 552 5 Data[5] = 0x1a;
- 553 5 }
- 554 4 }
- 555 3 else
- 556 3 {
- 557 4 Data[5] = 0x14;
- 558 4 }
- 559 3
- 560 3 }
- 561 2
- 562 2 RTDWrite(Data);
- 563 2
- 564 2 }
- 565 1
- 566 1 range = value / 10;
- 567 1 row = value - (range * 10); // x1
- 568 1 color = range / 10; // x100
- 569 1 range = range - (color * 10); // x10
- 570 1
- 571 1 row = row + 0x01;
- 572 1 range = (range || color) ? range + 0x01 : 0x00;
- 573 1 color = color ? color + 0x01 : 0x00;
- 574 1
- 575 1 Data[0] = 5;
- 576 1 Data[1] = Y_INC;
- 577 1 Data[2] = OSD_ADDR_MSB_90;
- 578 1 Data[3] = (unsigned char)((((usStart_Addr + col) >>8 ) & 0x0f ) | 0x50);
- 579 1 Data[4] = (unsigned char)( (usStart_Addr + col ) & 0x00ff);
- 580 1 Data[5] = 0;
- 581 1 RTDWrite(Data);
- 582 1
- 583 1 Data[0] = 6;
- 584 1 Data[1] = N_INC;
- 585 1 Data[2] = OSD_DATA_92;
- 586 1 Data[3] = color; // Number x100
- 587 1 Data[4] = range; // Number x10
- 588 1 Data[5] = row; // Number x1
- 589 1 Data[6] = 0;
- 590 1 RTDWrite(Data);
- 591 1
- 592 1 }
- 593
- 594
- 595 void Init_Page(unsigned char index)
- 596 {
- 597 1 index = index;
- 598 1 OSD_Position(OSD_ENABLE);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 11
- 599 1 OSD_Clear(5, 11, 15, 1); //Need to be modified case by case.
- 600 1 if( ucOSD_Page_Index == 1)
- 601 1 RTDOSDW(OSD_Window_Setting);
- 602 1 }
- 603
- 604 void Show_Osd_Page(unsigned char Page_Num,unsigned char* Page_Attr,unsigned char OSD_Table_Num)
- 605 {
- 606 1 Init_Page(Page_Num);
- 607 1 RTDOSDW(Page_All_Atb);
- 608 1 RTDOSDW(OSD_PAGE_All_TABLE[0][stGUD1.FUNCTION & 0x07]);
- *** WARNING C214 IN LINE 608 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 609 1 RTDOSDW(Page_Attr);
- 610 1 RTDOSDW(OSD_PAGE_TABLE[OSD_Table_Num][stGUD1.FUNCTION & 0x07]);
- *** WARNING C214 IN LINE 610 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 611 1 Show_Mode();
- 612 1 }
- 613
- 614 void OSD_Clear(unsigned char row_start, unsigned char height, unsigned char col_start, unsigned char width
- -)
- 615 {
- 616 1 width = width;
- 617 1 if (height)
- 618 1 {
- 619 2 do
- 620 2 {
- 621 3 OSD_Line(row_start, col_start, Row_Info[0][row_start+1], 0x00, 3);
- 622 3 //OSD_Line(row_start, col_start, width, 0x00, 3);
- 623 3 row_start++;
- 624 3 }
- 625 2 while (--height);
- 626 2 }
- 627 1 }
- 628
- 629 void Bright_Contrast_Adjust(unsigned char* variable,unsigned char Key)
- 630 {
- 631 1 // if (NOTIFY_RIGHT_KEY == Key)
- 632 1 if (NOTIFY_LEFT_KEY == Key)
- 633 1 {
- 634 2 if (100 <= *variable)
- 635 2 return;
- 636 2
- 637 2 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 638 2 *variable = 100 > *variable ? *variable + 1 : 100;
- 639 2 else
- 640 2 *variable = 99 > *variable ? *variable + 2 : 100;
- 641 2 }
- 642 1 else
- 643 1 {
- 644 2 if (0 == *variable)
- 645 2 return;
- 646 2
- 647 2 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 648 2 *variable = 0 < *variable ? *variable - 1 : 0;
- 649 2 else
- 650 2 *variable = 1 < *variable ? *variable - 2 : 0;
- 651 2 }
- 652 1 }
- 653
- 654 void Osd_Change_Item(unsigned char Pess_Key,unsigned char Item_Num)
- 655 {
- 656 1 if (ucOSD_Item_Index0)
- 657 1 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 12
- 658 2 // Select and highlight the next/previous item
- 659 2 //OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 660 2 // , 0, 0, 14, 251, 0, 1, 0);
- 661 2 if (NOTIFY_RIGHT_KEY == Pess_Key)
- 662 2 ucOSD_Item_Index0 = (Item_Num == ucOSD_Item_Index0) ? 1 : (ucOSD_Item_Index0 + 1);
- 663 2 else
- 664 2 ucOSD_Item_Index0 = (1 == ucOSD_Item_Index0) ? Item_Num : (ucOSD_Item_Index0 - 1);
- 665 2
- 666 2 // Move window 6
- 667 2 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 668 2 , 1, 1, 14, 251, 0, 1, 25);
- 669 2 }
- 670 1 else
- 671 1 {
- 672 2 // Change to next/previous main page
- 673 2 //OSD_Window( 5, 150, 282, (54 + (ucOSD_Page_Index-1)*(29+4)), (84 + (ucOSD_Page_Index-1)*(29+4))
- 674 2 // , 0, 0, 14, 251, 0, 1, 0);
- 675 2 if (NOTIFY_RIGHT_KEY == Pess_Key)
- 676 2 ucOSD_Page_Index = GetNextPageIdx(ucOSD_Page_Index);
- 677 2 else
- 678 2 ucOSD_Page_Index = GetPrevPageIdx(ucOSD_Page_Index);
- 679 2 }
- 680 1 }
- 681
- 682 void Show_Mode(void)
- 683 {
- 684 1 unsigned int idata usStart_Addr;
- 685 1 unsigned char idata ucTemp;
- 686 1
- 687 1 OSD_Line(3, 12, 15, 0, 1); // Attribute
- 688 1 usStart_Addr = FONT_SELECT_ADDRESS;
- 689 1
- 690 1 //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
- -Row(n-1)_length
- 691 1 for(ucTemp = 1; ucTemp < 3+1; ucTemp ++)
- 692 1 usStart_Addr += Row_Info[0][ucTemp];
- 693 1
- 694 1 Data[0] = 5;
- 695 1 Data[1] = Y_INC;
- 696 1 Data[2] = OSD_ADDR_MSB_90;
- 697 1 Data[3] = (unsigned char)( (((usStart_Addr + 12) & 0x0fff) >> 8 ) | 0x50);
- 698 1 Data[4] = (unsigned char)( (usStart_Addr + 12) & 0x00ff);
- 699 1 Data[5] = 0;
- 700 1 RTDWrite(Data);
- 701 1
- 702 1
- 703 1
- 704 1 switch (ucMode_Curr)
- 705 1 {
- 706 2 /*
- 707 2 case MODE_NOSIGNAL: // NO SIGNAL
- 708 2 OSD_Line(11, 2, 24, CHINESE_T <= (stGUD1.FUNCTION & 0x07) ? 0x80 | COLOR_BLUE : COLOR_BLUE, 0);
- 709 2
- 710 2 if ((SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)) && (VGA_ONLINE != bVGA_CONNECT))
- 711 2 RTDOSDW(OSD_REMK_TABLE[0][stGUD1.FUNCTION & 0x07]);
- 712 2 else
- 713 2 RTDOSDW(OSD_REMK_TABLE[1][stGUD1.FUNCTION & 0x07]);
- 714 2 break;
- 715 2
- 716 2 case MODE_UNDEFINED0:
- 717 2 case MODE_UNDEFINED1:
- 718 2 case MODE_NOSUPPORT:
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 13
- 719 2 OSD_Line(11, 2, 24, CHINESE_T <= (stGUD1.FUNCTION & 0x07) ? 0x80 | COLOR_BLUE : COLOR_BLUE, 0);
- 720 2 RTDOSDW(OSD_REMK_TABLE[2][stGUD1.FUNCTION & 0x07]);
- 721 2 break;
- 722 2
- 723 2 case MODE_VIDEO60HZ: // NTSC 60HZ
- 724 2 OSD_Line(11, 2, 24, COLOR_BLUE, 0); // Set characters to blue
- 725 2 RTDCodeW(Remark_Mode);
- 726 2
- 727 2 switch(ucAV_Mode)
- 728 2 {
- 729 2 case 0x01: RTDCodeW(Remark_V60_0); break;
- 730 2 case 0x11: RTDCodeW(Remark_V60_1); break;
- 731 2 case 0x21: RTDCodeW(Remark_V60_2); break;
- 732 2 case 0x31: RTDCodeW(Remark_V60_3); break;
- 733 2 case 0x41: RTDCodeW(Remark_V60_4); break;
- 734 2 case 0x03: RTDCodeW(Remark_V60_5); break;
- 735 2 }
- 736 2 break;
- 737 2
- 738 2 case MODE_VIDEO50HZ: // PAL 50HZ
- 739 2 OSD_Line(11, 2, 24, COLOR_BLUE, 0); // Set characters to blue
- 740 2 RTDCodeW(Remark_Mode);
- 741 2
- 742 2 switch(ucAV_Mode)
- 743 2 {
- 744 2 case 0x02: RTDCodeW(Remark_V50_0); break;
- 745 2 case 0x12: RTDCodeW(Remark_V50_1); break;
- 746 2 case 0x22: RTDCodeW(Remark_V50_2); break;
- 747 2 case 0x32: RTDCodeW(Remark_V50_3); break;
- 748 2 case 0x03: RTDCodeW(Remark_V50_5); break;
- 749 2 }
- 750 2 break;
- 751 2
- 752 2 case MODE_YUV60HZ:
- 753 2 case MODE_YUV50HZ:
- 754 2 break;
- 755 2 */
- 756 2 default :
- 757 2 //OSD_Line(11, 2, 24, COLOR_BLUE, 0); // Set characters to blue
- 758 2
- 759 2 {
- 760 3 unsigned int usHwid;
- 761 3 unsigned char ucTemp;
- 762 3
- 763 3 usHwid = usIPH_ACT_WID;
- 764 3
- 765 3 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07))
- 766 3 {
- 767 4 if (MODE_1600x1200x60HZ == ucMode_Curr)
- 768 4 {
- 769 5 usHwid = 1600;
- 770 5 }
- 771 4 else
- 772 4 {
- 773 5 if (MODE_1600x1200x60HZ > ucMode_Curr)
- 774 5 {
- 775 6 if (MODE_1280x0960x60HZ <= ucMode_Curr)
- 776 6 usHwid = 1280;
- 777 6 else if (MODE_1152x0864x75HZ <= ucMode_Curr)
- 778 6 usHwid = 1152;
- 779 6 }
- 780 5 else
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 14
- 781 5 {
- 782 6 if (MODE_USER1600x1200 == ucMode_Curr)
- 783 6 usHwid = 1600;
- 784 6 else if (MODE_USER1280x960 <= ucMode_Curr)
- 785 6 usHwid = 1280;
- 786 6 else if (MODE_USER1152x864 <= ucMode_Curr)
- 787 6 usHwid = 1152;
- 788 6 }
- 789 5 }
- 790 4 //anson 050512
- 791 4 if ((MODE_0640x0400x70HZ == ucMode_Curr)||(MODE_0720x0400x70HZ == ucMode_Curr))
- 792 4 {
- 793 5 if(stGUD1.FUNCTION & 0x10)
- 794 5 usHwid = 640;
- 795 5 else
- 796 5 usHwid = 720;
- 797 5 }
- 798 4 }
- 799 3
- 800 3 //RTDCodeW(Remark_Mode);
- 801 3
- 802 3 Data[0] = 12;
- 803 3 Data[1] = N_INC;
- 804 3 Data[2] = OSD_DATA_92;
- 805 3
- 806 3 ucTemp = usHwid / 100;
- 807 3
- 808 3 if (10 <= ucTemp)
- 809 3 {
- 810 4 Data[3] = _1_;
- 811 4 Data[4] = ucTemp - 10 + _0_;
- 812 4 }
- 813 3 else
- 814 3 {
- 815 4 Data[3] = 0;
- 816 4 Data[4] = ucTemp + _0_;
- 817 4 }
- 818 3
- 819 3 ucTemp = usHwid - ((unsigned int)100 * ucTemp);
- 820 3
- 821 3 Data[5] = ucTemp / 10;
- 822 3
- 823 3 Data[6] = ucTemp - (10 * Data[5]) + _0_;
- 824 3 Data[5] = Data[5] + _0_;
- 825 3 Data[7] = 0x0e;
- 826 3
- 827 3 ucTemp = usIPV_ACT_LEN / 100;
- 828 3 Data[12] = usIPV_ACT_LEN - ((unsigned int)100 * ucTemp);
- 829 3
- 830 3 if (10 <= ucTemp)
- 831 3 {
- 832 4 Data[0] = 13;
- 833 4 Data[8] = _1_;
- 834 4 Data[9] = ucTemp - 10 + _0_;
- 835 4 Data[10] = Data[12] / 10;
- 836 4 Data[11] = Data[12] - (10 * Data[10]) + _0_;
- 837 4 Data[10] = Data[10] + _0_;
- 838 4 Data[12] = 0x00;
- 839 4 Data[13] = 0;
- 840 4 }
- 841 3 else
- 842 3 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 15
- 843 4 Data[8] = ucTemp + _0_;
- 844 4 Data[9] = Data[12] / 10;
- 845 4 Data[10] = Data[12] - (10 * Data[9]) + _0_;
- 846 4 Data[9] = Data[9] + _0_;
- 847 4 Data[11] = 0x00;
- 848 4 Data[12] = 0;
- 849 4 }
- 850 3
- 851 3 Data[12] = 0;
- 852 3 RTDWrite(Data);
- 853 3
- 854 3 // Show Refresh Rate
- 855 3 //RTDCodeW(Remark_Rate);
- 856 3
- 857 3 Data[0] = 7;
- 858 3 Data[1] = N_INC;
- 859 3 Data[2] = OSD_DATA_92;
- 860 3 Data[3] = ucRefresh / 10;
- 861 3 Data[4] = ucRefresh - (Data[3] * 10) + _0_;
- 862 3 Data[3] = Data[3] + _0_;
- 863 3 Data[5] = 0x27;
- 864 3 Data[6] = 0x59;
- 865 3 Data[7] = 0;
- 866 3 RTDWrite(Data);
- 867 3 if (10 <= ucTemp)
- 868 3 OSD_Line( 3, 21, 1, 0x8c, 0);
- 869 3 else
- 870 3 OSD_Line( 3, 20, 1, 0x8c, 0);
- 871 3 }
- 872 2
- 873 2 break;
- 874 2
- 875 2 }
- 876 1 }
- 877
- 878 ///////////////////////////////////////////////////////////////////////////////////////////
- 879 //anson
- 880 ///////////////////////////////////////////////////////////////////////////////////////////
- 881 void FACTORY_Key_Key(void)
- 882 {
- 883 1 ucOSD_Page_Index = PAGE_Factory;
- 884 1 ucOSD_Item_Index0 = PAGEFact_ITEM_Recall;
- 885 1 }
- 886 ///////////////////////////////////////////////////////////////////////////////////////////
- 887 ///////////////////////////////////////////////////////////////////////////////////////////
- 888
- 889 void Page0_Left_Right_Key(unsigned char Key)
- 890 {
- 891 1 // RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
- 892 1 // Although you can add ending animation here, I don't think it is necessary.
- 893 1 // RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 894 1 // RTDOSDW(OSD_Reset); // Clear OSD
- 895 1 //usOSD_Timer = 5; // 20 sec
- 896 1 if (!b_rgb_VOLUME_STATUS)
- 897 1 {
- 898 2 OSD_Position(OSD_ENABLE);
- 899 2 RTDOSDW(rgb_OSD_VOLUME);
- 900 2 RTDOSDW(strTabVOLUME_Atb[stGUD1.FUNCTION & 0x07]); //anson
- *** WARNING C214 IN LINE 900 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 901 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 902 2 b_rgb_VOLUME_STATUS = 1;
- 903 2 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 16
- 904 1 //OSD_Window( 5, 10, 136, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 905 1 if(NOTIFY_LEFT_KEY == Key)
- 906 1 {
- 907 2 if (stGUD3.VOLUME > 0x00) stGUD3.VOLUME--;
- 908 2 SetVolume();
- 909 2 Save_GUD3();
- 910 2 rgb_OSD_Slider(0, 7, 24, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
- 911 2 }
- 912 1
- 913 1 else if(NOTIFY_RIGHT_KEY == Key)
- 914 1 {
- 915 2 if (stGUD3.VOLUME < 0x1f) stGUD3.VOLUME++;
- 916 2 SetVolume();
- 917 2 Save_GUD3();
- 918 2 rgb_OSD_Slider(0, 7, 24, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
- 919 2 }
- 920 1
- 921 1
- 922 1 }
- 923
- 924 void Page0_Enter_Key(void)
- 925 {
- 926 1 if((stGUD3.TV_SETTING & 0x08) == 0x08 )//Factory Mode //anson
- 927 1 {
- 928 2 //Into Factory mode
- 929 2 ucOSD_Page_Index = PAGE_Factory;
- 930 2 ucOSD_Item_Index0 = PAGEFact_ITEM_Recall;
- 931 2 ucOSD_Item_Index1 = 0;
- 932 2 ucOSD_Item_Index2 = 0;
- 933 2 }
- 934 1 else
- 935 1 {
- 936 2 // Change to OSD Main Page 1 and Main Program will show it
- 937 2 ucOSD_Page_Index = 1;
- 938 2 ucOSD_Item_Index0 = 0;
- 939 2 ucOSD_Item_Index1 = 0;
- 940 2 ucOSD_Item_Index2 = 0;
- 941 2 b_rgb_VOLUME_STATUS = 0;
- 942 2 }
- 943 1 }
- 944
- 945 void Page0_LR_Key(void)
- 946 {
- 947 1 // Go to Hidden Function Page
- 948 1 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07))
- 949 1 {
- 950 2 ucOSD_Page_Index = 8;
- 951 2 ucOSD_Item_Index0 = 1;
- 952 2 ucOSD_Item_Index1 = 0;
- 953 2 ucOSD_Item_Index2 = 0;
- 954 2 }
- 955 1 }
- 956
- 957 void Page1_Enter_Key(void)
- 958 {
- 959 1 if (0 == ucOSD_Item_Index0)
- 960 1 {
- 961 2 if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- 962 2 {
- 963 3 // Select and highlight the first item
- 964 3 ucOSD_Item_Index0 = PAGE1_ITEM_CONTRAST;
- 965 3 ucOSD_Item_Index1 = 0;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 17
- 966 3
- 967 3 //Enable window 6 and draw it
- 968 3 //OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 969 3 // win_no, row_start, row_end,col_start,col_end, width, height, color, color_sb, gradient, gray_level, att
- -r
- 970 3 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 971 3 }
- 972 2 }
- 973 1 else
- 974 1 {
- 975 2 if (ucOSD_Item_Index1)
- 976 2 {
- 977 3 // Leave the item and reset text color
- 978 3 switch (ucOSD_Item_Index0)
- 979 3 {
- 980 4 case PAGE1_ITEM_AUTOBAL :
- 981 4 if (ucOSD_Item_Index1 == 1 ) //1 : Yes , 2 : No
- 982 4 {
- 983 5 if (ERROR_INPUT == Auto_Balance())
- 984 5 {
- 985 6 ucMode_Curr = MODE_OSDFORCE;
- 986 6 return ;
- 987 6 }
- 988 5 }
- 989 4 OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
- 990 4 break;
- 991 4
- 992 4 case PAGE1_ITEM_CONTRAST :
- 993 4 // Redraw slider and make the number become black.
- 994 4 OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 4, 14);
- 995 4 break;
- 996 4
- 997 4 case PAGE1_ITEM_BRIGHT :
- 998 4 // Redraw slider and make the number become black.
- 999 4 OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 4, 14);
- 1000 4 break;
- 1001 4
- 1002 4 case PAGE1_ITEM_COLORTEMP :
- 1003 4 //Set words color to black
- 1004 4 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x40, 2);
- 1005 4 break;
- 1006 4
- 1007 4 case PAGE1_ITEM_GAMMA :
- 1008 4 //Set words color to black
- 1009 4 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x40, 2);
- 1010 4 break;
- 1011 4 }
- 1012 3
- 1013 3 ucOSD_Item_Index1 = 0;
- 1014 3
- 1015 3 }
- 1016 2 else
- 1017 2 {
- 1018 3 if (PAGE1_ITEM_EXIT == ucOSD_Item_Index0)
- 1019 3 {
- 1020 4 // Disable highlight window 6
- 1021 4 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1022 4 , 0, 0, 14, 251, 0, 1, 0);
- 1023 4 // De-select the page item and disable the hightlight window
- 1024 4 ucOSD_Item_Index0 = 0;
- 1025 4 ucOSD_Item_Index1 = 0;
- 1026 4 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 18
- 1027 3 else if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- 1028 3 {
- 1029 4 switch (ucOSD_Item_Index0)
- 1030 4 {
- 1031 5 case PAGE1_ITEM_AUTOBAL :
- 1032 5 ucOSD_Item_Index1 = 2;
- 1033 5 OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1034 5 break;
- 1035 5
- 1036 5 case PAGE1_ITEM_CONTRAST :
- 1037 5 ucOSD_Item_Index1 = 1;
- 1038 5
- 1039 5 // Redraw slider and make the number become Red.
- 1040 5 OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 2, 14);
- 1041 5 break;
- 1042 5
- 1043 5 case PAGE1_ITEM_BRIGHT :
- 1044 5 ucOSD_Item_Index1 = 1;
- 1045 5
- 1046 5 // Redraw slider and make the number become Red.
- 1047 5 OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 2, 14);
- 1048 5 break;
- 1049 5
- 1050 5 case PAGE1_ITEM_COLORTEMP :
- 1051 5 ucOSD_Item_Index1 = ((stGUD1.INPUT_SOURCE & 0x18) >> 3) + 1;
- 1052 5
- 1053 5 //Here we can only change the color in Byte 2 for necessary words
- 1054 5 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x20, 2);
- 1055 5 break;
- 1056 5
- 1057 5 case PAGE1_ITEM_GAMMA :
- 1058 5 ucOSD_Item_Index1 = ((stGUD1.FUNCTION >> 5) & 0x03) + 1;
- 1059 5
- 1060 5 //Here we can only change the color in Byte 2 for necessary words
- 1061 5 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
- 1062 5 break;
- 1063 5
- 1064 5 case PAGE1_ITEM_RGBADJ :
- 1065 5 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1066 5 , 0, 0, 14, 251, 0, 1, 0);
- 1067 5 ucOSD_Item_Index1 = PAGE1B_ITEM_RED;
- 1068 5 ucOSD_Item_Index2 = 0;
- 1069 5 OSD_Proc_B(NOTIFY_SHOW); // Show the sub-page
- 1070 5 break;
- 1071 5 }
- 1072 4 }
- 1073 3 }
- 1074 2 }
- 1075 1 }
- 1076
- 1077 void Page1_Left_Right_Key(unsigned char Key)
- 1078 {
- 1079 1 if (ucOSD_Item_Index1)
- 1080 1 {
- 1081 2 switch (ucOSD_Item_Index0)
- 1082 2 {
- 1083 3 case PAGE1_ITEM_AUTOBAL :
- 1084 3 // ucOSD_Item_Index1 = (NOTIFY_LEFT_KEY == Key) ? 1 : 2;
- 1085 3 ucOSD_Item_Index1 = (NOTIFY_RIGHT_KEY == Key) ? 1 : 2;
- 1086 3 OSD_Line( 13, 36, 14, 0x40, 2); //Set color to black
- 1087 3 OSD_Line( 13, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1088 3 break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 19
- 1089 3
- 1090 3 case PAGE1_ITEM_CONTRAST :
- 1091 3 Bright_Contrast_Adjust(&stGUD0.CONTRAST,Key);
- 1092 3
- 1093 3 OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 2, 14);
- 1094 3
- 1095 3 #if(ANALOG_CONTRAST)
- 1096 3 if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
- 1097 3 SetADC_Gain();
- 1098 3 else
- 1099 3 Set_Bright_Contrast();
- 1100 3 #else
- Set_Bright_Contrast();
- #endif
- 1103 3
- 1104 3 Save_GUD0();
- 1105 3 break;
- 1106 3
- 1107 3 case PAGE1_ITEM_BRIGHT :
- 1108 3 Bright_Contrast_Adjust(&stGUD0.BRIGHT,Key);
- 1109 3
- 1110 3 OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 2, 14);
- 1111 3 Set_Bright_Contrast();
- 1112 3 Save_GUD0();
- 1113 3 break;
- 1114 3
- 1115 3 case PAGE1_ITEM_COLORTEMP:
- 1116 3 // if(NOTIFY_RIGHT_KEY == Key)
- 1117 3 if(NOTIFY_LEFT_KEY == Key)
- 1118 3 ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 4) ? 4 : ucOSD_Item_Index1 + 1;
- 1119 3 else
- 1120 3 ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 1) ? 1 : ucOSD_Item_Index1 - 1;
- 1121 3
- 1122 3 stGUD1.INPUT_SOURCE = (stGUD1.INPUT_SOURCE & 0xe7 ) | ((ucOSD_Item_Index1 - 1) << 3);
- 1123 3
- 1124 3 //Here we can only change the color in Byte 2 for necessary words
- 1125 3 OSD_Line( 11, 36, 20, 0x40, 2); //Set color to black
- 1126 3 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x20, 2);
- 1127 3
- 1128 3 Set_Bright_Contrast();
- 1129 3 Save_GUD1();
- 1130 3 break;
- 1131 3
- 1132 3 case PAGE1_ITEM_GAMMA :
- 1133 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1134 3 if (NOTIFY_LEFT_KEY == Key)
- 1135 3 {
- 1136 4 if (4 <= ucOSD_Item_Index1)
- 1137 4 break;
- 1138 4
- 1139 4 ucOSD_Item_Index1 = ucOSD_Item_Index1 + 1;
- 1140 4 }
- 1141 3 else
- 1142 3 {
- 1143 4 if (1 >= ucOSD_Item_Index1)
- 1144 4 break;
- 1145 4
- 1146 4 ucOSD_Item_Index1 = ucOSD_Item_Index1 - 1;
- 1147 4 }
- 1148 3
- 1149 3 stGUD1.FUNCTION = (stGUD1.FUNCTION & 0x9f) | ((ucOSD_Item_Index1 - 1) << 5);
- 1150 3 //Here we can only change the color in Byte 2 for necessary words
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 20
- 1151 3 OSD_Line( 9, 36, 14, 0x40, 2); //Set color to black
- 1152 3 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
- 1153 3
- 1154 3 Set_Gamma();
- 1155 3 Save_GUD1();
- 1156 3 break;
- 1157 3
- 1158 3 }
- 1159 2 }
- 1160 1 else
- 1161 1 {
- 1162 2 Osd_Change_Item(Key,PAGE1_ITEM_NUM);
- 1163 2
- 1164 2 }
- 1165 1 }
- 1166
- 1167 void Page1_Show(void)
- 1168 {
- 1169 1 Show_Osd_Page(0,Page1_Atb,0);
- 1170 1
- 1171 1 //Set Window 5 to select "Colour"
- 1172 1 OSD_Window( 5, 10, 136, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 1173 1
- 1174 1 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 1175 1 {
- 1176 2 //ucOSD_Item_Index0 = 0;
- 1177 2 //ucOSD_Item_Index1 = 0;
- 1178 2 }
- 1179 1
- 1180 1 OSD_Slider(5, 31, 17, stGUD0.CONTRAST, 100, 4, 14);
- 1181 1 OSD_Slider(7, 31, 17, stGUD0.BRIGHT, 100, 4, 14);
- 1182 1
- 1183 1 switch (ucOSD_Item_Index0)
- 1184 1 {
- 1185 2 case PAGE1_ITEM_CONTRAST :
- 1186 2 break;
- 1187 2
- 1188 2 case PAGE1_ITEM_BRIGHT :
- 1189 2 break;
- 1190 2
- 1191 2 case PAGE1_ITEM_GAMMA :
- 1192 2 break;
- 1193 2
- 1194 2 case PAGE1_ITEM_RGBADJ :
- 1195 2 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1196 2 , 1, 1, 14, 251, 0, 1, 25);
- 1197 2 break;
- 1198 2 }
- 1199 1 }
- 1200
- 1201 void Page1B_Enter_Key(void)
- 1202 {
- 1203 1 ucOSD_Page_Index = 7;
- 1204 1 if (PAGE1B_ITEM_EXIT == ucOSD_Item_Index1)
- 1205 1 {
- 1206 2 // De-select the page item and disable the hightlight window
- 1207 2 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1208 2 , 0, 0, 14, 251, 0, 1, 0);
- 1209 2 ucOSD_Item_Index1 = 0;
- 1210 2 ucOSD_Item_Index2 = 0;
- 1211 2 }
- 1212 1 else
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 21
- 1213 1 {
- 1214 2 if (ucOSD_Item_Index2)
- 1215 2 {
- 1216 3 ucOSD_Item_Index2 = 0; // Leave the item
- 1217 3 switch (ucOSD_Item_Index1)
- 1218 3 {
- 1219 4 case PAGE1B_ITEM_RED :
- 1220 4 OSD_Slider(5, 31, 17, stGUD0.RTD_R_CONTRAST, 100, 4, 2);
- 1221 4 break;
- 1222 4
- 1223 4 case PAGE1B_ITEM_GREEN :
- 1224 4 OSD_Slider(7, 31, 17, stGUD0.RTD_G_CONTRAST, 100, 4, 12);
- 1225 4 break;
- 1226 4
- 1227 4 case PAGE1B_ITEM_BLUE :
- 1228 4 OSD_Slider(9, 31, 17, stGUD0.RTD_B_CONTRAST, 100, 4, 3);
- 1229 4 break;
- 1230 4 }
- 1231 3 }
- 1232 2 else if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- 1233 2 {
- 1234 3 ucOSD_Item_Index2 = 1; // Enter the item
- 1235 3
- 1236 3 //Draw the selected slider
- 1237 3 switch (ucOSD_Item_Index1)
- 1238 3 {
- 1239 4 case PAGE1B_ITEM_RED :
- 1240 4 OSD_Slider(5, 31, 17, stGUD0.RTD_R_CONTRAST, 100, 2, 2);
- 1241 4 break;
- 1242 4
- 1243 4 case PAGE1B_ITEM_GREEN :
- 1244 4 OSD_Slider(7, 31, 17, stGUD0.RTD_G_CONTRAST, 100, 12, 12);
- 1245 4 break;
- 1246 4
- 1247 4 case PAGE1B_ITEM_BLUE :
- 1248 4 OSD_Slider(9, 31, 17, stGUD0.RTD_B_CONTRAST, 100, 3, 3);
- 1249 4 break;
- 1250 4 }
- 1251 3 }
- 1252 2 }
- 1253 1 ucOSD_Page_Index = 1;
- 1254 1 }
- 1255
- 1256 void Page1B_Left_Right_Key(unsigned char Key)
- 1257 {
- 1258 1 ucOSD_Page_Index = 7;
- 1259 1 if (ucOSD_Item_Index2)
- 1260 1 {
- 1261 2 switch (ucOSD_Item_Index1)
- 1262 2 {
- 1263 3 case PAGE1B_ITEM_RED :
- 1264 3 Bright_Contrast_Adjust(&stGUD0.RTD_R_CONTRAST,Key);
- 1265 3
- 1266 3 OSD_Slider(5, 31, 17, stGUD0.RTD_R_CONTRAST, 100, 2, 2);
- 1267 3 break;
- 1268 3
- 1269 3 case PAGE1B_ITEM_GREEN :
- 1270 3 Bright_Contrast_Adjust(&stGUD0.RTD_G_CONTRAST,Key);
- 1271 3
- 1272 3 OSD_Slider(7, 31, 17, stGUD0.RTD_G_CONTRAST, 100, 12, 12);
- 1273 3 break;
- 1274 3
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 22
- 1275 3 case PAGE1B_ITEM_BLUE :
- 1276 3 Bright_Contrast_Adjust(&stGUD0.RTD_B_CONTRAST,Key);
- 1277 3
- 1278 3 OSD_Slider(9, 31, 17, stGUD0.RTD_B_CONTRAST, 100, 3, 3);
- 1279 3 break;
- 1280 3 }
- 1281 2
- 1282 2 Set_Bright_Contrast();
- 1283 2 Save_GUD0();
- 1284 2
- 1285 2 }
- 1286 1 else
- 1287 1 {
- 1288 2 // Select and highlight the next/previous item
- 1289 2 if (NOTIFY_RIGHT_KEY == Key)
- 1290 2 ucOSD_Item_Index1 = (PAGE1B_ITEM_NUM == ucOSD_Item_Index1) ? 1 : (ucOSD_Item_Index1 + 1);
- 1291 2 else
- 1292 2 ucOSD_Item_Index1 = (1 == ucOSD_Item_Index1) ? PAGE1B_ITEM_NUM : (ucOSD_Item_Index1 - 1);
- 1293 2
- 1294 2 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index1-1)*(29+4)), (84 + (ucOSD_Item_Index1-1)*(29+4))
- 1295 2 , 1, 1, 14, 251, 0, 1, 25);
- 1296 2 }
- 1297 1 ucOSD_Page_Index = 1;
- 1298 1 }
- 1299
- 1300 void Page1B_Show(void)
- 1301 {
- 1302 1 Show_Osd_Page(0,Page7_Atb,6);
- 1303 1
- 1304 1 // Set window 6 to Highlight the select item
- 1305 1 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 1306 1
- 1307 1 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 1308 1 ucOSD_Item_Index2 = 0;
- 1309 1
- 1310 1 if (0 == ucOSD_Item_Index2)
- 1311 1 {
- 1312 2 ucOSD_Page_Index = 7;
- 1313 2 OSD_Slider(5, 31, 17, stGUD0.RTD_R_CONTRAST, 100, 4, 2);
- 1314 2 OSD_Slider(7, 31, 17, stGUD0.RTD_G_CONTRAST, 100, 4, 12);
- 1315 2 OSD_Slider(9, 31, 17, stGUD0.RTD_B_CONTRAST, 100, 4, 3);
- 1316 2 ucOSD_Page_Index = 1;
- 1317 2 }
- 1318 1 else
- 1319 1 {
- 1320 2 //Set the active slider (Red, Greed, Blue)
- 1321 2 /*
- 1322 2 OSD_Slider(11, 2, 20,
- 1323 2 (PAGE1B_ITEM_RED == ucOSD_Item_Index1) ? stGUD0.RTD_R_CONTRAST
- 1324 2 : (PAGE1B_ITEM_GREEN == ucOSD_Item_Index1) ? stGUD0.RTD_G_CONTRAST
- 1325 2 : stGUD0.RTD_B_CONTRAST, 100, 0x61);
- 1326 2
- 1327 2 */
- 1328 2 }
- 1329 1 }
- 1330
- 1331 void Page2_Enter_Key()
- 1332 {
- 1333 1 if (0 == ucOSD_Item_Index0)
- 1334 1 {
- 1335 2 if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- 1336 2 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 23
- 1337 3 // Select and highlight the first item
- 1338 3 ucOSD_Item_Index0 = PAGE2_ITEM_POSH;
- 1339 3 ucOSD_Item_Index1 = 0;
- 1340 3
- 1341 3 //Enable Window 6 and Draw it
- 1342 3 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 1343 3 }
- 1344 2 }
- 1345 1 else
- 1346 1 {
- 1347 2 if (ucOSD_Item_Index1)
- 1348 2 {
- 1349 3 switch (ucOSD_Item_Index0)
- 1350 3 {
- 1351 4 case PAGE2_ITEM_POSH :
- 1352 4 OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 4, 14);
- 1353 4 break;
- 1354 4
- 1355 4 case PAGE2_ITEM_POSV :
- 1356 4 OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margin)
- -, 100, 4, 14);
- 1357 4 break;
- 1358 4
- 1359 4 case PAGE2_ITEM_PHASE :
- 1360 4 #if(MORE_PHASE)
- OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 4, 14);
- #else
- 1363 4 OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 4, 14);
- 1364 4 #endif
- 1365 4 break;
- 1366 4
- 1367 4 case PAGE2_ITEM_CLOCK :
- 1368 4
- 1369 4 #if(ALIGN_LEFT == CLOCK_ALIGN)
- 1370 4 OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 4, 14);
- 1371 4 #else
- OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 4, 14);
- #endif
- 1374 4 break;
- 1375 4
- 1376 4 case PAGE2_ITEM_SHARP :
- 1377 4 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x40, 2);
- 1378 4 break;
- 1379 4
- 1380 4 }
- 1381 3
- 1382 3 ucOSD_Item_Index1 = 0; // Leave the item
- 1383 3
- 1384 3 }
- 1385 2 else
- 1386 2 {
- 1387 3 if (PAGE2_ITEM_EXIT == ucOSD_Item_Index0)
- 1388 3 {
- 1389 4 // Disable Window 6 and Draw it
- 1390 4 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1391 4 , 0, 0, 14, 251, 0, 1, 0);
- 1392 4 // De-select the page item and disable the hightlight window
- 1393 4 ucOSD_Item_Index0 = 0;
- 1394 4 ucOSD_Item_Index1 = 0;
- 1395 4 }
- 1396 3 else if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- 1397 3 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 24
- 1398 4 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07) || PAGE2_ITEM_SHARP == ucOSD_Item_Index0)
- 1399 4 {
- 1400 5 switch (ucOSD_Item_Index0)
- 1401 5 {
- 1402 6 case PAGE2_ITEM_POSH :
- 1403 6 ucOSD_Item_Index1 = 1; // Enter the item
- 1404 6 OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 2, 14);
- 1405 6 break;
- 1406 6
- 1407 6 case PAGE2_ITEM_POSV :
- 1408 6 ucOSD_Item_Index1 = 1; // Enter the item
- 1409 6 OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margi
- -n), 100, 2, 14);
- 1410 6 break;
- 1411 6
- 1412 6 case PAGE2_ITEM_PHASE :
- 1413 6 ucOSD_Item_Index1 = 1; // Enter the item
- 1414 6 #if(MORE_PHASE)
- OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 2, 14);
- #else
- 1417 6 OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 2, 14);
- 1418 6 #endif
- 1419 6 break;
- 1420 6
- 1421 6 case PAGE2_ITEM_CLOCK :
- 1422 6 ucOSD_Item_Index1 = 1; // Enter the item
- 1423 6 #if(ALIGN_LEFT == CLOCK_ALIGN)
- 1424 6 OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 2, 14);
- 1425 6 #else
- OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 2, 14);
- #endif
- 1428 6 break;
- 1429 6
- 1430 6 case PAGE2_ITEM_SHARP :
- 1431 6 ucOSD_Item_Index1 = stGUD1.FILTER + 1;
- 1432 6 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
- 1433 6 break;
- 1434 6
- 1435 6 }
- 1436 5 }
- 1437 4 }
- 1438 3 }
- 1439 2 }
- 1440 1 }
- 1441
- 1442 void Page2_Left_Right_Key(unsigned char Key)
- 1443 {
- 1444 1 if (ucOSD_Item_Index1)
- 1445 1 {
- 1446 2 switch (ucOSD_Item_Index0)
- 1447 2 {
- 1448 3 case PAGE2_ITEM_POSH :
- 1449 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1450 3 if (NOTIFY_LEFT_KEY == Key)
- 1451 3 {
- 1452 4 if (ucH_Min_Margin >= stMUD.H_POSITION)
- 1453 4 break;
- 1454 4
- 1455 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 1456 4 stMUD.H_POSITION = stMUD.H_POSITION > ucH_Min_Margin ? stMUD.H_POSITION - 1 : ucH_Min_Margin;
- 1457 4 else
- 1458 4 stMUD.H_POSITION = stMUD.H_POSITION > (ucH_Min_Margin + 2) ? stMUD.H_POSITION - 3 : ucH_Min_Margi
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 25
- -n;
- 1459 4 }
- 1460 3 else
- 1461 3 {
- 1462 4 if (ucH_Max_Margin <= stMUD.H_POSITION)
- 1463 4 break;
- 1464 4
- 1465 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 1466 4 stMUD.H_POSITION = stMUD.H_POSITION < ucH_Max_Margin ? stMUD.H_POSITION + 1 : ucH_Max_Margin;
- 1467 4 else
- 1468 4 stMUD.H_POSITION = stMUD.H_POSITION < (ucH_Max_Margin - 2) ? stMUD.H_POSITION + 3 : ucH_Max_Margi
- -n;
- 1469 4 }
- 1470 3
- 1471 3 OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 2, 14);
- 1472 3 Set_H_Position();
- 1473 3 Set_Phase(stMUD.PHASE);
- 1474 3 Save_MUD(ucMode_Curr);
- 1475 3 break;
- 1476 3
- 1477 3 case PAGE2_ITEM_POSV :
- 1478 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1479 3 if (NOTIFY_LEFT_KEY == Key)
- 1480 3 {
- 1481 4 if ((unsigned int)256 - ucV_Min_Margin <= stMUD.V_POSITION)
- 1482 4 break;
- 1483 4
- 1484 4 stMUD.V_POSITION += 1;
- 1485 4 }
- 1486 3 else
- 1487 3 {
- 1488 4 if (ucV_Min_Margin >= stMUD.V_POSITION)
- 1489 4 break;
- 1490 4
- 1491 4 stMUD.V_POSITION -= 1;
- 1492 4 }
- 1493 3
- 1494 3 OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margin),
- - 100, 2, 14);
- 1495 3 Set_V_Position();
- 1496 3 Save_MUD(ucMode_Curr);
- 1497 3 break;
- 1498 3
- 1499 3 case PAGE2_ITEM_PHASE :
- 1500 3 #if(MORE_PHASE)
- // if (NOTIFY_RIGHT_KEY == Key)
- if (NOTIFY_LEFT_KEY == Key)
- {
- if (0x7f <= stMUD.PHASE)
- break;
-
- stMUD.PHASE += 1;
- }
- else
- {
- if (0x00 == stMUD.PHASE)
- break;
-
- stMUD.PHASE -= 1;
- }
-
- OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 2, 14);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 26
- #else
- 1519 3 stMUD.PHASE &= 0x7c;
- 1520 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1521 3 if (NOTIFY_LEFT_KEY == Key)
- 1522 3 {
- 1523 4 if (0x7c <= stMUD.PHASE)
- 1524 4 break;
- 1525 4
- 1526 4 stMUD.PHASE += 4;
- 1527 4 }
- 1528 3 else
- 1529 3 {
- 1530 4 if (0x00 == stMUD.PHASE)
- 1531 4 break;
- 1532 4
- 1533 4 stMUD.PHASE -= 4;
- 1534 4 }
- 1535 3
- 1536 3 OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 2, 14);
- 1537 3 #endif
- 1538 3 Set_Phase(stMUD.PHASE);
- 1539 3 Save_MUD(ucMode_Curr);
- 1540 3 break;
- 1541 3
- 1542 3 case PAGE2_ITEM_CLOCK :
- 1543 3 #if(ALIGN_LEFT == CLOCK_ALIGN)
- 1544 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1545 3 if (NOTIFY_LEFT_KEY == Key)
- 1546 3 {
- 1547 4 if (178 <= stMUD.CLOCK)
- 1548 4 break;
- 1549 4
- 1550 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 1551 4 stMUD.CLOCK = (177 >= stMUD.CLOCK) ? stMUD.CLOCK + 1 : 178;
- 1552 4 else
- 1553 4 stMUD.CLOCK = (176 >= stMUD.CLOCK) ? stMUD.CLOCK + 2 : 178;
- 1554 4
- 1555 4 Set_Clock();
- 1556 4 Set_H_Position();
- 1557 4 }
- 1558 3 else
- 1559 3 {
- 1560 4 if (78 >= stMUD.CLOCK)
- 1561 4 break;
- 1562 4
- 1563 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 1564 4 stMUD.CLOCK = (79 <= stMUD.CLOCK) ? stMUD.CLOCK - 1 : 78;
- 1565 4 else
- 1566 4 stMUD.CLOCK = (80 <= stMUD.CLOCK) ? stMUD.CLOCK - 2 : 78;
- 1567 4
- 1568 4 Set_H_Position();
- 1569 4 Set_Clock();
- 1570 4 }
- 1571 3
- 1572 3 OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 2, 14);
- 1573 3
- 1574 3 #else
- // if (NOTIFY_RIGHT_KEY == Key)
- if (NOTIFY_LEFT_KEY == Key)
- {
- if (228 <= stMUD.CLOCK)
- break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 27
-
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stMUD.CLOCK = (227 >= stMUD.CLOCK) ? stMUD.CLOCK + 1 : 228;
- else
- stMUD.CLOCK = (226 >= stMUD.CLOCK) ? stMUD.CLOCK + 2 : 228;
-
- Set_Clock();
- Set_H_Position();
- }
- else
- {
- if (28 >= stMUD.CLOCK)
- break;
-
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stMUD.CLOCK = (29 <= stMUD.CLOCK) ? stMUD.CLOCK - 1 : 28;
- else
- stMUD.CLOCK = (30 <= stMUD.CLOCK) ? stMUD.CLOCK - 2 : 28;
-
- Set_H_Position();
- Set_Clock();
- }
-
- OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 2, 14);
- #endif
- 1605 3 Save_MUD(ucMode_Curr);
- 1606 3 break;
- 1607 3
- 1608 3 case PAGE2_ITEM_SHARP :
- 1609 3 // if (NOTIFY_RIGHT_KEY == Key)
- 1610 3 if (NOTIFY_LEFT_KEY == Key)
- 1611 3 {
- 1612 4 if (5 <= ucOSD_Item_Index1)
- 1613 4 break;
- 1614 4
- 1615 4 ucOSD_Item_Index1 = ucOSD_Item_Index1 + 1;
- 1616 4 }
- 1617 3 else
- 1618 3 {
- 1619 4 if (1 >= ucOSD_Item_Index1)
- 1620 4 break;
- 1621 4
- 1622 4 ucOSD_Item_Index1 = ucOSD_Item_Index1 - 1;
- 1623 4 }
- 1624 3
- 1625 3 OSD_Line( 9, 36, 14, 0x40, 2); //Set color to black
- 1626 3 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
- 1627 3
- 1628 3 stGUD1.FILTER = ucOSD_Item_Index1 - 1;
- 1629 3 Sharpness();
- 1630 3
- 1631 3 if((usIPH_ACT_WID == 1280) && (DISP_SIZE == DISP_1280x1024) && (stGUD1.FILTER == 0x02))
- 1632 3 RTDSetBit(SCALE_CTRL_15, 0xff, 0x01); // Turn on H scale-up
- 1633 3 else if((usIPH_ACT_WID == 1280) && (DISP_SIZE == DISP_1280x1024) && (stGUD1.FILTER != 0x02))
- 1634 3 RTDSetBit(SCALE_CTRL_15, 0xfe, 0x00); // Turn off H scale-up
- 1635 3
- 1636 3 Save_GUD1();
- 1637 3 break;
- 1638 3
- 1639 3
- 1640 3 }
- 1641 2 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 28
- 1642 1 else
- 1643 1 {
- 1644 2 Osd_Change_Item(Key,PAGE2_ITEM_NUM);
- 1645 2 }
- 1646 1 }
- 1647
- 1648
- 1649 void Page2_Show()
- 1650 {
- 1651 1 Show_Osd_Page(1,Page2_Atb,1);
- 1652 1
- 1653 1 //Set Window 5 to select "Picture"
- 1654 1 OSD_Window( 5, 10, 136, 87, 117, 1, 1, 14, 251, 0, 1, 25);
- 1655 1
- 1656 1 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 1657 1 {
- 1658 2 ucOSD_Item_Index0 = 0;
- 1659 2 ucOSD_Item_Index1 = 0;
- 1660 2 }
- 1661 1
- 1662 1 if (SOURCE_VGA != (stGUD1.INPUT_SOURCE & 0x07) && PAGE2_ITEM_SHARP != ucOSD_Item_Index0)
- 1663 1 {
- 1664 2 ucOSD_Item_Index1 = 0;
- 1665 2 }
- 1666 1
- 1667 1 if (0 == ucOSD_Item_Index1)
- 1668 1 {
- 1669 2 OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 4, 14);
- 1670 2 OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margin), 1
- -00, 4, 14);
- 1671 2 #if(MORE_PHASE)
- OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 4, 14);
- #else
- 1674 2 OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 4, 14);
- 1675 2 #endif
- 1676 2
- 1677 2 #if(ALIGN_LEFT == CLOCK_ALIGN)
- 1678 2 OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 4, 14);
- 1679 2 #else
- OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 4, 14);
- #endif
- 1682 2 }
- 1683 1 else
- 1684 1 {
- 1685 2 switch (ucOSD_Item_Index0)
- 1686 2 {
- 1687 3 case PAGE2_ITEM_POSH :
- 1688 3 break;
- 1689 3
- 1690 3 case PAGE2_ITEM_POSV :
- 1691 3 break;
- 1692 3
- 1693 3 case PAGE2_ITEM_PHASE :
- 1694 3 break;
- 1695 3
- 1696 3 case PAGE2_ITEM_CLOCK :
- 1697 3 break;
- 1698 3
- 1699 3 case PAGE2_ITEM_SHARP :
- 1700 3 break;
- 1701 3 }
- 1702 2 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 29
- 1703 1 }
- 1704
- 1705 /*
- 1706 bit Page3_Enter_Key(void)
- 1707 {
- 1708 if (0 == ucOSD_Item_Index0)
- 1709 {
- 1710 if ((MODE_NOSIGNAL != ucMode_Curr) && (MODE_NOSUPPORT != ucMode_Curr) && (SOURCE_VGA == (stGUD1.INPUT_SO
- -URCE & 0x07)))
- 1711 {
- 1712 // Select and highlight the first item
- 1713 ucOSD_Item_Index0 = PAGE3_ITEM_AUTOCFG;
- 1714 ucOSD_Item_Index1 = 0;
- 1715
- 1716 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 1717 }
- 1718 }
- 1719 else
- 1720 {
- 1721 if (PAGE3_ITEM_EXIT == ucOSD_Item_Index0)
- 1722 {
- 1723 // Disable highlight window
- 1724 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1725 , 0, 0, 14, 251, 0, 1, 0);
- 1726 // De-select the page item and disable the hightlight window
- 1727 ucOSD_Item_Index0 = 0;
- 1728 ucOSD_Item_Index1 = 0;
- 1729 }
- 1730 else if (ucOSD_Item_Index1)
- 1731 {
- 1732 if (1 == ucOSD_Item_Index1)
- 1733 {
- 1734 switch (ucOSD_Item_Index0)
- 1735 {
- 1736 case PAGE3_ITEM_AUTOCFG :
- 1737 if (MODE_0640x0350x70HZ <= ucMode_Curr && MODE_0720x0400x70HZ >= ucMode_Curr)
- 1738 {
- 1739 unsigned char ucResult;
- 1740
- 1741 stMUD.CLOCK = 128;
- 1742
- 1743 Set_H_Position();
- 1744 Set_Clock();
- 1745 Save_MUD(ucMode_Curr);
- 1746
- 1747 ucResult = Auto_Phase();
- 1748
- 1749 if (ERROR_SUCCEED == ucResult)
- 1750 {
- 1751 ucResult = Auto_Position();
- 1752 }
- 1753
- 1754 if (ERROR_INPUT == ucResult)
- 1755 {
- 1756 ucMode_Curr = MODE_OSDFORCE;
- 1757 return 0;
- 1758 }
- 1759 }
- 1760 else
- 1761 {
- 1762 if (ERROR_INPUT == Auto_Config())
- 1763 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 30
- 1764 ucMode_Curr = MODE_OSDFORCE;
- 1765 return 0;
- 1766 }
- 1767 }
- 1768
- 1769 OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
- 1770 break;
- 1771
- 1772 case PAGE3_ITEM_AUTOBAL :
- 1773 if (ERROR_INPUT == Auto_Balance())
- 1774 {
- 1775 ucMode_Curr = MODE_OSDFORCE;
- 1776 return 0;
- 1777 }
- 1778
- 1779 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
- 1780 break;
- 1781
- 1782 }
- 1783 }
- 1784
- 1785 switch (ucOSD_Item_Index0)
- 1786 {
- 1787 case PAGE3_ITEM_AUTOCFG :
- 1788 OSD_Line( 5, 36, 14, 0x40, 2); //Set color to black
- 1789 break;
- 1790 case PAGE3_ITEM_AUTOBAL :
- 1791 OSD_Line( 7, 36, 14, 0x40, 2); //Set color to black
- 1792 break;
- 1793 }
- 1794 ucOSD_Item_Index1 = 0; // Leave the item
- 1795 //Show_Mode();
- 1796 }
- 1797 else
- 1798 {
- 1799 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 1800 return 1;//break;
- 1801
- 1802 ucOSD_Item_Index1 = 2; // Enter the item, default NO
- 1803
- 1804 switch (ucOSD_Item_Index0)
- 1805 {
- 1806 case PAGE3_ITEM_AUTOCFG :
- 1807 OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1808 break;
- 1809 case PAGE3_ITEM_AUTOBAL :
- 1810 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1811 break;
- 1812 }
- 1813 }
- 1814 }
- 1815 }
- 1816 */
- 1817
- 1818 /*
- 1819 void Page3_Left_Right_Key(unsigned char Key)
- 1820 {
- 1821 if (ucOSD_Item_Index1)
- 1822 {
- 1823 ucOSD_Item_Index1 = (NOTIFY_LEFT_KEY == Key) ? 1 : 2;
- 1824
- 1825 switch (ucOSD_Item_Index0)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 31
- 1826 {
- 1827 case PAGE3_ITEM_AUTOCFG :
- 1828 OSD_Line( 5, 36, 14, 0x40, 2); //Set color to black
- 1829 OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1830 break;
- 1831 case PAGE3_ITEM_AUTOBAL :
- 1832 OSD_Line( 7, 36, 14, 0x40, 2); //Set color to black
- 1833 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 1834 break;
- 1835 }
- 1836 }
- 1837 else
- 1838 {
- 1839 Osd_Change_Item(Key,PAGE3_ITEM_NUM);
- 1840 }
- 1841 }
- 1842
- 1843 void Page3_Show(void)
- 1844 {
- 1845 Show_Osd_Page(2,Page3_Atb,2);
- 1846
- 1847 //Set Window 5 to select "Functuin"
- 1848 OSD_Window( 5, 10, 136, 120, 150, 1, 1, 14, 251, 0, 1, 25);
- 1849
- 1850 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 1851 {
- 1852 ucOSD_Item_Index0 = 0;
- 1853 ucOSD_Item_Index1 = 0;
- 1854 }
- 1855 }
- 1856 */
- 1857
- 1858 void Page4_Enter_Key(void)
- 1859 {
- 1860 1 if (0 == ucOSD_Item_Index0)
- 1861 1 {
- 1862 2 // Select and highlight the first item
- 1863 2 ucOSD_Item_Index0 = PAGE4_ITEM_LANGUAGE;
- 1864 2 ucOSD_Item_Index1 = 0;
- 1865 2
- 1866 2 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 1867 2 }
- 1868 1 else
- 1869 1 {
- 1870 2 switch (ucOSD_Item_Index0)
- 1871 2 {
- 1872 3 case PAGE4_ITEM_LANGUAGE :
- 1873 3 ucOSD_Item_Index1 = (stGUD1.FUNCTION & 0x07) + 1;
- 1874 3 OSD_Proc_B(NOTIFY_SHOW); // Show the sub-page
- 1875 3 break;
- 1876 3
- 1877 3 case PAGE4_ITEM_OSDH :
- 1878 3 if (ucOSD_Item_Index1)
- 1879 3 {
- 1880 4 ucOSD_Item_Index1 = 0; // Leave the item
- 1881 4 Get_OSD_Margin();
- 1882 4 OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 4, 14);
- 1883 4 }
- 1884 3 else
- 1885 3 {
- 1886 4 ucOSD_Item_Index1 = 1; // Enter the item, show slider
- 1887 4 Get_OSD_Margin();
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 32
- 1888 4 OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 2, 14);
- 1889 4 }
- 1890 3 break;
- 1891 3
- 1892 3 case PAGE4_ITEM_OSDV :
- 1893 3 if (ucOSD_Item_Index1)
- 1894 3 {
- 1895 4 ucOSD_Item_Index1 = 0; // Leave the item
- 1896 4 Get_OSD_Margin();
- 1897 4 OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 4, 14);
- 1898 4 }
- 1899 3 else
- 1900 3 {
- 1901 4 ucOSD_Item_Index1 = 1; // Enter the item, slider
- 1902 4 Get_OSD_Margin();
- 1903 4 OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 2, 14);
- 1904 4 }
- 1905 3 break;
- 1906 3
- 1907 3 case PAGE4_ITEM_TIMEOUT :
- 1908 3 if(ucOSD_Item_Index2)
- 1909 3 {
- 1910 4 ucOSD_Item_Index2 = 0;
- 1911 4 ucOSD_Item_Index1 = 0; // Leave the item
- 1912 4
- 1913 4 //Redraw the ON/OFF words
- 1914 4 OSD_Line( 11, 31, 3, 0x40, 2);
- 1915 4 OSD_Line( 11, 31, 3, 0x00, 1);
- 1916 4
- 1917 4 OSD_Line( 11, 36, 12, 0x8a, 0);
- 1918 4 OSD_Line( 11, 36, 12, 0x00, 1);
- 1919 4 switch( stGUD1.FUNCTION & 0x07 )
- 1920 4 {
- 1921 5 case 5:
- 1922 5 OSD_Line( 11, 37, 1, 0x8c, 0);
- 1923 5 OSD_Line( 11, 37, 1, 0xb3, 1);
- 1924 5 OSD_Line( 11, 43, 1, 0x8c, 0);
- 1925 5 OSD_Line( 11, 43, 1, 0xc9, 1);
- 1926 5 break;
- 1927 5
- 1928 5 case 6:
- 1929 5 OSD_Line( 11, 37, 1, 0x8c, 0);
- 1930 5 OSD_Line( 11, 37, 1, 0xdb, 1);
- 1931 5 OSD_Line( 11, 43, 1, 0x8c, 0);
- 1932 5 OSD_Line( 11, 43, 1, 0xe5, 1);
- 1933 5 break;
- 1934 5
- 1935 5 case 7:
- 1936 5 OSD_Line( 11, 37, 1, 0x8c, 0);
- 1937 5 OSD_Line( 11, 37, 1, 0x9b, 1);
- 1938 5 OSD_Line( 11, 43, 1, 0x8c, 0);
- 1939 5 OSD_Line( 11, 43, 1, 0x9c, 1);
- 1940 5 break;
- 1941 5
- 1942 5 default:
- 1943 5 OSD_Line( 11, 37, 1, 0x2e, 1);
- 1944 5 OSD_Line( 11, 38, 1, 0x2d, 1);
- 1945 5 OSD_Line( 11, 43, 1, 0x2e, 1);
- 1946 5 OSD_Line( 11, 44, 2, 0x25, 1);
- 1947 5 break;
- 1948 5
- 1949 5 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 33
- 1950 4 OSD_Line( 11, 36, 12, 0x40, 2);
- 1951 4
- 1952 4 OSD_Line( 11, 35, 1, 0x00, 1);
- 1953 4 OSD_Line( 11, 48, 1, 0x00, 1);
- 1954 4
- 1955 4 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 1956 4 , 1, 1, 14, 251, 0, 1, 25);
- 1957 4
- 1958 4 }
- 1959 3 else if (ucOSD_Item_Index1)
- 1960 3 {
- 1961 4 if(ucOSD_Item_Index1 == 2)
- 1962 4 {
- 1963 5 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(6+1), 3, 0x40, 2);
- 1964 5 ucOSD_Item_Index1 = 0;
- 1965 5 }
- 1966 4 else
- 1967 4 {
- 1968 5 ucOSD_Item_Index2 = 1;
- 1969 5 if(stGUD1.OSD_TIMEOUT < 5)
- 1970 5 {
- 1971 6 stGUD1.OSD_TIMEOUT = 20; //reset to 20 seconds
- 1972 6 usOSD_Timer = 1020; //20*51
- 1973 6 Save_GUD1();
- 1974 6 }
- 1975 5
- 1976 5 OSD_Line( 11, 36, 12, 0xe0, 2);
- 1977 5 OSD_Line( 11, 36, 12, 0x8c, 0);
- 1978 5 OSD_Line( 11, 35, 1, 0x40, 2);
- 1979 5 OSD_Line( 11, 35, 1, 0x0d, 1);
- 1980 5 OSD_Line( 11, 48, 1, 0x40, 2);
- 1981 5 OSD_Line( 11, 48, 1, 0x0c, 1);
- 1982 5 OSD_Slider(11, 31, 17, stGUD1.OSD_TIMEOUT, 60, 2, 14);
- 1983 5 }
- 1984 4 }
- 1985 3 else
- 1986 3 {
- 1987 4 ucOSD_Item_Index1 = stGUD1.OSD_TIMEOUT ? 1 : 2;
- 1988 4 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(6+1), 3, 0x20, 2);
- 1989 4 }
- 1990 3 break;
- 1991 3
- 1992 3 case PAGE4_ITEM_TRANSLU :
- 1993 3 if (ucOSD_Item_Index1)
- 1994 3 {
- 1995 4 ucOSD_Item_Index1 = 0; // Leave the item
- 1996 4 OSD_Slider(13, 31, 17, (stGUD1.INPUT_SOURCE & 0xe0) >> 5, 7, 4, 14);
- 1997 4 }
- 1998 3 else
- 1999 3 {
- 2000 4 ucOSD_Item_Index1 = 1;
- 2001 4 OSD_Slider(13, 31, 17, (stGUD1.INPUT_SOURCE & 0xe0) >> 5, 7, 2, 14);
- 2002 4 }
- 2003 3 break;
- 2004 3
- 2005 3 case PAGE4_ITEM_EXIT :
- 2006 3 // Disable highlight window 6
- 2007 3 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 2008 3 , 0, 0, 14, 251, 0, 1, 0);
- 2009 3 // De-select the page item and disable the hightlight window
- 2010 3 ucOSD_Item_Index0 = 0;
- 2011 3 ucOSD_Item_Index1 = 0;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 34
- 2012 3
- 2013 3 break;
- 2014 3
- 2015 3 }
- 2016 2 }
- 2017 1 }
- 2018
- 2019 void Page4_Left_Right_Key(unsigned char Key)
- 2020 {
- 2021 1 if (ucOSD_Item_Index1)
- 2022 1 {
- 2023 2 switch (ucOSD_Item_Index0)
- 2024 2 {
- 2025 3 case PAGE4_ITEM_OSDH :
- 2026 3 Get_OSD_Margin();
- 2027 3 // if (NOTIFY_RIGHT_KEY == Key)
- 2028 3 if (NOTIFY_LEFT_KEY == Key)
- 2029 3 {
- 2030 4 if (Data[1] <= stGUD1.OSD_POSH)
- 2031 4 break;
- 2032 4
- 2033 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 2034 4 stGUD1.OSD_POSH = Data[1] > stGUD1.OSD_POSH ? stGUD1.OSD_POSH + 1 : Data[1];
- 2035 4 else
- 2036 4 stGUD1.OSD_POSH = (Data[1] - 1) > stGUD1.OSD_POSH ? stGUD1.OSD_POSH + 2 : Data[1];
- 2037 4 }
- 2038 3 else
- 2039 3 {
- 2040 4 if (Data[0] >= stGUD1.OSD_POSH)
- 2041 4 break;
- 2042 4
- 2043 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 2044 4 stGUD1.OSD_POSH = Data[0] < stGUD1.OSD_POSH ? stGUD1.OSD_POSH - 1 : Data[0];
- 2045 4 else
- 2046 4 stGUD1.OSD_POSH = (Data[0] + 1) < stGUD1.OSD_POSH ? stGUD1.OSD_POSH - 2 : Data[0];
- 2047 4 }
- 2048 3
- 2049 3 OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 2, 14);
- 2050 3 OSD_Position(OSD_ENABLE);
- 2051 3 Save_GUD1();
- 2052 3 break;
- 2053 3
- 2054 3 case PAGE4_ITEM_OSDV :
- 2055 3 Get_OSD_Margin();
- 2056 3 // if (NOTIFY_RIGHT_KEY == Key)
- 2057 3 if (NOTIFY_LEFT_KEY == Key)
- 2058 3 {
- 2059 4
- 2060 4 if (Data[3] <= stGUD1.OSD_POSV)
- 2061 4 break;
- 2062 4
- 2063 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 2064 4 stGUD1.OSD_POSV = Data[3] > stGUD1.OSD_POSV ? stGUD1.OSD_POSV + 1 : Data[3];
- 2065 4 else
- 2066 4 stGUD1.OSD_POSV = (Data[3] - 1) > stGUD1.OSD_POSV ? stGUD1.OSD_POSV + 2 : Data[3];
- 2067 4
- 2068 4 }
- 2069 3 else
- 2070 3 {
- 2071 4
- 2072 4 if (Data[2] >= stGUD1.OSD_POSV)
- 2073 4 break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 35
- 2074 4
- 2075 4 if (KEY_TURBO_ENABLE > ucKey_Issued)
- 2076 4 stGUD1.OSD_POSV = Data[2] < stGUD1.OSD_POSV ? stGUD1.OSD_POSV - 1 : Data[2];
- 2077 4 else
- 2078 4 stGUD1.OSD_POSV = (Data[2] + 1) < stGUD1.OSD_POSV ? stGUD1.OSD_POSV - 2 : Data[2];
- 2079 4
- 2080 4 }
- 2081 3
- 2082 3 OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 2, 14);
- 2083 3 OSD_Position(OSD_ENABLE);
- 2084 3 Save_GUD1();
- 2085 3 break;
- 2086 3
- 2087 3 case PAGE4_ITEM_TIMEOUT :
- 2088 3 // if (NOTIFY_RIGHT_KEY == Key)
- 2089 3 if (NOTIFY_LEFT_KEY == Key)
- 2090 3 {
- 2091 4 if(ucOSD_Item_Index2)
- 2092 4 {
- 2093 5 stGUD1.OSD_TIMEOUT = (stGUD1.OSD_TIMEOUT == 60) ? 60 : stGUD1.OSD_TIMEOUT + 1;
- 2094 5 OSD_Slider(11, 31, 17, stGUD1.OSD_TIMEOUT, 60, 2, 14);
- 2095 5 }
- 2096 4 else if(ucOSD_Item_Index1)
- 2097 4 {
- 2098 5 //if (2 == ucOSD_Item_Index1) break;
- 2099 5 ucOSD_Item_Index1 = 2;
- 2100 5 stGUD1.OSD_TIMEOUT = 0;
- 2101 5 OSD_Line( 11, 36, 14, 0x40, 2);
- 2102 5 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(6+1), 3, 0x20, 2);
- 2103 5 }
- 2104 4 }
- 2105 3 else
- 2106 3 {
- 2107 4 if(ucOSD_Item_Index2)
- 2108 4 {
- 2109 5 stGUD1.OSD_TIMEOUT = (stGUD1.OSD_TIMEOUT == 5) ? 5 : stGUD1.OSD_TIMEOUT - 1;
- 2110 5 OSD_Slider(11, 31, 17, stGUD1.OSD_TIMEOUT, 60, 2, 14);
- 2111 5 }
- 2112 4 else if(ucOSD_Item_Index1)
- 2113 4 {
- 2114 5 //if (1 == ucOSD_Item_Index1) break;
- 2115 5 ucOSD_Item_Index1 = 1;
- 2116 5 OSD_Line( 11, 36, 14, 0x40, 2);
- 2117 5 OSD_Line( 11, 36 + (ucOSD_Item_Index1-1)*(6+1), 3, 0x20, 2);
- 2118 5 }
- 2119 4 }
- 2120 3
- 2121 3 usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT * 51; // 20 sec
- 2122 3 //stGUD1.OSD_TIMEOUT = (1 == ucOSD_Item_Index1) ? 2 : 0;
- 2123 3 Save_GUD1();
- 2124 3 break;
- 2125 3
- 2126 3 case PAGE4_ITEM_TRANSLU :
- 2127 3 Data[0] = (stGUD1.INPUT_SOURCE & 0xe0) >> 5;
- 2128 3 // if(NOTIFY_RIGHT_KEY == Key)
- 2129 3 if (NOTIFY_LEFT_KEY == Key)
- 2130 3 {
- 2131 4 if(ucOSD_Item_Index1)
- 2132 4 {
- 2133 5 Data[0] = (Data[0] == 0x07) ? 0x07 : Data[0] + 1;
- 2134 5 stGUD1.INPUT_SOURCE = stGUD1.INPUT_SOURCE & 0x1f | (Data[0] << 5);
- 2135 5 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 36
- 2136 4 }
- 2137 3 else
- 2138 3 {
- 2139 4 if(ucOSD_Item_Index1)
- 2140 4 {
- 2141 5 Data[0] = (Data[0] == 0x00) ? 0x00 : Data[0] - 1;
- 2142 5 stGUD1.INPUT_SOURCE = stGUD1.INPUT_SOURCE & 0x1f | (Data[0] << 5);
- 2143 5 }
- 2144 4 }
- 2145 3
- 2146 3 RTDSetBit(OVL_CTRL_6D, 0xc7, Data[0] << 3);
- 2147 3 OSD_Slider(13, 31, 17, Data[0] , 7, 2, 14);
- 2148 3 Save_GUD1();
- 2149 3 break;
- 2150 3
- 2151 3 }
- 2152 2 }
- 2153 1 else
- 2154 1 {
- 2155 2 Osd_Change_Item(Key,PAGE4_ITEM_NUM);
- 2156 2 }
- 2157 1 }
- 2158
- 2159
- 2160 void Page4_Show(void)
- 2161 {
- 2162 1 Show_Osd_Page(2,Page4_Atb,3);
- 2163 1
- 2164 1
- 2165 1 //Set Window 5 to select "OSD Menu"
- 2166 1 // OSD_Window( 5, 10, 136, 153, 183, 1, 1, 14, 251, 0, 1, 25);
- 2167 1 OSD_Window( 5, 10, 136, 120, 150, 1, 1, 14, 251, 0, 1, 25);
- 2168 1
- 2169 1 if (0 == ucOSD_Item_Index1)
- 2170 1 {
- 2171 2 Get_OSD_Margin();
- 2172 2 OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 4, 14);
- 2173 2 Get_OSD_Margin();
- 2174 2 OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 4, 14);
- 2175 2
- 2176 2 OSD_Slider(13, 31, 17, (stGUD1.INPUT_SOURCE & 0xe0) >> 5, 7, 4, 14);
- 2177 2 if( ucOSD_Item_Index0 == PAGE4_ITEM_LANGUAGE)
- 2178 2 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 2179 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 2180 2 }
- 2181 1 else
- 2182 1 {
- 2183 2 switch (ucOSD_Item_Index0)
- 2184 2 {
- 2185 3 case PAGE4_ITEM_OSDH :
- 2186 3 //Get_OSD_Margin();
- 2187 3 //OSD_Slider(11, 2, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 0x02);
- 2188 3 break;
- 2189 3
- 2190 3 case PAGE4_ITEM_OSDV :
- 2191 3 //Get_OSD_Margin();
- 2192 3 //OSD_Slider(11, 2, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 0x02);
- 2193 3 break;
- 2194 3
- 2195 3 case PAGE4_ITEM_TIMEOUT :
- 2196 3 //ucOSD_Item_Index1 = stGUD1.OSD_TIMEOUT ? 1 : 2;
- 2197 3 //OSD_Line( 10, 15 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x00, 2);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 37
- 2198 3 break;
- 2199 3
- 2200 3 case PAGE4_ITEM_TRANSLU :
- 2201 3 //ucOSD_Item_Index1 = (stGUD1.INPUT_SOURCE & 0x80) ? 1 : 2; // 1-On, 2-Off
- 2202 3 //OSD_Line( 10, 15 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x00, 2);
- 2203 3 break;
- 2204 3
- 2205 3 }
- 2206 2 }
- 2207 1 }
- 2208
- 2209 void Page4B_Enter_Key(void)
- 2210 {
- 2211 1 if ((stGUD1.FUNCTION & 0x07) != (ucOSD_Item_Index1 - 1))
- 2212 1 {
- 2213 2 stGUD1.FUNCTION = (stGUD1.FUNCTION & 0xf8) | ((ucOSD_Item_Index1 - 1) & 0x07);
- 2214 2 Save_GUD1();
- 2215 2
- 2216 2 switch (stGUD1.FUNCTION & 0x07)
- 2217 2 {
- 2218 3 case CHINESE_T :
- 2219 3 case CHINESE_S :
- 2220 3 //RTDCodeW(OSD_Reset);
- 2221 3 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 2222 3 Load_VLC_Font(Font_East_C, 0x5a9, 0x45);
- 2223 3 Page4_Show();
- 2224 3 //RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 2225 3 //RTDCodeW(OSD_Enable);
- 2226 3 break;
- 2227 3
- 2228 3 case JAPANESS :
- 2229 3 //RTDCodeW(OSD_Reset);
- 2230 3 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 2231 3 Load_VLC_Font(Font_East_J, 0x573, 0x4B);
- 2232 3 Page4_Show();
- 2233 3 //RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 2234 3 //RTDCodeW(OSD_Enable);
- 2235 3 break;
- 2236 3
- 2237 3 default :
- 2238 3 break;
- 2239 3
- 2240 3 }
- 2241 2 }
- 2242 1
- 2243 1 ucOSD_Item_Index1 = 0; // Quit Sub-Page
- 2244 1 }
- 2245
- 2246 void Page4B_Left_Right_Key(unsigned char Key)
- 2247 {
- 2248 1 // Select and highlight the next/previous item
- 2249 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2250 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 0, 0, 14, 251, 0, 1, 0);
- 2251 1 if (NOTIFY_RIGHT_KEY == Key)
- 2252 1 ucOSD_Item_Index1 = (PAGE4B_ITEM_NUM == ucOSD_Item_Index1) ? 1 : (ucOSD_Item_Index1 + 1);
- 2253 1 else
- 2254 1 ucOSD_Item_Index1 = (1 == ucOSD_Item_Index1) ? PAGE4B_ITEM_NUM : (ucOSD_Item_Index1 - 1);
- 2255 1
- 2256 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2257 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 1, 1, 14, 251, 0, 1, 25);
- 2258 1 }
- 2259
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 38
- 2260 void Page4B_Show(void)
- 2261 {
- 2262 1 Show_Osd_Page(3,Page8_Atb,7);
- 2263 1 RTDOSDW(Page8_Content);
- 2264 1 // Set Window 6
- 2265 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2266 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 1, 1, 14, 251, 0, 1, 25);
- 2267 1 }
- 2268
- 2269 void Page5_Enter_Key(void)
- 2270 {
- 2271 1 if (0 == ucOSD_Item_Index0)
- 2272 1 {
- 2273 2 // Select and highlight the first item
- 2274 2 ucOSD_Item_Index0 = PAGE5_ITEM_SOURCE;
- 2275 2 ucOSD_Item_Index1 = 0;
- 2276 2 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 0);
- 2277 2 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 2278 2 }
- 2279 1 else
- 2280 1 {
- 2281 2 switch (ucOSD_Item_Index0)
- 2282 2 {
- 2283 3 case PAGE5_ITEM_SOURCE :
- 2284 3 Data[0] = stGUD1.INPUT_SOURCE & 0x07;
- 2285 3 ucOSD_Item_Index1 = (SOURCE_DVI == Data[0]) ? PAGE5B_ITEM_DVI
- 2286 3 : (SOURCE_AV == Data[0]) ? PAGE5B_ITEM_CVBS
- 2287 3 : (SOURCE_SV == Data[0]) ? PAGE5B_ITEM_SV
- 2288 3 : (SOURCE_YUV == Data[0]) ? PAGE5B_ITEM_YUV
- 2289 3 : (SOURCE_TV == Data[0]) ? PAGE5B_ITEM_TV : PAGE5B_ITEM_DSUB;
- 2290 3
- 2291 3 OSD_Proc_B(NOTIFY_SHOW); // Show the sub-page
- 2292 3 break;
- 2293 3
- 2294 3 case PAGE5_ITEM_OPTION :
- 2295 3 if (ucOSD_Item_Index1)
- 2296 3 {
- 2297 4 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(7+1), 7, 0x40, 2);
- 2298 4
- 2299 4 //ucOSD_Item_Index1 = (1 == ucOSD_Item_Index1) ? 0x00 : 0x80;
- 2300 4 Data[0] = (1 == ucOSD_Item_Index1) ? 0x00 : 0x10;
- 2301 4 //stGUD1.INPUT_SOURCE = (stGUD1.INPUT_SOURCE & 0x7f) | ucOSD_Item_Index1;
- 2302 4 stGUD1.FUNCTION = stGUD1.FUNCTION & 0xef | Data[0];
- 2303 4 ucOSD_Item_Index1 = 0;
- 2304 4 Save_GUD1();
- 2305 4
- 2306 4 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07) && 400 == usIPV_ACT_LEN &&
- 2307 4 MODE_0640x0400x56HZ != ucMode_Curr && MODE_USER720x400 != ucMode_Curr)
- 2308 4 {
- 2309 5 //if (stGUD1.INPUT_SOURCE & 0x80)
- 2310 5 /* if (stGUD1.FUNCTION & 0x10)
- 2311 5 {
- 2312 5 if (720 == usIPH_ACT_WID)
- 2313 5 ucMode_Curr = MODE_OSDFORCE; // Force to VGA search mode again
- 2314 5 }
- 2315 5 else
- 2316 5 {
- 2317 5 if (640 == usIPH_ACT_WID)
- 2318 5 ucMode_Curr = MODE_OSDFORCE; // Force to VGA search mode again
- 2319 5 }
- 2320 5 */
- 2321 5 if (stGUD1.FUNCTION & 0x10) //anson
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 39
- 2322 5 {
- 2323 6 stGUD1.FUNCTION = (stGUD1.FUNCTION & 0xef);
- 2324 6 ucMode_Curr = MODE_OSDFORCE;
- 2325 6 }
- 2326 5 else
- 2327 5 {
- 2328 6 stGUD1.FUNCTION = (stGUD1.FUNCTION | 0x10);
- 2329 6 ucMode_Curr = MODE_OSDFORCE;
- 2330 6 }
- 2331 5 }
- 2332 4 }
- 2333 3 else
- 2334 3 {
- 2335 4 ucOSD_Item_Index1 = (stGUD1.FUNCTION & 0x10) ? 2 : 1; // 1-720, 2-640//(stGUD1.INPUT_SOURCE & 0
- -x80) ? 2 : 1; // 1-720, 2-640
- 2336 4 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(7+1), 7, 0x20, 2);
- 2337 4 }
- 2338 3 break;
- 2339 3
- 2340 3 case PAGE5_ITEM_RECALL :
- 2341 3 if (ucOSD_Item_Index1)
- 2342 3 {
- 2343 4 if (1 == ucOSD_Item_Index1)
- 2344 4 {
- 2345 5 {
- 2346 6 unsigned char ucTemp1, ucTemp2;
- 2347 6
- 2348 6 // Save the global settings we don't want to reset
- 2349 6 ucTemp1 = stGUD1.FUNCTION & 0x07; // Language select
- 2350 6 ucTemp2 = stGUD1.INPUT_SOURCE & 0x07; // Source select
- 2351 6
- 2352 6 if (JAPANESS < ucTemp1)
- 2353 6 ucTemp1 = ENGLISH;
- 2354 6
- 2355 6 // Reset OSD time-out timer
- 2356 6 usOSD_Timer = (unsigned int)2 << 9; // 20 sec
- 2357 6
- 2358 6 // Reset global settings to default
- 2359 6 Init_GUD();
- 2360 6 // Reset OSD time-out timer
- 2361 6 usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT << 9;
- 2362 6
- 2363 6 // Restore the global settings we don't want to reset
- 2364 6 stGUD1.FUNCTION = (stGUD1.FUNCTION & 0xf8) | ucTemp1;
- 2365 6 stGUD1.INPUT_SOURCE = (stGUD1.INPUT_SOURCE & 0xf8) | ucTemp2;
- 2366 6 Save_GUD1();
- 2367 6
- 2368 6 // Reset brightness and contrast to default
- 2369 6 Set_Bright_Contrast();
- 2370 6
- 2371 6 #if (AUDIO_TYPE != AUDIO_NONE)
- 2372 6 SetVolume();
- 2373 6 #endif
- 2374 6 // Reset OSD position
- 2375 6 OSD_Position(OSD_ENABLE);
- 2376 6 }
- 2377 5
- 2378 5 // Reset all mode settings to default
- 2379 5 Init_MUD();
- 2380 5
- 2381 5 // Read default settings for current mode
- 2382 5 Load_MUD(ucMode_Curr);