Lcd_osd.lst
上传用户:xmyjxjd
上传日期:2013-05-04
资源大小:1517k
文件大小:725k
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 40
- 2383 5
- 2384 5 // Leave current mode and search mode again
- 2385 5 ucMode_Curr = MODE_OSDFORCE;
- 2386 5 }
- 2387 4
- 2388 4 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
- 2389 4 ucOSD_Item_Index1 = 0; // Leave the item
- 2390 4 }
- 2391 3 else
- 2392 3 {
- 2393 4 ucOSD_Item_Index1 = 2; // Enter the item, Default NO
- 2394 4 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- 2395 4 }
- 2396 3 break;
- 2397 3
- 2398 3 case PAGE5_ITEM_VOLUME :
- 2399 3 if (ucOSD_Item_Index1)
- 2400 3 {
- 2401 4 ucOSD_Item_Index1 = 0; // Leave the item
- 2402 4 OSD_Slider(11, 31, 17, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
- 2403 4 }
- 2404 3 else
- 2405 3 {
- 2406 4 ucOSD_Item_Index1 = 1; // Enter the item, show slider
- 2407 4
- 2408 4 stGUD3.VOLUME &= 0x1f;
- 2409 4 OSD_Slider(11, 31, 17, 0x1f - stGUD3.VOLUME, 0x1f, 2, 14);
- 2410 4 }
- 2411 3 break;
- 2412 3
- 2413 3 case PAGE5_ITEM_EXIT :
- 2414 3 // Disable highlight window
- 2415 3 OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
- 2416 3 , 0, 0, 14, 251, 0, 1, 0);
- 2417 3 // De-select the page item and disable the hightlight window
- 2418 3 ucOSD_Item_Index0 = 0;
- 2419 3 ucOSD_Item_Index1 = 0;
- 2420 3
- 2421 3 break;
- 2422 3
- 2423 3 }
- 2424 2 }
- 2425 1 }
- 2426
- 2427 void Page5_Left_Right_Key(unsigned char Key)
- 2428 {
- 2429 1 if (ucOSD_Item_Index1)
- 2430 1 {
- 2431 2 switch (ucOSD_Item_Index0)
- 2432 2 {
- 2433 3 case PAGE5_ITEM_OPTION :
- 2434 3 ucOSD_Item_Index1 = (NOTIFY_LEFT_KEY == Key) ? 2 : 1; // 1-720, 2-640
- 2435 3 OSD_Line( 7, 36 , 16, 0x40, 2);
- 2436 3 OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(7+1), 7, 0x20, 2);
- 2437 3 //RTDOSDW((1 == ucOSD_Item_Index1) ? OSD_MODE_V720 : OSD_MODE_V640);
- 2438 3 break;
- 2439 3
- 2440 3 case PAGE5_ITEM_RECALL :
- 2441 3 // ucOSD_Item_Index1 = (NOTIFY_LEFT_KEY == Key) ? 1 : 2;
- 2442 3 ucOSD_Item_Index1 = (NOTIFY_RIGHT_KEY == Key) ? 1 : 2;
- 2443 3 OSD_Line( 9, 36 , 14, 0x40, 2);
- 2444 3 OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 41
- 2445 3 //RTDOSDW(OSD_YESNO_TABLE[ucOSD_Item_Index1 - 1][stGUD1.FUNCTION & 0x07]);
- 2446 3 break;
- 2447 3
- 2448 3 case PAGE5_ITEM_VOLUME :
- 2449 3 // if (NOTIFY_RIGHT_KEY == Key)
- 2450 3 if (NOTIFY_LEFT_KEY == Key)
- 2451 3 {
- 2452 4 if (0x00 == stGUD3.VOLUME)
- 2453 4 break;
- 2454 4
- 2455 4 stGUD3.VOLUME = stGUD3.VOLUME - 1;
- 2456 4 }
- 2457 3 else
- 2458 3 {
- 2459 4 if (0x1f <= stGUD3.VOLUME)
- 2460 4 break;
- 2461 4
- 2462 4 stGUD3.VOLUME = stGUD3.VOLUME + 1;
- 2463 4 }
- 2464 3
- 2465 3 OSD_Slider(11, 31, 17, 0x1f - stGUD3.VOLUME, 0x1f, 2, 14);
- 2466 3 SetVolume();
- 2467 3 Save_GUD3();
- 2468 3 break;
- 2469 3
- 2470 3 default :
- 2471 3 break;
- 2472 3
- 2473 3 }
- 2474 2 }
- 2475 1 else
- 2476 1 {
- 2477 2 Osd_Change_Item(Key,PAGE5_ITEM_NUM);
- 2478 2 }
- 2479 1 }
- 2480
- 2481 void Page5_Show(void)
- 2482 {
- 2483 1 Show_Osd_Page(3,Page5_Atb,4);
- 2484 1
- 2485 1 //Set Window 5 to select "Misc."
- 2486 1 // OSD_Window( 5, 10, 136, 186, 216, 1, 1, 14, 251, 0, 1, 25);
- 2487 1 OSD_Window( 5, 10, 136, 153, 183, 1, 1, 14, 251, 0, 1, 25);
- 2488 1
- 2489 1 #if (AUDIO_TYPE != AUDIO_NONE)
- 2490 1
- 2491 1 OSD_Slider(11, 31, 17, 0x1f - stGUD3.VOLUME, 0x1f, 4, 14);
- 2492 1
- 2493 1 #endif
- 2494 1 if (0 == ucOSD_Item_Index1)
- 2495 1 {
- 2496 2 if( ucOSD_Item_Index0 == PAGE5_ITEM_SOURCE)
- 2497 2 OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- 2498 2 }
- 2499 1 else
- 2500 1 {
- 2501 2 switch (ucOSD_Item_Index0)
- 2502 2 {
- 2503 3 case PAGE5_ITEM_OPTION :
- 2504 3 //OSD_Line( 10, 15 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x00, 2);
- 2505 3 //RTDOSDW((1 == ucOSD_Item_Index1) ? OSD_MODE_V720 : OSD_MODE_V640);
- 2506 3 break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 42
- 2507 3
- 2508 3 case PAGE5_ITEM_RECALL :
- 2509 3 //OSD_Line( 10, 15 + (ucOSD_Item_Index1-1)*(4+1), 4, 0x00, 2);
- 2510 3 //RTDOSDW(OSD_YESNO_TABLE[ucOSD_Item_Index1 - 1][stGUD1.FUNCTION & 0x07]);
- 2511 3 break;
- 2512 3
- 2513 3 case PAGE5_ITEM_VOLUME :
- 2514 3 //stGUD3.VOLUME &= 0x1f;
- 2515 3 //OSD_Slider(11, 2, 20, 0x1f - stGUD3.VOLUME, 0x1f, 0x61);
- 2516 3 break;
- 2517 3
- 2518 3 default :
- 2519 3 break;
- 2520 3
- 2521 3 }
- 2522 2 }
- 2523 1 }
- 2524
- 2525 void Page5B_Enter_Key()
- 2526 {
- 2527 1 Data[0] = (PAGE5B_ITEM_DVI == ucOSD_Item_Index1) ? SOURCE_DVI
- 2528 1 : (PAGE5B_ITEM_CVBS == ucOSD_Item_Index1) ? SOURCE_AV
- 2529 1 : (PAGE5B_ITEM_SV == ucOSD_Item_Index1) ? SOURCE_SV
- 2530 1 : (PAGE5B_ITEM_YUV == ucOSD_Item_Index1) ? SOURCE_YUV
- 2531 1 : (PAGE5B_ITEM_TV == ucOSD_Item_Index1) ? SOURCE_TV : SOURCE_VGA;
- 2532 1
- 2533 1 if(Data[0] != ucInputSrc)
- 2534 1 {
- 2535 2 Change_Source(Data[0]);
- 2536 2 ucOSD_Page_Index = 0;
- 2537 2 }
- 2538 1 else
- 2539 1 {
- 2540 2 ucOSD_Item_Index1 = 0; // Quit Sub-Page
- 2541 2 }
- 2542 1
- 2543 1 }
- 2544
- 2545 void Page5B_Left_Right_Key(unsigned char Key)
- 2546 {
- 2547 1 // Select and highlight the next/previous item
- 2548 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2549 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 0, 0, 14, 251, 0, 1, 0);
- 2550 1 if (NOTIFY_RIGHT_KEY == Key)
- 2551 1 ucOSD_Item_Index1 = (PAGE5B_ITEM_NUM == ucOSD_Item_Index1) ? 1 : (ucOSD_Item_Index1 + 1);
- 2552 1 else
- 2553 1 ucOSD_Item_Index1 = (1 == ucOSD_Item_Index1) ? PAGE5B_ITEM_NUM : (ucOSD_Item_Index1 - 1);
- 2554 1
- 2555 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2556 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 1, 1, 14, 251, 0, 1, 25);
- 2557 1 }
- 2558
- 2559 void Page5B_Show()
- 2560 {
- 2561 1 Show_Osd_Page(4,Page9_Atb,8);
- 2562 1 RTDOSDW(Page9_Content);
- 2563 1
- 2564 1 OSD_Window( 6, 150 + ((ucOSD_Item_Index1-1)/4)*170, 282 + ((ucOSD_Item_Index1-1)/4)*170,
- 2565 1 54 + ((ucOSD_Item_Index1-1)%4)*33, 84 + ((ucOSD_Item_Index1-1)%4)*33, 1, 1, 14, 251, 0, 1, 25);
- 2566 1 // Highlight the select item
- 2567 1 // Set Window 6
- 2568 1 //OSD_Window( 6, 152, 282, 56, 86, 2, 2, 14, 251, 0, 1, 25);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 43
- 2569 1
- 2570 1
- 2571 1 }
- 2572
- 2573 void Page6_Left_Right_Key(unsigned char Key)
- 2574 {
- 2575 1 if(Key == NOTIFY_RIGHT_KEY)
- 2576 1 ucOSD_Page_Index = GetNextPageIdx(ucOSD_Page_Index);
- 2577 1 else
- 2578 1 ucOSD_Page_Index = GetPrevPageIdx(ucOSD_Page_Index);
- 2579 1 }
- 2580
- 2581 void Page6_Show(void)
- 2582 {
- 2583 1 //Init_Page(5);
- 2584 1 //RTDOSDW(OSD_PAGE_TABLE[5][stGUD1.FUNCTION & 0x07]);
- 2585 1
- 2586 1 Show_Osd_Page(4,Page6_Atb,5);
- 2587 1
- 2588 1 //Set Window 5 to select "Exit"
- 2589 1 // OSD_Window( 5, 10, 136, 219, 249, 1, 1, 14, 251, 0, 1, 25);
- 2590 1 OSD_Window( 5, 10, 136, 186, 216, 1, 1, 14, 251, 0, 1, 25);
- 2591 1 }
- 2592
- 2593 //////////////////////////////////////////////////////////////////////////////////
- 2594 //anson
- 2595 //////////////////////////////////////////////////////////////////////////////////
- 2596 void PageFactory_Show(void)
- 2597 {
- 2598 1 OSD_Fact_Clear( 0,20, 0,30);
- 2599 1 OSD_Position(OSD_ENABLE);
- 2600 1 OSD_Position(OSD_ENABLE);
- 2601 1
- 2602 1 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 2603 1 RTDOSDW(OSD_Reset);
- 2604 1 RTDOSDW(OSD_Clean_All);
- 2605 1 RTDOSDW(FactoryPageAtbFont);
- 2606 1 OSD_Fact_Line( 3, 0, 15, 0x20, 2);
- 2607 1 RTDOSDW(Version_Panel);
- 2608 1 ShowValue( 5,12, stGUD0.CONTRAST, 0x13 ); //Contrast
- 2609 1 ShowValue( 6,12, stGUD0.BRIGHT, 0x13 ); //Brightness
- 2610 1 ShowValue( 7,12, stGUD3.SPREAD, 0x13 ); //Spread
- 2611 1 ShowValue( 8, 9, stGUD4.C2_R, 0x13 ); //R-6500K
- 2612 1 ShowValue( 8,15, stGUD4.C2_G, 0x13 ); //G-6500K
- 2613 1 ShowValue( 8,21, stGUD4.C2_B, 0x13 ); //B-6500K
- 2614 1 }
- 2615
- 2616 void PageFactory_Enter_Key(void)
- 2617 {
- 2618 1 if (ucOSD_Item_Index1)
- 2619 1 {
- 2620 2 if (ucOSD_Item_Index2)
- 2621 2 {
- 2622 3 switch(ucOSD_Item_Index1)
- 2623 3 {
- 2624 4 case 1:
- 2625 4 OSD_Fact_Line( 8, 9, 3, 0x13, 2);
- 2626 4 ucOSD_Item_Index2 = 0;
- 2627 4 break;
- 2628 4 case 2:
- 2629 4 OSD_Fact_Line( 8,15, 3, 0x13, 2);
- 2630 4 ucOSD_Item_Index2 = 0;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 44
- 2631 4 break;
- 2632 4 case 3:
- 2633 4 OSD_Fact_Line( 8,21, 3, 0x13, 2);
- 2634 4 ucOSD_Item_Index2 = 0;
- 2635 4 break;
- 2636 4 }
- 2637 3 }
- 2638 2 else //ucOSD_Item_Index2 = 0
- 2639 2 {
- 2640 3 switch (ucOSD_Item_Index0)
- 2641 3 {
- 2642 4 case PAGEFact_ITEM_Contrast:
- 2643 4 ShowValue(5,12, stGUD0.CONTRAST, 0x13 );
- 2644 4 ucOSD_Item_Index1 = 0;
- 2645 4 break;
- 2646 4
- 2647 4 case PAGEFact_ITEM_Brightness:
- 2648 4 ShowValue(6,12, stGUD0.BRIGHT, 0x13 );
- 2649 4 ucOSD_Item_Index1 = 0;
- 2650 4 break;
- 2651 4
- 2652 4 case PAGEFact_ITEM_Spread:
- 2653 4 ShowValue(7,12, stGUD3.SPREAD, 0x13 );
- 2654 4 ucOSD_Item_Index1 = 0;
- 2655 4 break;
- 2656 4
- 2657 4 case PAGEFact_ITEM_6500K:
- 2658 4
- 2659 4 switch(ucOSD_Item_Index1)
- 2660 4 {
- 2661 5 case 1:
- 2662 5 OSD_Fact_Line( 8, 9, 3, 0x23, 2);
- 2663 5 ucOSD_Item_Index2 = 1;
- 2664 5 break;
- 2665 5 case 2:
- 2666 5 OSD_Fact_Line( 8,15, 3, 0x23, 2);
- 2667 5 ucOSD_Item_Index2 = 1;
- 2668 5 break;
- 2669 5 case 3:
- 2670 5 OSD_Fact_Line( 8,21, 3, 0x23, 2);
- 2671 5 ucOSD_Item_Index2 = 1;
- 2672 5 break;
- 2673 5 case 4:
- 2674 5 OSD_Fact_Line( 8,25, 4, 0x13, 2);
- 2675 5 ucOSD_Item_Index1 = 0;
- 2676 5 break;
- 2677 5 }
- 2678 4 break;
- 2679 4 }
- 2680 3 }
- 2681 2 }
- 2682 1 else //into ucOSD_Item_Index1 = 1 ;
- 2683 1 {
- 2684 2 switch (ucOSD_Item_Index0)
- 2685 2 {
- 2686 3 case PAGEFact_ITEM_Recall:
- 2687 3 Init_FACTORY();
- 2688 3 ShowValue( 5,12, stGUD0.CONTRAST, 0x13 ); //Contrast
- 2689 3 ShowValue( 6,12, stGUD0.BRIGHT, 0x13 ); //Brightness
- 2690 3 ShowValue( 8, 9, stGUD4.C2_R, 0x13 ); //R-6500K
- 2691 3 ShowValue( 8,15, stGUD4.C2_G, 0x13 ); //G-6500K
- 2692 3 ShowValue( 8,21, stGUD4.C2_B, 0x13 ); //B-6500K
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 45
- 2693 3
- 2694 3 stGUD1.INPUT_SOURCE = (stGUD1.INPUT_SOURCE & 0xE7 ) | 0x08; //6500 mode
- 2695 3 Set_Bright_Contrast();
- 2696 3 RTDOSDW(RecallOK);
- 2697 3 break;
- 2698 3
- 2699 3 case PAGEFact_ITEM_Auto_Color:
- 2700 3 Auto_Balance();
- 2701 3 RTDOSDW(AutoOK);
- 2702 3 break;
- 2703 3
- 2704 3 case PAGEFact_ITEM_Contrast:
- 2705 3 ShowValue(5,12, stGUD0.CONTRAST, 0x23 );
- 2706 3 ucOSD_Item_Index1 = 1;
- 2707 3 break;
- 2708 3
- 2709 3 case PAGEFact_ITEM_Brightness:
- 2710 3 ShowValue(6,12, stGUD0.BRIGHT, 0x23 );
- 2711 3 ucOSD_Item_Index1 = 1;
- 2712 3 break;
- 2713 3
- 2714 3 case PAGEFact_ITEM_Spread:
- 2715 3 ShowValue(7,12, stGUD3.SPREAD, 0x23 );
- 2716 3 ucOSD_Item_Index1 = 1;
- 2717 3 break;
- 2718 3
- 2719 3 case PAGEFact_ITEM_6500K:
- 2720 3 OSD_Fact_Line( 8, 7, 1, 0x23, 2);
- 2721 3 ucOSD_Item_Index1 = 1;
- 2722 3 break;
- 2723 3
- 2724 3 case PAGEFact_ITEM_EXIT:
- 2725 3 ucOSD_Page_Index = 0;
- 2726 3 ucOSD_Item_Index0 = 0;
- 2727 3 ucOSD_Item_Index1 = 0;
- 2728 3 ucOSD_Item_Index2 = 0;
- 2729 3
- 2730 3 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 2731 3 RTDOSDW(OSD_Reset);
- 2732 3 break;
- 2733 3 }
- 2734 2 }
- 2735 1 }
- 2736
- 2737 void PageFactory_Left_Right_Key(unsigned char Key)
- 2738 {
- 2739 1 if (ucOSD_Item_Index1)
- 2740 1 {
- 2741 2 if (ucOSD_Item_Index2)
- 2742 2 {
- 2743 3 switch (ucOSD_Item_Index0)
- 2744 3 {
- 2745 4 //select 6500K value;
- 2746 4 case PAGEFact_ITEM_6500K:
- 2747 4
- 2748 4 switch(ucOSD_Item_Index1)
- 2749 4 {
- 2750 5 case 1:
- 2751 5 Value_Adjust(&stGUD4.C2_R,Key,255,0);
- 2752 5 ShowValue( 8, 9, stGUD4.C2_R, 0x23 );
- 2753 5 break;
- 2754 5 case 2:
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 46
- 2755 5 Value_Adjust(&stGUD4.C2_G,Key,255,0);
- 2756 5 ShowValue( 8,15, stGUD4.C2_G, 0x23 );
- 2757 5 break;
- 2758 5 case 3:
- 2759 5 Value_Adjust(&stGUD4.C2_B,Key,255,0);
- 2760 5 ShowValue( 8,21, stGUD4.C2_B, 0x23 );
- 2761 5 break;
- 2762 5 }
- 2763 4 Set_Bright_Contrast();
- 2764 4 Save_GUD4();
- 2765 4 break;
- 2766 4
- 2767 4 }
- 2768 3 }
- 2769 2 else //ucOSD_Item_Index1 = 1 , ucOSD_Item_Index2 = 0
- 2770 2 {
- 2771 3 switch (ucOSD_Item_Index0)
- 2772 3 {
- 2773 4 if(NOTIFY_RIGHT_KEY == Key)
- 2774 4 ucOSD_Item_Index0 = (ucOSD_Item_Index0 == 1) ? 7 : ucOSD_Item_Index0 - 1;
- 2775 4 else
- 2776 4 ucOSD_Item_Index0 = (ucOSD_Item_Index0 == 7) ? 1 : ucOSD_Item_Index0 + 1;
- 2777 4
- 2778 4 //select Contrast value;
- 2779 4 case PAGEFact_ITEM_Contrast:
- 2780 4 Bright_Contrast_Adjust(&stGUD0.CONTRAST,Key);
- 2781 4 ShowValue(5,12, stGUD0.CONTRAST, 0x23 );
- 2782 4
- 2783 4 #if(ANALOG_CONTRAST)
- 2784 4 if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
- 2785 4 SetADC_Gain();
- 2786 4 else
- 2787 4 Set_Bright_Contrast();
- 2788 4 #else
- Set_Bright_Contrast();
- #endif
- 2791 4
- 2792 4 Save_GUD0();
- 2793 4 break;
- 2794 4
- 2795 4 //select Brightness value;
- 2796 4 case PAGEFact_ITEM_Brightness:
- 2797 4 Bright_Contrast_Adjust(&stGUD0.BRIGHT,Key);
- 2798 4 ShowValue(6,12, stGUD0.BRIGHT, 0x23 );
- 2799 4 Set_Bright_Contrast();
- 2800 4 Save_GUD0();
- 2801 4 break;
- 2802 4
- 2803 4 case PAGEFact_ITEM_Spread:
- 2804 4 SPREAD_Adjust(&stGUD3.SPREAD,Key);
- 2805 4 ShowValue(7,12, stGUD3.SPREAD, 0x23 );
- 2806 4 Set_Spread();
- 2807 4 Save_GUD3();
- 2808 4 break;
- 2809 4
- 2810 4 //select 6500K R,G,B,Exit ;
- 2811 4 case PAGEFact_ITEM_6500K:
- 2812 4
- 2813 4 if(NOTIFY_RIGHT_KEY == Key)
- 2814 4 ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 4) ? 1 : ucOSD_Item_Index1 + 1;
- 2815 4 else
- 2816 4 ucOSD_Item_Index1 = (ucOSD_Item_Index1 == 1) ? 4 : ucOSD_Item_Index1 - 1;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 47
- 2817 4
- 2818 4 switch(ucOSD_Item_Index1)
- 2819 4 {
- 2820 5 case 1:
- 2821 5 OSD_Fact_Line( 8, 7, 1, 0x23, 2);
- 2822 5 OSD_Fact_Line( 8,13, 1, 0x13, 2);
- 2823 5 OSD_Fact_Line( 8,25, 4, 0x13, 2);
- 2824 5 break;
- 2825 5 case 2:
- 2826 5 OSD_Fact_Line( 8, 7, 1, 0x13, 2);
- 2827 5 OSD_Fact_Line( 8,13, 1, 0x23, 2);
- 2828 5 OSD_Fact_Line( 8,19, 1, 0x13, 2);
- 2829 5 break;
- 2830 5 case 3:
- 2831 5 OSD_Fact_Line( 8,13, 1, 0x13, 2);
- 2832 5 OSD_Fact_Line( 8,19, 1, 0x23, 2);
- 2833 5 OSD_Fact_Line( 8,25, 4, 0x13, 2);
- 2834 5 break;
- 2835 5 case 4:
- 2836 5 OSD_Fact_Line( 8, 7, 1, 0x13, 2);
- 2837 5 OSD_Fact_Line( 8,19, 1, 0x13, 2);
- 2838 5 OSD_Fact_Line( 8,25, 4, 0x23, 2);
- 2839 5 break;
- 2840 5 }
- 2841 4 break;
- 2842 4 }
- 2843 3 }
- 2844 2 }
- 2845 1 else //ucOSD_Item_Index1 = 0
- 2846 1 {
- 2847 2 //select Factory Main menu ;
- 2848 2 if(NOTIFY_RIGHT_KEY == Key)
- 2849 2 ucOSD_Item_Index0 = (ucOSD_Item_Index0 == 7) ? 1 : ucOSD_Item_Index0 + 1;
- 2850 2 else
- 2851 2 ucOSD_Item_Index0 = (ucOSD_Item_Index0 == 1) ? 7 : ucOSD_Item_Index0 - 1;
- 2852 2
- 2853 2 switch (ucOSD_Item_Index0)
- 2854 2 {
- 2855 3 case PAGEFact_ITEM_Recall:
- 2856 3 OSD_Fact_Line( 9, 1, 7, 0x10, 2);
- 2857 3 OSD_Fact_Line( 3, 1, 14, 0x20, 2);
- 2858 3 OSD_Fact_Line( 4, 1, 10, 0x10, 2);
- 2859 3 break;
- 2860 3
- 2861 3 case PAGEFact_ITEM_Auto_Color:
- 2862 3 OSD_Fact_Line( 3, 1, 14, 0x10, 2);
- 2863 3 OSD_Fact_Line( 4, 1, 10, 0x20, 2);
- 2864 3 OSD_Fact_Line( 5, 1, 10, 0x10, 2);
- 2865 3 break;
- 2866 3
- 2867 3 case PAGEFact_ITEM_Contrast:
- 2868 3 OSD_Fact_Line( 4, 1, 10, 0x10, 2);
- 2869 3 OSD_Fact_Line( 5, 1, 10, 0x20, 2);
- 2870 3 OSD_Fact_Line( 6, 1, 10, 0x10, 2);
- 2871 3 break;
- 2872 3
- 2873 3 case PAGEFact_ITEM_Brightness:
- 2874 3 OSD_Fact_Line( 5, 1, 10, 0x10, 2);
- 2875 3 OSD_Fact_Line( 6, 1, 10, 0x20, 2);
- 2876 3 OSD_Fact_Line( 7, 1, 10, 0x10, 2);
- 2877 3 break;
- 2878 3
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 48
- 2879 3 case PAGEFact_ITEM_Spread:
- 2880 3 OSD_Fact_Line( 6, 1, 10, 0x10, 2);
- 2881 3 OSD_Fact_Line( 7, 1, 10, 0x20, 2);
- 2882 3 OSD_Fact_Line( 8, 1, 5, 0x10, 2);
- 2883 3 break;
- 2884 3
- 2885 3 case PAGEFact_ITEM_6500K:
- 2886 3 OSD_Fact_Line( 7, 1,10, 0x10, 2);
- 2887 3 OSD_Fact_Line( 8, 1, 5, 0x20, 2);
- 2888 3 OSD_Fact_Line( 9, 1, 7, 0x10, 2);
- 2889 3 Set_Bright_Contrast();
- 2890 3 break;
- 2891 3
- 2892 3 case PAGEFact_ITEM_EXIT:
- 2893 3 OSD_Fact_Line( 8, 1, 5, 0x10, 2);
- 2894 3 OSD_Fact_Line( 9, 1, 7, 0x20, 2);
- 2895 3 OSD_Fact_Line( 3, 1,14, 0x10, 2);
- 2896 3 break;
- 2897 3 }
- 2898 2 }
- 2899 1 }
- 2900
- 2901
- 2902 //////////////////////////////////////////////////////////////////////////////////
- 2903 //////////////////////////////////////////////////////////////////////////////////
- 2904
- 2905 void PageADC_Left_Right_Key(unsigned char Key)
- 2906 {
- 2907 1 if (ucOSD_Item_Index1)
- 2908 1 {
- 2909 2 switch (ucOSD_Item_Index0)
- 2910 2 {
- 2911 3 case PAGEH_ITEM_REDGAIN :
- 2912 3 if (NOTIFY_RIGHT_KEY == Key)
- 2913 3 {
- 2914 4 if (0xff == stGUD2.AD_R_GAIN)
- 2915 4 return;
- 2916 4
- 2917 4 stGUD2.AD_R_GAIN += 1;
- 2918 4 }
- 2919 3 else
- 2920 3 {
- 2921 4 if (0x00 == stGUD2.AD_R_GAIN)
- 2922 4 return;
- 2923 4
- 2924 4 stGUD2.AD_R_GAIN -= 1;
- 2925 4 }
- 2926 3
- 2927 3 OSD_Slider(5, 36, 17, stGUD2.AD_R_GAIN, 0xff, 2, 14);
- 2928 3 SetADC_Gain();
- 2929 3 break;
- 2930 3
- 2931 3 case PAGEH_ITEM_GREENGAIN :
- 2932 3 if (NOTIFY_RIGHT_KEY == Key)
- 2933 3 {
- 2934 4 if (0xff == stGUD2.AD_G_GAIN)
- 2935 4 return;
- 2936 4
- 2937 4 stGUD2.AD_G_GAIN += 1;
- 2938 4 }
- 2939 3 else
- 2940 3 {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 49
- 2941 4 if (0x00 == stGUD2.AD_G_GAIN)
- 2942 4 return;
- 2943 4
- 2944 4 stGUD2.AD_G_GAIN -= 1;
- 2945 4 }
- 2946 3
- 2947 3 OSD_Slider(7, 36, 17, stGUD2.AD_R_GAIN, 0xff, 2, 14);
- 2948 3 SetADC_Gain();
- 2949 3 break;
- 2950 3
- 2951 3 case PAGEH_ITEM_BLUEGAIN :
- 2952 3 if (NOTIFY_RIGHT_KEY == Key)
- 2953 3 {
- 2954 4 if (0xff == stGUD2.AD_B_GAIN)
- 2955 4 return;
- 2956 4
- 2957 4 stGUD2.AD_B_GAIN += 1;
- 2958 4 }
- 2959 3 else
- 2960 3 {
- 2961 4 if (0x00 == stGUD2.AD_B_GAIN)
- 2962 4 return;
- 2963 4
- 2964 4 stGUD2.AD_B_GAIN -= 1;
- 2965 4 }
- 2966 3
- 2967 3 OSD_Slider(9, 36, 17, stGUD2.AD_R_GAIN, 0xff, 2, 14);
- 2968 3 SetADC_Gain();
- 2969 3 break;
- 2970 3
- 2971 3 case PAGEH_ITEM_REDOFFSET :
- 2972 3 if (NOTIFY_RIGHT_KEY == Key)
- 2973 3 {
- 2974 4 if (0xff == stGUD2.AD_R_OFFSET)
- 2975 4 return;
- 2976 4
- 2977 4 stGUD2.AD_R_OFFSET += 1;
- 2978 4 }
- 2979 3 else
- 2980 3 {
- 2981 4 if (0x00 == stGUD2.AD_R_OFFSET)
- 2982 4 return;
- 2983 4
- 2984 4 stGUD2.AD_R_OFFSET -= 1;
- 2985 4 }
- 2986 3
- 2987 3 OSD_Slider(11, 36, 17, stGUD2.AD_R_GAIN, 0xff, 2, 14);
- 2988 3 SetADC_Offset();
- 2989 3 break;
- 2990 3
- 2991 3 case PAGEH_ITEM_GREENOFFSET :
- 2992 3 if (NOTIFY_RIGHT_KEY == Key)
- 2993 3 {
- 2994 4 if (0xff == stGUD2.AD_G_OFFSET)
- 2995 4 return;
- 2996 4
- 2997 4 stGUD2.AD_G_OFFSET += 1;
- 2998 4 }
- 2999 3 else
- 3000 3 {
- 3001 4 if (0x00 == stGUD2.AD_G_OFFSET)
- 3002 4 return;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 50
- 3003 4
- 3004 4 stGUD2.AD_G_OFFSET -= 1;
- 3005 4 }
- 3006 3
- 3007 3 OSD_Slider(13, 36, 17, stGUD2.AD_R_GAIN, 0xff, 2, 14);
- 3008 3 SetADC_Offset();
- 3009 3 break;
- 3010 3
- 3011 3 case PAGEH_ITEM_BLUEOFFSET :
- 3012 3 if (NOTIFY_RIGHT_KEY == Key)
- 3013 3 {
- 3014 4 if (0xff == stGUD2.AD_B_OFFSET)
- 3015 4 return;
- 3016 4
- 3017 4 stGUD2.AD_B_OFFSET += 1;
- 3018 4 }
- 3019 3 else
- 3020 3 {
- 3021 4 if (0x00 == stGUD2.AD_B_OFFSET)
- 3022 4 return;
- 3023 4
- 3024 4 stGUD2.AD_B_OFFSET -= 1;
- 3025 4 }
- 3026 3
- 3027 3 OSD_Slider(15, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3028 3 SetADC_Offset();
- 3029 3 break;
- 3030 3
- 3031 3 }
- 3032 2
- 3033 2 Save_GUD2();
- 3034 2 }
- 3035 1 else
- 3036 1 {
- 3037 2 if (ucOSD_Item_Index0)
- 3038 2 {
- 3039 3 // Select and highlight the next/previous item
- 3040 3 if (NOTIFY_RIGHT_KEY == Key)
- 3041 3 ucOSD_Item_Index0 = (PAGEH_ITEM_NUM == ucOSD_Item_Index0) ? 1 : (ucOSD_Item_Index0 + 1);
- 3042 3 else
- 3043 3 ucOSD_Item_Index0 = (1 == ucOSD_Item_Index0) ? PAGEH_ITEM_NUM : (ucOSD_Item_Index0 - 1);
- 3044 3
- 3045 3 OSD_Window( 6, 0, 476, 0, 252, 4, 4, 0, 1, 231, 1, 113);
- 3046 3 }
- 3047 2 }
- 3048 1 }
- 3049
- 3050 void PageADC_Enter_Key(void)
- 3051 {
- 3052 1 if (0 == ucOSD_Item_Index0)
- 3053 1 {
- 3054 2 // Select and highlight the first item
- 3055 2 ucOSD_Item_Index0 = PAGEH_ITEM_REDGAIN;
- 3056 2 ucOSD_Item_Index1 = 0;
- 3057 2 OSD_Window( 6, 152, 282, 56, 86, 2, 2, 14, 251, 0, 1, 25);
- 3058 2 }
- 3059 1 else
- 3060 1 {
- 3061 2 if (PAGEH_ITEM_EXIT == ucOSD_Item_Index0)
- 3062 2 {
- 3063 3 ucOSD_Page_Index = 0; // Close OSD
- 3064 3 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 51
- 3065 2 else
- 3066 2 {
- 3067 3 if (ucOSD_Item_Index1)
- 3068 3 {
- 3069 4 ucOSD_Item_Index1 = 0; // Leave the item, Show Mode
- 3070 4 RTDOSDW(OSD_Version);
- 3071 4 }
- 3072 3 else
- 3073 3 {
- 3074 4 ucOSD_Item_Index1 = 1; // Enter the item, Show slider
- 3075 4
- 3076 4 switch (ucOSD_Item_Index0)
- 3077 4 {
- 3078 5 case PAGEH_ITEM_REDGAIN :
- 3079 5 OSD_Slider(5, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3080 5 break;
- 3081 5
- 3082 5 case PAGEH_ITEM_GREENGAIN :
- 3083 5 OSD_Slider(7, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3084 5 break;
- 3085 5
- 3086 5 case PAGEH_ITEM_BLUEGAIN :
- 3087 5 OSD_Slider(9, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3088 5 break;
- 3089 5
- 3090 5 case PAGEH_ITEM_REDOFFSET :
- 3091 5 OSD_Slider(11, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3092 5 break;
- 3093 5
- 3094 5 case PAGEH_ITEM_GREENOFFSET :
- 3095 5 OSD_Slider(13, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3096 5 break;
- 3097 5
- 3098 5 case PAGEH_ITEM_BLUEOFFSET :
- 3099 5 OSD_Slider(15, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 2, 14);
- 3100 5 break;
- 3101 5
- 3102 5 }
- 3103 4 }
- 3104 3 }
- 3105 2 }
- 3106 1 }
- 3107
- 3108 void PageADC_Show(void)
- 3109 {
- 3110 1 Init_Page(0);
- 3111 1
- 3112 1 RTDOSDW(PageADC_Atb);
- 3113 1 RTDOSDW(PageADC_ENG);
- 3114 1
- 3115 1 // Highlight the select item
- 3116 1 //OSD_Window( 5, 0, 476, 0, 252, 4, 4, 0, 1, 231, 1, 113); //Set Window 5
- 3117 1
- 3118 1 if (0 == ucOSD_Item_Index1)
- 3119 1 {
- 3120 2 RTDOSDW(OSD_Version);
- 3121 2 }
- 3122 1 else
- 3123 1 {
- 3124 2 switch (ucOSD_Item_Index0)
- 3125 2 {
- 3126 3 case PAGEH_ITEM_REDGAIN :
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 52
- 3127 3 OSD_Slider(5, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3128 3 break;
- 3129 3
- 3130 3 case PAGEH_ITEM_GREENGAIN :
- 3131 3 OSD_Slider(7, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3132 3 break;
- 3133 3
- 3134 3 case PAGEH_ITEM_BLUEGAIN :
- 3135 3 OSD_Slider(9, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3136 3 break;
- 3137 3
- 3138 3 case PAGEH_ITEM_REDOFFSET :
- 3139 3 OSD_Slider(11, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3140 3 break;
- 3141 3
- 3142 3 case PAGEH_ITEM_GREENOFFSET :
- 3143 3 OSD_Slider(13, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3144 3 break;
- 3145 3
- 3146 3 case PAGEH_ITEM_BLUEOFFSET :
- 3147 3 OSD_Slider(15, 36, 17, stGUD2.AD_B_OFFSET, 0xff, 4, 14);
- 3148 3 break;
- 3149 3
- 3150 3 }
- 3151 2 }
- 3152 1 }
- 3153
- 3154
- 3155
- 3156
- 3157
- 3158 unsigned char Page1_Goto_Subpage(unsigned char Key)
- 3159 {
- 3160 1 if (PAGE1_ITEM_RGBADJ == ucOSD_Item_Index0 && ucOSD_Item_Index1)
- 3161 1 {
- 3162 2 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
- 3163 2 {
- 3164 3 ucOSD_Item_Index1 = 0;
- 3165 3 ucOSD_Item_Index2 = 0;
- 3166 3 }
- 3167 2 else
- 3168 2 {
- 3169 3 // When RGB adjust sub-page is open, just re-direct the message to the sub-page process
- 3170 3 OSD_Proc_B(Key);
- 3171 3 }
- 3172 2
- 3173 2 if (ucOSD_Item_Index1)
- 3174 2 return 0; // RGB adjust sub-Page still in work
- 3175 2
- 3176 2 ucOSD_Item_Index2 = 0;
- 3177 2
- 3178 2 //Key = NOTIFY_SHOW; // Redraw itself when returned from sub-page
- 3179 2 return 1;
- 3180 2
- 3181 2 }
- 3182 1
- 3183 1 return 2;
- 3184 1
- 3185 1 }
- 3186
- 3187
- 3188 unsigned char Page4_Goto_Subpage(unsigned char Key)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 53
- 3189 {
- 3190 1 if (PAGE4_ITEM_LANGUAGE == ucOSD_Item_Index0 && 0 != ucOSD_Item_Index1)
- 3191 1 {
- 3192 2 if (NOTIFY_SHOW != Key)
- 3193 2 {
- 3194 3 // When language setting sub-page is open, just re-direct the message to the sub-page process
- 3195 3 OSD_Proc_B(Key);
- 3196 3
- 3197 3 if (ucOSD_Item_Index1)
- 3198 3 return 0; // Language Setting Sub-Page still in work
- 3199 3
- 3200 3 //action = NOTIFY_SHOW; // Redraw itself when returned from sub-page
- 3201 3 return 1;
- 3202 3 }
- 3203 2 else
- 3204 2 {
- 3205 3 // Quit language sub-page if signal changed.
- 3206 3 ucOSD_Item_Index1 = 0;
- 3207 3 }
- 3208 2 }
- 3209 1
- 3210 1 return 2;
- 3211 1
- 3212 1 }
- 3213
- 3214 unsigned char Page5_Goto_Subpage(unsigned char Key)
- 3215 {
- 3216 1 if (PAGE5_ITEM_SOURCE == ucOSD_Item_Index0 && 0 != ucOSD_Item_Index1)
- 3217 1 {
- 3218 2 if (NOTIFY_SHOW != Key)
- 3219 2 {
- 3220 3 // When source select sub-page is open, just re-direct the message to the sub-page process
- 3221 3 OSD_Proc_B(Key);
- 3222 3
- 3223 3 if (ucOSD_Item_Index1) return 0; // Source select sub-Page still in work
- 3224 3
- 3225 3 //action = NOTIFY_SHOW; // Redraw itself when returned from sub-page
- 3226 3 return 1;
- 3227 3 }
- 3228 2 else
- 3229 2 {
- 3230 3 // Quit source select sub-page if signal changed.
- 3231 3 ucOSD_Item_Index1 = 0;
- 3232 3 }
- 3233 2 }
- 3234 1
- 3235 1 return 2;
- 3236 1
- 3237 1 }
- 3238
- 3239 #if(VIDEO_CHIP != VDC_NONE)
-
- void PageVDC_Enter_Key(void)
- {
- if (0 == ucOSD_Item_Index0)
- {
- // Select and highlight the first item
- ucOSD_Item_Index0 = PAGEV_ITEM_CONTRAST;
- ucOSD_Item_Index1 = 0;
- //OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, 7, COLOR_CYAN);
- OSD_Window( 5, 10, 136, 54, 84, 1, 1, 14, 251, 0, 1, 25);
- }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 54
- else
- {
- if (PAGEV_ITEM_EXIT == ucOSD_Item_Index0)
- {
- ucOSD_Page_Index = 0; // Close OSD
- }
- else
- {
- if (ucOSD_Item_Index1)
- {
- ucOSD_Item_Index1 = 0; // Leave the item, Show Mode
-
- RTDOSDW(OSD_Version);
-
- }
- else // if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
- {
- ucOSD_Item_Index1 = 1; // Enter the item, Show slider
-
- switch (ucOSD_Item_Index0)
- {
- case PAGEV_ITEM_CONTRAST :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_BRIGHT :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_HUE :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_SATURATION :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 0x61
- -);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 2, 14
- -);
- break;
- }
- }
- }
- }
- }
-
- void PageVDC_Left_Right_Key(unsigned char Key)
- {
- if (ucOSD_Item_Index1)
- {
- switch (ucOSD_Item_Index0)
- {
- case PAGEV_ITEM_CONTRAST :
- if (NOTIFY_RIGHT_KEY == Key)
- {
- if (0xff == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST += 1;
- }
- else
- {
- if (0x00 == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST) return;
-
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 55
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST -= 1;
- }
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_BRIGHT :
- if (NOTIFY_RIGHT_KEY == Key)
- {
- if (0xff == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT += 1;
- }
- else
- {
- if (0x00 == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT -= 1;
- }
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_HUE :
- if (NOTIFY_RIGHT_KEY == Key)
- {
- if (0xff == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE += 1;
- }
- else
- {
- if (0x00 == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE -= 1;
- }
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_SATURATION :
- if (NOTIFY_RIGHT_KEY == Key)
- {
- if (0xff == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION += 1;
- }
- else
- {
- if (0x00 == ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION) return;
-
- ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION -= 1;
- }
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 2, 14);
- break;
- }
- SetVDC_Color();
- Save_MUD(ucMode_Curr);
- }
- else
- {
- if (ucOSD_Item_Index0)
- {
- // Select and highlight the next/previous item
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 56
- if (NOTIFY_RIGHT_KEY == Key)
- ucOSD_Item_Index0 = (PAGEV_ITEM_NUM == ucOSD_Item_Index0) ? 1 : (ucOSD_Item_Index0 +
- - 1);
- else
- ucOSD_Item_Index0 = (1 == ucOSD_Item_Index0) ? PAGEV_ITEM_NUM : (ucOSD_Item_Index0 -
- - 1);
-
- //OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, 7, COLOR_CYAN);
- Osd_Change_Item(Key,PAGEV_ITEM_NUM);
- }
- }
- }
-
- void PageVDC_Show(void)
- {
- Init_Page(0);
-
- RTDOSDW(PageVDC_Atb);
- RTDOSDW(PageVDC_ENG);
-
- // Highlight the select item
- //OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, (ucOSD_Item_Index0 ? 7 :
- -3), COLOR_CYAN);
- OSD_Window( 5, 10, 136, 54, 84, 1, 1, 14, 251, 0, 1, 25);
-
- if (0 == ucOSD_Item_Index1)
- {
- RTDOSDW(OSD_Version);
-
- }
- else
- {
- switch (ucOSD_Item_Index0)
- {
- case PAGEV_ITEM_CONTRAST :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VCONTRAST, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_BRIGHT :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VBRIGHT, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_HUE :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VHUE, 0xff, 2, 14);
- break;
- case PAGEV_ITEM_SATURATION :
- //OSD_Slider(11, 2, 20, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 0x61);
- OSD_Slider(11, 36, 17, ((LP_VIDEO_MODE_USER_DATA)&stMUD)->VSATURATION, 0xff, 2, 14);
- break;
- }
- }
- }
- #endif
- 3424
- 3425 unsigned char Sub_Page_Process(unsigned char Key)
- 3426 {
- 3427 1 unsigned char ucTemp = 2;
- 3428 1
- 3429 1 switch(ucOSD_Page_Index)
- 3430 1 {
- 3431 2 case 1:
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 57
- 3432 2 ucTemp = Page1_Goto_Subpage(Key);
- 3433 2 break;
- 3434 2
- 3435 2 // case 4:
- 3436 2 case 3:
- 3437 2 ucTemp = Page4_Goto_Subpage(Key);
- 3438 2 break;
- 3439 2
- 3440 2 // case 5:
- 3441 2 case 4:
- 3442 2 ucTemp = Page5_Goto_Subpage(Key);
- 3443 2 break;
- 3444 2
- 3445 2 default:
- 3446 2 break;
- 3447 2 }
- 3448 1
- 3449 1 return ucTemp;
- 3450 1
- 3451 1 }
- 3452
- 3453 ///////////////////////////////////////////////////////////////////////////////////////////
- 3454 //anson
- 3455 ///////////////////////////////////////////////////////////////////////////////////////////
- 3456 void FACTORY_Key_Process(void) //anson
- 3457 {
- 3458 1 switch(ucOSD_Page_Index)
- 3459 1 {
- 3460 2 case 0:
- 3461 2 FACTORY_Key_Key();
- 3462 2 break;
- 3463 2 }
- 3464 1 }
- 3465
- 3466 ///////////////////////////////////////////////////////////////////////////////////////////
- 3467 ///////////////////////////////////////////////////////////////////////////////////////////
- 3468 void Enter_Key_Process(void)
- 3469 {
- 3470 1 switch(ucOSD_Page_Index)
- 3471 1 {
- 3472 2 case 0:
- 3473 2 Page0_Enter_Key();
- 3474 2 break;
- 3475 2
- 3476 2 case 1:
- 3477 2 Page1_Enter_Key();
- 3478 2 break;
- 3479 2
- 3480 2 case 2:
- 3481 2 Page2_Enter_Key();
- 3482 2 break;
- 3483 2 /*
- 3484 2 case 3:
- 3485 2 if(Page3_Enter_Key())
- 3486 2 break;
- 3487 2 else
- 3488 2 return;
- 3489 2 break;
- 3490 2 */
- 3491 2 case 3:
- 3492 2 Page4_Enter_Key();
- 3493 2 break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 58
- 3494 2
- 3495 2 case 4:
- 3496 2 Page5_Enter_Key();
- 3497 2 break;
- 3498 2
- 3499 2 case 5:
- 3500 2 // Just set ucOSD_Page_Index to 0 and wait for main program to clear screen
- 3501 2 ucOSD_Page_Index = 0;
- 3502 2 break;
- 3503 2
- 3504 2 case 8:
- 3505 2 if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
- 3506 2 PageADC_Enter_Key();
- 3507 2
- 3508 2 #if(VIDEO_CHIP != VDC_NONE)
- else
- PageVDC_Enter_Key();
- #endif
- 3512 2 break;
- 3513 2
- 3514 2 case PAGE_Factory:
- 3515 2 PageFactory_Enter_Key();
- 3516 2 break;
- 3517 2
- 3518 2 }
- 3519 1 }
- 3520
- 3521 void Enter_Key_B_Process(void)
- 3522 {
- 3523 1 switch(ucOSD_Page_Index)
- 3524 1 {
- 3525 2 case 1:
- 3526 2 Page1B_Enter_Key();
- 3527 2 break;
- 3528 2
- 3529 2 // case 4:
- 3530 2 case 3:
- 3531 2 Page4B_Enter_Key();
- 3532 2 break;
- 3533 2
- 3534 2
- 3535 2 // case 5:
- 3536 2 case 4:
- 3537 2 Page5B_Enter_Key();
- 3538 2 break;
- 3539 2
- 3540 2 }
- 3541 1 }
- 3542 void Left_Right_Key_Process(unsigned char Key)
- 3543 {
- 3544 1 switch(ucOSD_Page_Index)
- 3545 1 {
- 3546 2 case 0:
- 3547 2 Page0_Left_Right_Key(Key);
- 3548 2 break;
- 3549 2
- 3550 2 case 1:
- 3551 2 Page1_Left_Right_Key(Key);
- 3552 2 break;
- 3553 2
- 3554 2 case 2:
- 3555 2 Page2_Left_Right_Key(Key);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 59
- 3556 2 break;
- 3557 2 /*
- 3558 2 case 3:
- 3559 2 Page3_Left_Right_Key(Key);
- 3560 2 break;
- 3561 2 */
- 3562 2 case 3:
- 3563 2 Page4_Left_Right_Key(Key);
- 3564 2 break;
- 3565 2
- 3566 2 case 4:
- 3567 2 Page5_Left_Right_Key(Key);
- 3568 2 break;
- 3569 2
- 3570 2 case 5:
- 3571 2 Page6_Left_Right_Key(Key);
- 3572 2 break;
- 3573 2
- 3574 2 case 8:
- 3575 2 if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
- 3576 2 PageADC_Left_Right_Key(Key);
- 3577 2
- 3578 2 #if(VIDEO_CHIP != VDC_NONE)
- else
- PageVDC_Left_Right_Key(Key);
- #endif
- 3582 2 break;
- 3583 2
- 3584 2 case PAGE_Factory:
- 3585 2 PageFactory_Left_Right_Key(Key);
- 3586 2 break;
- 3587 2
- 3588 2 }
- 3589 1 }
- 3590
- 3591 void Left_Right_Key_B_Process(unsigned char Key)
- 3592 {
- 3593 1 switch(ucOSD_Page_Index)
- 3594 1 {
- 3595 2 case 1:
- 3596 2 Page1B_Left_Right_Key(Key);
- 3597 2 break;
- 3598 2
- 3599 2 // case 4:
- 3600 2 case 3:
- 3601 2 Page4B_Left_Right_Key(Key);
- 3602 2 break;
- 3603 2
- 3604 2
- 3605 2 // case 5:
- 3606 2 case 4:
- 3607 2 Page5B_Left_Right_Key(Key);
- 3608 2 break;
- 3609 2
- 3610 2 }
- 3611 1 }
- 3612
- 3613 void Show_Process(void)
- 3614 {
- 3615 1 switch(ucOSD_Page_Index)
- 3616 1 {
- 3617 2 case 1:
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 60
- 3618 2 Page1_Show();
- 3619 2 break;
- 3620 2
- 3621 2 case 2:
- 3622 2 Page2_Show();
- 3623 2 break;
- 3624 2 /*
- 3625 2 case 3:
- 3626 2 Page3_Show();
- 3627 2 break;
- 3628 2 */
- 3629 2 case 3:
- 3630 2 Page4_Show();
- 3631 2 break;
- 3632 2
- 3633 2 case 4:
- 3634 2 Page5_Show();
- 3635 2 break;
- 3636 2
- 3637 2 case 5:
- 3638 2 Page6_Show();
- 3639 2 break;
- 3640 2
- 3641 2 case 8:
- 3642 2 if((stGUD1.INPUT_SOURCE & 0x07) == SOURCE_VGA)
- 3643 2 PageADC_Show();
- 3644 2
- 3645 2 #if(VIDEO_CHIP != VDC_NONE)
- else
- PageVDC_Show();
- #endif
- 3649 2 break;
- 3650 2
- 3651 2 case PAGE_Factory:
- 3652 2 PageFactory_Show();
- 3653 2 break;
- 3654 2
- 3655 2 }
- 3656 1 }
- 3657
- 3658 void Show_B_Process(void)
- 3659 {
- 3660 1 switch(ucOSD_Page_Index)
- 3661 1 {
- 3662 2 case 1:
- 3663 2 Page1B_Show();
- 3664 2 break;
- 3665 2
- 3666 2 // case 4:
- 3667 2 case 3:
- 3668 2 Page4B_Show();
- 3669 2 break;
- 3670 2
- 3671 2
- 3672 2 // case 5:
- 3673 2 case 4:
- 3674 2 Page5B_Show();
- 3675 2 break;
- 3676 2
- 3677 2 }
- 3678 1 }
- 3679
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 61
- 3680 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 3681 // OSD Process Routine
- 3682 //////////////////////////////////////////////////////////////////////////////////////////////////////////
- -////
- 3683
- 3684 // In all OSD main page process, you CANNOT call other main page process directly.
- 3685 // You CAN only change ucOSD_Page_Index to indicate other main page.
- 3686 // Main program will detect the change of ucOSD_Page_Index and send NOTIFY_SHOW to the new page.
- 3687 // The only constraint is YOU CANNOT change ucOSD_Page_Index when receive NOTIFY_SHOW.
- 3688 // p.s. You can call sub-page process directly.
- 3689
- 3690 // OSD_Proc0 handles messages when there is no OSD window on screen (ucOSD_Page_Index = 0)
- 3691 void OSD_Proc(unsigned char action)
- 3692 {
- 3693 1
- 3694 1 #if (TV_CHIP != TV_NONE)
- if(ucOSD_Page_Index == 0)
- {
- //if (SOURCE_TV == (stGUD1.INPUT_SOURCE & 0x07) && OSD_Proc[1][stGUD1.INPUT_SOURCE & 0x07])
- if (SOURCE_TV == (stGUD1.INPUT_SOURCE & 0x07))
- {
- // Change to OSD Main Page 1 and Main Program will show it
- ucOSD_Page_Index = 1;
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
-
- b_rgb_VOLUME_STATUS = 0;
-
- return;
- }
- }
- #endif
- 3712 1
- 3713 1 Data[0] = Sub_Page_Process(action);
- 3714 1
- 3715 1 if(Data[0] == 1)
- 3716 1 action = NOTIFY_SHOW; // Redraw itself when returned from sub-page
- 3717 1 else if(Data[0] == 0)
- 3718 1 return; // Source select sub-Page still in work
- 3719 1
- 3720 1 if((MODE_NOSIGNAL != ucMode_Curr)&&(MODE_NOSUPPORT != ucMode_Curr)) //anson
- 3721 1 {
- 3722 2 switch(action)
- 3723 2 {
- 3724 3 case NOTIFY_AUTO_KEY :
- 3725 3
- 3726 3 // if ((b_rgb_VOLUME_STATUS)|(ucOSD_Page_Index)) //eric test
- 3727 3 // {
- 3728 3 // ucOSD_Page_Index = 0;
- 3729 3 // ucOSD_Item_Index0 = 0;
- 3730 3 // ucOSD_Item_Index1 = 0;
- 3731 3 // ucOSD_Item_Index2 = 0;
- 3732 3
- 3733 3 // b_rgb_VOLUME_STATUS = 0;
- 3734 3 // RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 3735 3 //
- 3736 3 // }
- 3737 3 // else
- 3738 3 // {
- 3739 3 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07) && MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != uc
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 62
- -Mode_Curr)
- 3740 3 {
- 3741 4 RTDOSDW(OSD_Reset);
- 3742 4 OSD_Position(OSD_ENABLE);
- 3743 4 RTDOSDW(OSD_AUTO);
- 3744 4 RTDOSDW(strTabAuto_Atb[stGUD1.FUNCTION & 0x07]); //anson
- *** WARNING C214 IN LINE 3744 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 3745 4 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 3746 4 if (MODE_0640x0350x70HZ <= ucMode_Curr && MODE_0720x0400x70HZ >= ucMode_Curr)
- 3747 4 {
- 3748 5 stMUD.CLOCK = 128;
- 3749 5 Set_H_Position();
- 3750 5 Set_Clock();
- 3751 5 Save_MUD(ucMode_Curr);
- 3752 5 if (ERROR_INPUT == Auto_Phase())
- 3753 5 ucMode_Curr = MODE_OSDFORCE;
- 3754 5 if (ERROR_INPUT == Auto_Position())
- 3755 5 ucMode_Curr = MODE_OSDFORCE;
- 3756 5 }
- 3757 4 else
- 3758 4 {
- 3759 5 if (ERROR_INPUT == Auto_Config()) ucMode_Curr = MODE_OSDFORCE;
- 3760 5 //if (ERROR_INPUT == Auto_Phase()) ucMode_Curr = MODE_OSDFORCE;
- 3761 5 }
- 3762 4 b_rgb_VOLUME_STATUS = 0;
- 3763 4 ucOSD_Page_Index = 0;
- 3764 4 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
- 3765 4 // Although you can add ending animation here, I don't think it is necessary.
- 3766 4 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 3767 4 RTDOSDW(OSD_Reset); // Clear OSD
- 3768 4 // }
- 3769 4
- 3770 4 }
- 3771 3 break;
- 3772 3
- 3773 3 case NOTIFY_ENTER_KEY:
- 3774 3 b_rgb_VOLUME_STATUS = 0;
- 3775 3 Enter_Key_Process();
- 3776 3 break;
- 3777 3
- 3778 3 case NOTIFY_RIGHT_KEY:
- 3779 3 case NOTIFY_LEFT_KEY:
- 3780 3 Left_Right_Key_Process(action);
- 3781 3 break;
- 3782 3
- 3783 3 case NOTIFY_EXIT_KEY :
- 3784 3 rgb_EXIT_KEY();
- 3785 3 break;
- 3786 3
- 3787 3 case NOTIFY_SHOW:
- 3788 3 Show_Process();
- 3789 3 break;
- 3790 3
- 3791 3 case NOTIFY_LR_KEY:
- 3792 3 if(ucOSD_Page_Index == 0)
- 3793 3 Page0_LR_Key();
- 3794 3 break;
- 3795 3
- 3796 3 case NOTIFY_FACTORY_KEY: //anson
- 3797 3 if((stGUD3.TV_SETTING & 0x08) == 0x08 )//Factory Mode
- 3798 3 {
- 3799 4 FACTORY_Key_Process();
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 63
- 3800 4 }
- 3801 3 break;
- 3802 3
- 3803 3 default:
- 3804 3 break;
- 3805 3
- 3806 3 }
- 3807 2 }
- 3808 1 }
- 3809
- 3810 void OSD_Proc_B(unsigned char action)
- 3811 {
- 3812 1 switch(action)
- 3813 1 {
- 3814 2 case NOTIFY_ENTER_KEY:
- 3815 2 Enter_Key_B_Process();
- 3816 2 break;
- 3817 2
- 3818 2 case NOTIFY_RIGHT_KEY:
- 3819 2 case NOTIFY_LEFT_KEY:
- 3820 2 Left_Right_Key_B_Process(action);
- 3821 2 break;
- 3822 2
- 3823 2 case NOTIFY_EXIT_KEY :
- 3824 2 rgb_EXIT_KEY();
- 3825 2 case NOTIFY_SHOW:
- 3826 2 Show_B_Process();
- 3827 2 break;
- 3828 2
- 3829 2 default:
- 3830 2 break;
- 3831 2
- 3832 2 }
- 3833 1 }
- 3834
- 3835
- 3836 #if (TV_NONE != TV_CHIP)
-
-
- void TV_AutoScan(void)
- {
- unsigned char ucTemp0, ucTemp1, ucTemp2;
-
- RTDOSDW(OSD_Reset);
- RTDCodeW(FreeV); // FreeRun V registers & Background & disable
- RTDSetBit(VGIP_CTRL_04, 0xfe, 0x00); // Input Run Disable
-
- RTDSetBit(VDIS_SIGINV_21, 0x0f, 0x10| DISP_EO_SWAP | DISP_RB_SWAP | DISP_ML_SWAP);
-
- I2CWrite(AV_DETECT);
- I2CWrite(TV_SOURCE_SEL);
- I2CWrite(TV_SCAN_GAIN);
-
- RTDCodeW(OSD_Enable);
-
- ucTemp0 = 0;
- ucTemp1 = 0;
- ucTemp2 = stGUD3.CURR_CHANNEL;
-
- stGUD3.CURR_CHANNEL = 1;
-
- while (1)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 64
- {
- Set_TV_Channel();
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
-
- if (0 == (ucTemp0 & 0x07))
- {
- I2CRead(ADDR_EROM1, 0xd0 + (ucTemp0 >> 3), 0x01);
- ucTemp1 = Data[0];
- }
-
- Data[1] = 12;
- do
- {
- Delay_Xms(50);
- I2CRead(ADDR_VIDEO, 0x1f, 0x01);
- if (Data[0] & 0x40) break;
- }
- while (--Data[1]);
-
- if (Data[1])
- {
- ucTemp1 &= 0xff - (1 << (7 - (ucTemp0 & 0x07)));
- }
- else
- {
- ucTemp1 |= 1 << (7 - (ucTemp0 & 0x07));
- }
-
- Data[0] = 4;
- Data[1] = ADDR_EROM1;
- Data[2] = 0xd0 + (ucTemp0 >> 3);
- Data[3] = ucTemp1;
- I2CWrite(Data);
-
- if (stGUD3.TV_SETTING & 0x01)
- {
- if (MAX_CATV_NUM == stGUD3.CURR_CHANNEL) break;
- }
- else
- {
- if (MAX_AIR_NUM == stGUD3.CURR_CHANNEL) break;
- }
-
- stGUD3.CURR_CHANNEL += 1;
- ucTemp0 += 1;
- }
- stGUD3.CURR_CHANNEL = ucTemp2;
- Set_TV_Channel();
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
-
- Delay_Xms(SET_2404_DELAY);
- }
-
- void Show_TV_Info(unsigned channel, unsigned char option)
- {
- RTDSetBit(OVL_CTRL_6D, 0xfd, 0x00); // Set the OSD become two times of original width (dual pixel)
-
- if (2 < option) option = 2;
-
- RTDOSDW(OSD_CHANNEL);
- Show_TV_Number(channel, 1, 5 - option, option);
-
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 65
- if (stGUD3.TV_SETTING & 0x02)
- {
- RTDOSDW(OSD_MUTE);
- }
- else
- {
- RTDOSDW((stGUD3.TV_SETTING & 0x04) ? OSD_SAP : OSD_STEREO);
- }
- }
-
- void Show_TV_Number(unsigned char num, unsigned char row, unsigned char col, unsigned char option)
- {
- RTDSetBit(OVL_CTRL_6D, 0xfd, 0x00); // Set the OSD become two times of original width (dual pixel)
-
- Data[0] = 5;
- Data[1] = Y_INC;
- Data[2] = OSD_ROW_90;
- Data[3] = 0x80 | row;
- Data[4] = col;
-
- Data[6] = N_INC;
- Data[7] = OSD_DATA_92;
-
- if (1 < option)
- {
- Data[5] = 6;
- Data[11] = 0;
-
- Data[8] = num / 100;
-
- num = num - (Data[8] * 100);
-
- Data[9] = num / 10;
- Data[10] = num - (Data[9] * 10) + _0_;
- Data[8] = Data[8] + _0_;
- Data[9] = Data[9] + _0_;
- }
- else if (1 == option)
- {
- Data[5] = 5;
- Data[10] = 0;
-
- Data[8] = num / 10;
- Data[9] = num - (Data[8] * 10) + _0_;
- Data[8] = Data[8] + _0_;
- }
- else
- {
- Data[5] = 4;
- Data[9] = 0;
-
- Data[8] = num + _0_;
- }
- RTDWrite(Data);
- }
-
- void OSD_TV_Proc(unsigned char action)
- {
- switch (ucOSD_Item_Index0)
- {
- case 1 :
- // ucOSD_Item_Index0 will be 1 when we are in TV control menu
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 66
- OSD_TV_Menu(action);
-
- if (ucOSD_Item_Index0) return;
-
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
-
- if (NOTIFY_ENTER_KEY == action || NOTIFY_IR_MENU == action || NOTIFY_NONE == action) action =
- -NOTIFY_SHOW;
-
- OSD_Clear(0, 15, 0, 30);
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- break;
- case 2 :
- // ucOSD_Item_Index0 will be 2 when volume level is shown on screen.
- if (ucOSD_Item_Index2) ucOSD_Item_Index2 -= 1;
-
- if (0 == ucOSD_Item_Index2 || (NOTIFY_NONE != action && NOTIFY_IR_VOLINC != action && NOTIFY_IR_VO
- -LDEC != action))
- {
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
-
- OSD_Clear(0, 15, 0, 30);
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- }
- break;
- case 3 :
- // ucOSD_Item_Index0 will be 3 when channel number is not shown on screen.
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- break;
-
- default :
- // ucOSD_Item_Index0 is 0xff~0xfd and ucOSD_Item_Index1 is non-zero when user inputs channel numbe
- -r.
- // We will issue NOTIFY_IR_ENTER automatically to end input when channel no. is identified or key
- -is timeout.
- // We will abort if any other key is pressed.
- if (0xfd < ucOSD_Item_Index0)
- {
- if (0 == ucOSD_Item_Index2)
- ucOSD_Item_Index0 = 0xfd;
- else
- ucOSD_Item_Index2 = ucOSD_Item_Index2 - 1;
-
- if (NOTIFY_NONE != action && NOTIFY_SHOW != action &&
- NOTIFY_IR_ENTER != action && (NOTIFY_IR_NUM0 > action || NOTIFY_IR_NUM9 < action))
- {
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- }
- }
-
- if (0xfd == ucOSD_Item_Index0)
- {
- ucOSD_Item_Index2 = 0;
- action = NOTIFY_IR_ENTER;
- }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 67
- break;
- }
-
- switch (action)
- {
- case NOTIFY_SHOW :
- OSD_Clear(0, 15, 0, 30);
-
- if (0xfd > ucOSD_Item_Index0)
- {
- if (3 != ucOSD_Item_Index0)
- {
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- }
- }
- else
- {
- Show_TV_Info(ucOSD_Item_Index1, 0xff - ucOSD_Item_Index0);
- }
- break;
-
- case NOTIFY_ENTER_KEY :
- case NOTIFY_IR_MENU :
- ucOSD_Item_Index0 = 1;
- ucOSD_Item_Index1 = 1;
- ucOSD_Item_Index2 = 0;
- OSD_TV_Menu(NOTIFY_SHOW);
- break;
-
- case NOTIFY_RIGHT_KEY :
- case NOTIFY_IR_CHINC :
- // Increase the channel
- Next_Channel();
- Save_GUD3();
-
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- break;
-
- case NOTIFY_LEFT_KEY :
- case NOTIFY_IR_CHDEC :
- // Decrease the channel
- Prev_Channel();
- Save_GUD3();
-
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- break;
-
- case NOTIFY_IR_JUMP :
- Data[0] = stGUD3.CURR_CHANNEL;
- stGUD3.CURR_CHANNEL = stGUD3.PREV_CHANNEL;
- stGUD3.PREV_CHANNEL = Data[0];
- Set_TV_Channel();
- Save_GUD3();
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 68
-
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- break;
-
- case NOTIFY_IR_VOLINC :
- case NOTIFY_IR_VOLDEC :
- // Disable mute when changing volume
- stGUD3.TV_SETTING = stGUD3.TV_SETTING & 0xfd;
-
- if (NOTIFY_IR_VOLINC == action)
- stGUD3.VOLUME = 31 > stGUD3.VOLUME ? stGUD3.VOLUME + 1 : 31;
- else
- stGUD3.VOLUME = 0 < stGUD3.VOLUME ? stGUD3.VOLUME - 1 : 0;
-
- SetVolume();
- Save_GUD3();
-
- RTDOSDW(OSD_VOLUME);
- Show_TV_Number(stGUD3.VOLUME, 2, 4, 1);
-
- ucOSD_Item_Index0 = 2;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 50; // For time-out counter
- break;
-
- case NOTIFY_IR_MUTE :
- stGUD3.TV_SETTING = stGUD3.TV_SETTING ^ 0x02;
- SetVolume();
- Save_GUD3();
-
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- break;
-
- case NOTIFY_IR_ENTER :
- if (ucOSD_Item_Index1)
- {
- ucOSD_Item_Index0 = 0;
-
- if (stGUD3.TV_SETTING & 0x01)
- {
- if (MAX_CATV_NUM >= ucOSD_Item_Index1)
- {
- stGUD3.PREV_CHANNEL = stGUD3.CURR_CHANNEL;
- stGUD3.CURR_CHANNEL = ucOSD_Item_Index1;
-
- ucOSD_Item_Index0 = 1; // Valid channel
- }
- }
- else
- {
- if (MAX_AIR_NUM >= ucOSD_Item_Index1)
- {
- stGUD3.PREV_CHANNEL = stGUD3.CURR_CHANNEL;
- stGUD3.CURR_CHANNEL = ucOSD_Item_Index1;
-
- ucOSD_Item_Index0 = 1; // Valid channel
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 69
- }
- }
-
- if (ucOSD_Item_Index0)
- {
- Set_TV_Channel();
-
- if (stGUD3.PREV_CHANNEL != stGUD3.CURR_CHANNEL)
- {
- // Disable mute when changing channel
- stGUD3.TV_SETTING = stGUD3.TV_SETTING & 0xfd;
- SetVolume();
- }
-
- Save_GUD3();
- }
- }
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- break;
-
- case NOTIFY_IR_DISP :
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- OSD_Clear(0, 15, 0, 30);
-
- if (ucOSD_Item_Index0)
- {
- ucOSD_Item_Index0 = 0;
- Show_TV_Info(stGUD3.CURR_CHANNEL, 2);
- }
- else
- {
- ucOSD_Item_Index0 = 3;
- }
- break;
-
- default :
- // We handle IR messages
- if (NOTIFY_IR_NUM0 <= action && NOTIFY_IR_NUM9 >= action)
- {
- if (0xfd > ucOSD_Item_Index0)
- {
- ucOSD_Item_Index0 = 0xff;
- ucOSD_Item_Index1 = action - NOTIFY_IR_NUM0;
- }
- else
- {
- ucOSD_Item_Index0 = ucOSD_Item_Index0 - 1;
- ucOSD_Item_Index1 = (ucOSD_Item_Index1 * 10) + (action - NOTIFY_IR_NUM0);
- }
-
- ucOSD_Item_Index2 = 80; // For time-out counter
-
- if (6 < ucOSD_Item_Index1)
- {
- #if (TV_SYSTEM == TV_NTSC)
- if (0 == (stGUD3.TV_SETTING & 0x01) || 12 < ucOSD_Item_Index1)
- #endif
- {
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 70
- ucOSD_Item_Index0 = 0xfd;
- }
- }
-
- Show_TV_Info(ucOSD_Item_Index1, 0xff - ucOSD_Item_Index0);
- }
- break;
- }
- }
-
-
-
- void Highlight_Item(unsigned char index1, unsigned char index2)
- {
- switch (index1)
- {
- case PAGE_TV_ITEM_SYSTEM :
- if (index2)
- OSD_Window(1, 0, 0, 0x13, 0x18, 7, COLOR_CYAN);
- else
- OSD_Window(1, 0, 0, 0x0a, 0x0e, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_CONTRAST :
- OSD_Window(1, 2, 2, 0x0a, 0x0e, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_BRIGHT :
- OSD_Window(1, 4, 4, 0x0a, 0x0e, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_SOUND :
- if (index2)
- OSD_Window(1, 6, 6, 0x13, 0x17, 7, COLOR_CYAN);
- else
- OSD_Window(1, 6, 6, 0x0a, 0x11, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_CHANNEL :
- OSD_Window(1, 8, 8, 0x0a, 0x0e, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_VOLUME :
- OSD_Window(1, 10, 10, 0x0a, 0x0d, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_AUTOSCAN :
- if (index2)
- OSD_Window(1, 12, 12, 0x13, 0x17, 7, COLOR_CYAN);
- else
- OSD_Window(1, 12, 12, 0x0a, 0x0d, 7, COLOR_CYAN);
- break;
- case PAGE_TV_ITEM_EXIT :
- OSD_Window(1, 14, 14, 0x00, 0x03, 7, COLOR_CYAN);
- break;
- }
- }
-
- void OSD_TV_Menu(unsigned char action)
- {
- switch (action)
- {
- case NOTIFY_ENTER_KEY :
- switch (ucOSD_Item_Index1)
- {
- case PAGE_TV_ITEM_SYSTEM :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_CONTRAST;
- break;
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 71
- case PAGE_TV_ITEM_CONTRAST :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_BRIGHT;
- break;
- case PAGE_TV_ITEM_BRIGHT :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_SOUND;
- ucOSD_Item_Index2 = (stGUD3.TV_SETTING & 0x04) ? 1 : 0;
- break;
- case PAGE_TV_ITEM_SOUND :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_CHANNEL;
- break;
- case PAGE_TV_ITEM_CHANNEL :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_VOLUME;
- break;
- case PAGE_TV_ITEM_VOLUME :
- ucOSD_Item_Index1 = PAGE_TV_ITEM_AUTOSCAN;
- ucOSD_Item_Index2 = 0;
- break;
- case PAGE_TV_ITEM_AUTOSCAN :
- if (ucOSD_Item_Index2)
- {
- TV_AutoScan();
-
- ucMode_Curr = MODE_OSDFORCE;
-
- return; // Return, not break
- }
- else
- {
- ucOSD_Item_Index1 = PAGE_TV_ITEM_EXIT;
- }
- break;
- case PAGE_TV_ITEM_EXIT:
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- RTDOSDW(OSD_Reset);
- RTDCodeW(OSD_Enable);
- return; // Return, not break
- }
- // Hightlight next item if not returned
- Highlight_Item(ucOSD_Item_Index1, ucOSD_Item_Index2);
- break;
-
- case NOTIFY_RIGHT_KEY : // Right-key to Increase; Left-key to Decrease
- case NOTIFY_LEFT_KEY :
- switch (ucOSD_Item_Index1)
- {
- case PAGE_TV_ITEM_SYSTEM :
- ucOSD_Item_Index2 = ucOSD_Item_Index2 ? 0 : 1;
- stGUD3.TV_SETTING = ucOSD_Item_Index2 ? (stGUD3.TV_SETTING | 0x01) : (stGUD3.TV_SETTING & 0x
- -fe);
- Set_TV_Channel();
- Save_GUD3();
- break;
- case PAGE_TV_ITEM_CONTRAST :
- if (NOTIFY_RIGHT_KEY == action)
- {
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stGUD0.CONTRAST = 100 > stGUD0.CONTRAST ? stGUD0.CONTRAST + 1 : 100;
- else
- stGUD0.CONTRAST = 99 > stGUD0.CONTRAST ? stGUD0.CONTRAST + 2 : 100;
- }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 72
- else
- {
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stGUD0.CONTRAST = 0 < stGUD0.CONTRAST ? stGUD0.CONTRAST - 1 : 0;
- else
- stGUD0.CONTRAST = 1 < stGUD0.CONTRAST ? stGUD0.CONTRAST - 2 : 0;
- }
- Show_TV_Number(stGUD0.CONTRAST, 0x02, 0x0b, 0x02);
- Set_Bright_Contrast();
- Save_GUD0();
- break;
- case PAGE_TV_ITEM_BRIGHT :
- if (NOTIFY_RIGHT_KEY == action)
- {
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stGUD0.BRIGHT = 100 > stGUD0.BRIGHT ? stGUD0.BRIGHT + 1 : 100;
- else
- stGUD0.BRIGHT = 99 > stGUD0.BRIGHT ? stGUD0.BRIGHT + 2 : 100;
- }
- else
- {
- if (KEY_TURBO_ENABLE > ucKey_Issued)
- stGUD0.BRIGHT = 0 < stGUD0.BRIGHT ? stGUD0.BRIGHT - 1 : 0;
- else
- stGUD0.BRIGHT = 1 < stGUD0.BRIGHT ? stGUD0.BRIGHT - 2 : 0;
- }
- Show_TV_Number(stGUD0.BRIGHT, 0x04, 0x0b, 0x02);
- Set_Bright_Contrast();
- Save_GUD0();
- break;
- case PAGE_TV_ITEM_SOUND :
- ucOSD_Item_Index2 = ucOSD_Item_Index2 ? 0 : 1;
- stGUD3.TV_SETTING = ucOSD_Item_Index2 ? (stGUD3.TV_SETTING | 0x04) : (stGUD3.TV_SETTING & 0x
- -fb);
- // Disable mute when changing TV sound mode
- stGUD3.TV_SETTING = stGUD3.TV_SETTING & 0xfd;
- SetVolume();
- Save_GUD3();
- break;
- case PAGE_TV_ITEM_CHANNEL :
- if (NOTIFY_RIGHT_KEY == action)
- Next_Channel();
- else
- Prev_Channel();
- Show_TV_Number(stGUD3.CURR_CHANNEL, 0x08, 0x0b, 0x02);
- Save_GUD3();
- break;
-
- case PAGE_TV_ITEM_VOLUME :
- if (NOTIFY_RIGHT_KEY == action)
- stGUD3.VOLUME = (31 == stGUD3.VOLUME) ? 31 : stGUD3.VOLUME + 1;
- else
- stGUD3.VOLUME = (0 == stGUD3.VOLUME) ? 0 : stGUD3.VOLUME - 1;
- Show_TV_Number(stGUD3.VOLUME, 0x0a, 0x0b, 0x01);
- SetVolume();
- Save_GUD3();
- break;
- case PAGE_TV_ITEM_AUTOSCAN :
- ucOSD_Item_Index2 = ucOSD_Item_Index2 ? 0 : 1;
- break;
- }
- Highlight_Item(ucOSD_Item_Index1, ucOSD_Item_Index2);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 73
- break;
-
- case NOTIFY_SHOW :
- OSD_Clear(0, 15, 0, 30);
- RTDSetBit(OVL_CTRL_6D, 0xfd, 0x00); // Set the OSD become two times of original width (dual pi
- -xel)
-
- RTDOSDW(OSD_PageTV);
-
- switch (ucOSD_Item_Index1)
- {
- case PAGE_TV_ITEM_SYSTEM :
- ucOSD_Item_Index2 = (stGUD3.TV_SETTING & 0x01) ? 1 : 0;
- break;
- case PAGE_TV_ITEM_SOUND :
- ucOSD_Item_Index2 = (stGUD3.TV_SETTING & 0x04) ? 1 : 0;
- break;
- }
- Highlight_Item(ucOSD_Item_Index1, ucOSD_Item_Index2);
-
- Show_TV_Number(stGUD0.CONTRAST, 0x02, 0x0b, 0x02);
- Show_TV_Number(stGUD0.BRIGHT, 0x04, 0x0b, 0x02);
- Show_TV_Number(stGUD3.CURR_CHANNEL, 0x08, 0x0b, 0x02);
- Show_TV_Number(stGUD3.VOLUME, 0x0a, 0x0b, 0x01);
- break;
-
- default :
- // We don't handle other messages
- if (NOTIFY_NONE != action || (0 == usOSD_Timer && 0 != stGUD1.OSD_TIMEOUT))
- {
- ucOSD_Item_Index0 = 0;
- ucOSD_Item_Index1 = 0;
- ucOSD_Item_Index2 = 0;
- RTDOSDW(OSD_Reset);
- RTDCodeW(OSD_Enable);
- }
- break;
- }
- }
-
- #endif
- 4454
- 4455
- 4456 void OSD_Opening(void)
- 4457 {
- 4458 1 int idata num;
- 4459 1
- 4460 1 //OSD_Position(OSD_ENABLE);
- 4461 1
- 4462 1 OSD_Window( 7, 0 , 488, 0, 264,
- 4463 1 0, 0, 14, 251, 0, 1, 1);
- 4464 1
- 4465 1 Delay_Xms(128);
- 4466 1
- 4467 1 RTDCodeW(OSD_Enable);
- 4468 1 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 4469 1
- 4470 1 for(num = 0;num < 112; num+=6)
- 4471 1 {
- 4472 2 OSD_Window( 7, 0 + num*2, 488 - num*2 , 0 + num, 264 - num,
- 4473 2 0, 0, 14, 251, 0, 1, 1);
- 4474 2 }
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 74
- 4475 1
- 4476 1 OSD_Window( 7, 0 + num*2, 488 - num*2 , 0 + num, 264 - num,
- 4477 1 0, 0, 14, 251, 0, 1, 0);
- 4478 1
- 4479 1
- 4480 1
- 4481 1 /*
- 4482 1 #if (1)
- 4483 1
- 4484 1 RTDCodeW(OSD_Enable);
- 4485 1
- 4486 1 #else
- 4487 1
- 4488 1 // For OSD animetion
- 4489 1
- 4490 1 RTDCodeW(Palette_Open);
- 4491 1 RTDCodeW(Palette_1);
- 4492 1
- 4493 1 RTDCodeW(OSD_Enable);
- 4494 1
- 4495 1 Delay_Xms(16);
- 4496 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4497 1 RTDCodeW(Palette_2);
- 4498 1
- 4499 1 Delay_Xms(16);
- 4500 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4501 1 RTDCodeW(Palette_3);
- 4502 1
- 4503 1 Delay_Xms(28);
- 4504 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4505 1 RTDCodeW(Palette_4);
- 4506 1
- 4507 1 Delay_Xms(28);
- 4508 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4509 1 RTDCodeW(Palette_5);
- 4510 1
- 4511 1 Delay_Xms(28);
- 4512 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4513 1 RTDCodeW(Palette_6);
- 4514 1
- 4515 1 Delay_Xms(28);
- 4516 1 Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- 4517 1 RTDCodeW(Palette_7);
- 4518 1
- 4519 1 RTDCodeW(Palette_Close);
- 4520 1
- 4521 1 #endif
- 4522 1
- 4523 1 */
- 4524 1 }
- 4525
- 4526 void OSD_Ending(void)
- 4527 {
- 4528 1 int idata num;
- 4529 1
- 4530 1 for(num = 112;num > 0; num-=6)
- 4531 1 {
- 4532 2 OSD_Window( 7, 0 + num*2, 488 - num*2 , 0 + num, 264 - num,
- 4533 2 0, 0, 14, 251, 0, 1, 1);
- 4534 2 }
- 4535 1
- 4536 1 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 75
- 4537 1 RTDOSDW(OSD_Reset); // Clear OSD
- 4538 1 //Delay_Xms(128);
- 4539 1 OSD_Window( 7, 0 + num*2, 488 - num*2 , 0 + num, 264 - num,
- 4540 1 0, 0, 14, 251, 0, 1, 0);
- 4541 1
- 4542 1
- 4543 1 #if (0)
-
- // For OSD animetion
-
- unsigned char ucTemp;
-
- // First, clear debug information drawn by OSD_Show_Check()
- OSD_Line(13, 2, 24, 0x00, 0);
- OSD_Line(13, 2, 24, 0x00, 1);
-
- // Close unused window
- OSD_Window(0, 0, 0, 0, 0, 0, 0);
- OSD_Window(1, 0, 0, 0, 0, 0, 0);
- OSD_Window(2, 0, 0, 0, 0, 0, 0);
-
- OSD_Line(11, 2, 24, 0x00, 0);
- OSD_Line(11, 2, 24, 0x00, 1);
-
- for (ucTemp = 0; ucTemp < 5; ucTemp ++)
- {
- OSD_Line(ucTemp, 2, 24, 0x00, 0); // Attribute
- OSD_Line(ucTemp, 2, 24, 0x00, 1); // Display
- OSD_Line(10 - ucTemp, 2, 24, 0x00, 0); // Attribute
- OSD_Line(10 - ucTemp, 2, 24, 0x00, 1); // Display
- OSD_Window(3, ucTemp + 1, 9 - ucTemp, 2, 25,
- OSD_WINDOW_ENABLE | OSD_WINDOW_SHADOWING, COLOR_CYAN); // Main OSD window
-
- Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- }
-
- OSD_Line(5, 2, 24, 0x00, 0); // Attribute
- OSD_Line(5, 2, 24, 0x00, 1); // Display
-
- for (ucTemp = 0; ucTemp < 12; ucTemp += 2)
- {
- OSD_Window(3, 5, 5, ucTemp + 3, 23 - ucTemp,
- OSD_WINDOW_ENABLE | OSD_WINDOW_SHADOWING, COLOR_CYAN);
-
- Wait_For_Event(EVENT_DEN_STOP); // Wait for Frame End
- }
-
- #endif
- 4585 1 }
- 4586
- 4587
- 4588 //Not modified yet
- 4589 void Show_Note(void)
- 4590 {
- 4591 1 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
- 4592 1 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 4593 1 //RTDCodeW(OSD_Reset);
- 4594 1 OSD_Position(OSD_ENABLE);
- 4595 1
- 4596 1
- 4597 1 // When input format changed, OSD will be cleared by Detect_VGA_Mode() and Detect_AV_Mode()
- 4598 1 switch (stGUD1.INPUT_SOURCE & 0x07)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 76
- 4599 1 {
- 4600 2 case SOURCE_VGA:
- 4601 2 //#if (VIDEO_CHIP != VDC_NONE)
- 4602 2 RTDOSDW(OSD_RGB); // OSD RGB note
- 4603 2 //#endif
- 4604 2 break;
- 4605 2
- 4606 2 case SOURCE_DVI:
- 4607 2 RTDOSDW(OSD_DVI); // OSD DVI note
- 4608 2 break;
- 4609 2
- 4610 2 case SOURCE_AV:
- 4611 2 RTDOSDW(OSD_AV); // OSD AV note
- 4612 2 break;
- 4613 2
- 4614 2 case SOURCE_SV:
- 4615 2 RTDOSDW(OSD_SV); // OSD S-Video note
- 4616 2 break;
- 4617 2
- 4618 2 case SOURCE_YUV:
- 4619 2 RTDOSDW(OSD_YUV); // OSD YUV note
- 4620 2 break;
- 4621 2
- 4622 2 case SOURCE_TV:
- 4623 2 RTDOSDW(OSD_TV);
- 4624 2 break;
- 4625 2
- 4626 2 }
- 4627 1
- 4628 1
- 4629 1 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 4630 1 //RTDCodeW(OSD_Enable);
- 4631 1
- 4632 1 }
- 4633
- 4634
- 4635 //Not modified yet
- 4636 void Show_Hint(void)
- 4637 {
- 4638 1 if (MODE_NOSIGNAL == ucMode_Curr)
- 4639 1 {
- 4640 2 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
- 4641 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 4642 2 //RTDCodeW(OSD_Reset);
- 4643 2
- 4644 2 #if(MCU_TYPE == MCU_WINBOND)
- 4645 2 if ((SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)) && (VGA_ONLINE != bVGA_CONNECT))
- 4646 2 #else
- if ((SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)) && (VGA_ONLINE != MCU_ReadVgaConnect()))
- #endif
- 4649 2 {
- 4650 3 RTDOSDW(OSD_HINT_TABLE[0][stGUD1.FUNCTION & 0x07]);
- *** WARNING C214 IN LINE 4650 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 4651 3 }
- 4652 2 else
- 4653 2 {
- 4654 3 RTDOSDW(OSD_Clean_All);
- 4655 3 RTDOSDW(OSD_HINT_TABLE[1][stGUD1.FUNCTION & 0x07]);
- *** WARNING C214 IN LINE 4655 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 4656 3 }
- 4657 2
- 4658 2 //RTDCodeW(OSD_Enable);
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 77
- 4659 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 4660 2 }
- 4661 1 else if ((MODE_NOSUPPORT == ucMode_Curr) || bOverSpec)
- 4662 1 {
- 4663 2 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
- 4664 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
- 4665 2 //RTDCodeW(OSD_Reset);
- 4666 2
- 4667 2 RTDOSDW(OSD_HINT_TABLE[2][stGUD1.FUNCTION & 0x07]);
- *** WARNING C214 IN LINE 4667 OF CODELCD_OSD.C: 'Argument': conversion: non-pointer to pointer
- 4668 2
- 4669 2 //RTDCodeW(OSD_Enable);
- 4670 2 RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
- 4671 2 }
- 4672 1 }
- 4673
- 4674
- 4675 #if (SHOW_CHECK)
- void OSD_Show_Check(void)
- {
- OSD_Line(17, 2, 38, 0, 1); // Attribute
-
- //OSD_Show_Num(0x02, ucOSD_Page_Index); // Status
- //OSD_Show_Num(0x02, ucDebug_Value0); // Status
- OSD_Show_Num(0x02, ucDebug_Value0); // Status
-
- OSD_Show_Num(0x05, ucDebug_Value1); // ucMode_Curr
- //OSD_Show_Num(0x05, stMUD.V_POSITION); // ucMode_Curr
-
- OSD_Show_Num(0x08, ucDebug_Value2);
- //OSD_Show_Num(0x08, ucMode_Curr);
-
- RTDRead(LAST_LINE_H_2C, 1, N_INC); // Last Line Length
- Data[15] = Data[0] & 0xf8;
- OSD_Show_Num(0x0b, Data[15] >> 6);
- RTDRead(LAST_LINE_L_26, 1, N_INC);
- OSD_Show_Num(0x0d, (Data[15] << 2) | (Data[0] >> 3));
-
- #if (RTDDEBUG)
- OSD_Show_Num(0x10, (unsigned char)(usPE_Sum >> 8));
- OSD_Show_Num(0x12, (unsigned char)usPE_Sum);
- OSD_Show_Num(0x17, (unsigned char)ucPE_Level);
- #else
- OSD_Show_Num(0x10, (unsigned char)(usHsync >> 8)); // usHsync
- OSD_Show_Num(0x12, (unsigned char)usHsync);
- OSD_Show_Num(0x15, (unsigned char)(usVsync >> 8)); // usVsync
- OSD_Show_Num(0x17, (unsigned char)usVsync);
-
- #endif
-
- }
-
- void OSD_Show_Num(unsigned char column, unsigned char no)
- {
- unsigned int idata usStart_Addr;
- unsigned char idata ucTemp;
-
- usStart_Addr = FONT_SELECT_ADDRESS;
-
- //The address of the first character Cn1 in Row n = FONT_SELECT_ADDRESS + Row0_length + Row1_length +...+
- -Row(n-1)_length
- for(ucTemp = 1; ucTemp < 17+1; ucTemp ++)
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 78
- usStart_Addr += Row_Info[0][ucTemp];
-
- Data[0] = 5;
- Data[1] = Y_INC;
- Data[2] = OSD_ROW_90;
- Data[3] = (unsigned char)( (((usStart_Addr + column) & 0x0fff) >> 8 ) | 0x50);
- Data[4] = (unsigned char)( (usStart_Addr + column) & 0x00ff);
- Data[5] = 0;
- RTDWrite(Data);
-
- column = no / 16; // Bit 7~4
- no = no - (column * 16); // Bit 3~0
-
- column = (9 < column) ? (column + (0x20 - 10)) : (column + _0_);
- no = (9 < no) ? (no + (0x20 - 10)) : (no + _0_);
-
- Data[0] = 5;
- Data[1] = N_INC;
- Data[2] = OSD_DATA_92;
- Data[3] = column;
- Data[4] = no;
- Data[5] = 0;
- RTDWrite(Data);
- }
- #endif
- C51 COMPILER V7.06 LCD_OSD 11/21/2005 13:47:29 PAGE 79
- ASSEMBLY LISTING OF GENERATED OBJECT CODE
- ; FUNCTION Com03FF (BEGIN)
- 0000 L?1024:
- 0000 L?1025:
- 0000 7800 R MOV R0,#LOW ucOSD_Item_Index1
- 0002 E6 MOV A,@R0
- 0003 14 DEC A
- 0004 F9 MOV R1,A
- 0005 13 RRC A
- 0006 13 RRC A
- 0007 543F ANL A,#03FH
- 0009 75F0AA MOV B,#0AAH
- 000C A4 MUL AB
- 000D FF MOV R7,A
- 000E AEF0 MOV R6,B
- 0010 2496 ADD A,#096H
- 0012 FD MOV R5,A
- 0013 E4 CLR A
- 0014 3E ADDC A,R6
- 0015 FC MOV R4,A
- 0016 EF MOV A,R7
- 0017 241A ADD A,#01AH
- 0019 FB MOV R3,A
- 001A EE MOV A,R6
- 001B 3401 ADDC A,#01H
- 001D FA MOV R2,A
- 001E E9 MOV A,R1
- 001F 5403 ANL A,#03H
- 0021 75F021 MOV B,#021H
- 0024 A4 MUL AB
- 0025 FF MOV R7,A
- 0026 AEF0 MOV R6,B
- 0028 2436 ADD A,#036H