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

📄 1574osd.lst

📁 MXIC旺宏液晶电视芯片MX88V44的源码
💻 LST
📖 第 1 页 / 共 4 页
字号:
C51 COMPILER V7.02b   1574OSD                                                              05/24/2006 17:59:21 PAGE 1   


C51 COMPILER V7.02b, COMPILATION OF MODULE 1574OSD
OBJECT MODULE PLACED IN .\1574OSD.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\source\1574OSD.c LARGE BROWSE DEBUG OBJECTEXTEND PRINT(.\1574OSD.lst) OB
                    -JECT(.\1574OSD.obj)

stmt level    source

   1          /**--------------------------------------------------------------------------
   2          * Name          15xxOSD.c
   3          --------------------------------------------------------------------------**/
   4          #include        <string.h>
   5          #include        "..\inc\public2.h"
   6          
   7          #define EEPROM_WRID             0xA0
   8          #define L44_WRID                0x28
   9                  //--------------        OSD Reg #       ------------
  10          #define OSD_EN                  0x1C
  11          
  12          #define OSDADDR_L               0xA0
  13          #define OSDADDR_H               0xA1
  14          #define OSDDATA_L               0xA2
  15          #define OSDDATA_H               0xA3
  16          #define ORWCTRL                 0xA4
  17                  /*------        OSD External Reg. 0xA4 bit define       -------------------
  18                   *              bit             7 6 5 4 3 2 1 0
  19                   *                              | |     |         | +--         D1-0: Internal OSD accessing select
  20                   *                              | | |     |                                     00 - OSD control Reg.
  21                   *                              | | |     |                                     01 - OSD RAM Font buffer
  22                   *                              | | |     |                                     10 - OSD Display code buffer
  23                   *                              | | |     |                                     11 - OSD Display attr buffer
  24                   *                              | | |     +----         D2: Internal OSD R/W enable
  25                   *                              | | |                                           0  - Enable OSD Reg. and buf
  26                   *                              | | |                                           1  - Disable
  27                   *                              | |     + ---------             D5-3: Reserved
  28                   *                              | + -----------         OSD Clear buffer bit
  29                   *                              |                                                       0  - Normal
  30                   *                              |                                                       1  - Clear Code buffer to 0x3E
  31                   *                              |                                                                Clear Attr buffer to 0x00
  32                   *                              + -------------         OSD Read/Write mode Select      0:R             1:W
  33                   *--------------------------------------------------------------------------*/
  34          #define SEL_OSDCTRLREG  0x00            //This Value for ORWCTRL(0xA4) Reg.
  35          #define SEL_OSDDISPCODE 0x02
  36          #define SEL_OSDDISPATTR 0x03
  37          #define CLR_OSD_BUF             0x40
  38          
  39          #define OSDCTRLREG              0x07
  40          #define OSDWINON                0x53
  41          #define OSDWINOFF               0x02
  42          /*----------------------------------------------------------
  43           *      OSD Display code buffer is 64 bytes format is followed
  44           *              bit             7 6 5 4 3 2 1 0
  45           *                              | |     |
  46           *                              | |     + ---------             D5-0: Character Code
  47           *                              | + -----------         0: ROM Font     1: RAM Font
  48           *                              + -------------         0: Blink OFF    1: Blink ON
  49           *
  50           *      OSD Display Attr buffer is 64 bytes format is followed
  51           *              bit             7 6 5 4 3 2 1 0
  52           *                              | |             | |
  53           *                              | |             | + ---         D2-0: Backgound Color index
  54           *                              | |             + -----         0: BG transparent 1: BG opaque
C51 COMPILER V7.02b   1574OSD                                                              05/24/2006 17:59:21 PAGE 2   

  55           *                              | + -----------         D6-4: Foregound Color index
  56           *                              + -------------         0: Border OFF     1: Border ON
  57           */
  58          #define OSD_NORMAL_C    0x7C            //Forg. Color ->Special Back. Color ->Blue
  59          #define OSD_HIGHL_C             0x42            //Forg. Color ->Blue,   Back. Color -> Greeen
  60          #define OSD_TITLE_C             0x17            //Forg. Color ->Red,    Back. Color -> special
  61          
  62                  //--------------        Button Key Define       ------------
  63          #define ENTER   0x1E                            //pressed key then pull low
  64          #define UP              0x1B
  65          #define DOWN    0x17
  66          #define MENU    0x0F
  67          
  68          //----------------------------------------------------------------------------
  69          xdata BYTE      CBSH_Value[8]           _at_ 0x0100;    //Byte  0: Brightness buffer _at_ 0x0101
  70                                                                                                          //              1: Contrast buffer       _at_ 0x0102
  71                                                                                                          //              2: Saturation buffer _at_ 0x0103
  72                                                                                                          //              3: Hue buffer            _at_ 0x0104
  73                                                                                                          
  74                          // Define OSD Window Start position, size, space and other control
  75          xdata BYTE      OSDCtrlVal[16] = {
  76                                          0x79,   //H Start                                                       (4*0x4C+12 = 396 pixel)
  77                                          0x08,   //V Start                                                       (4*0x20+1  = 21 line)
  78                                          0x0C,   //H Width                                               (  0x0C+1  = 13 char)
  79                                          0x00,   //D7-4  V Space Start position          (                        0  char)
  80                                                          //D3-0  V Heigth                                        (  0x00+1  = 1  char)
  81                                          0x00,   //H Space Start                                         (  0x00    = 0  char)
  82                                          0x00,   //H Space Width                                         (  0x00    = 0  pixel)
  83                                          0x00,   //V Space Heigth                                        (  0x00    = 0  line)
  84                                          0x02,   //Ctrl. Reg     D7-6 Vert. scaling              (Vert. enlarged x1)
  85                                                          //                      D5-4 Horz. scaling              (Horz. enlarged x3)
  86                                                          //                      D1 Type of Char. border (bottom-right)
  87                                                          //                      D0      0: OSD window OFF       (OSD OFF)
  88                                                          //                              1: OSD window ON
  89                                          0x10,   //Misc. Ctrl
  90                                          0x00,
  91                                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00};    //Reserved
  92          
  93          xdata char      MainMenuStr[104] = {
  94          // Char#        0        1        2        3    4        5        6        7    8        9        10   11       12
  95                                  ' ', ' ', 'L', '/', 'R', ' ', 'U', '/', 'D', ' ', ' ', ' ', ' ',        //Item  0
  96                                  'B', 'R', 'I', 'G', 'H', 'T', 'N', 'E', 'S', 'S', ' ', ' ', ' ',        //Item  1
  97                                  ' ', 'C', 'O', 'N', 'T', 'R', 'A', 'S', 'T', ' ', ' ', ' ', ' ',        //              2
  98                                  'S', 'A', 'T', 'U', 'R', 'A', 'T', 'I', 'O', 'N', ' ', ' ', ' ',        //              3
  99                                  ' ', ' ', ' ', 'H', 'U', 'E', ' ', ' ', ' ', ' ', ' ', ' ', ' ',        //              4
 100                                  'E', 'D', 'G', 'E', ' ', 'F', 'I', 'L', 'T', 'E', 'R', ' ', ' ',        //              5
 101                                  ' ', ' ', 'S', 'H', 'A', 'R', 'P', 'E', 'N', ' ', ' ', ' ', ' ',        //              6
 102                                  'D', 'I', 'S', 'P', ' ', 'M', 'O', 'D', 'E', ' ', ' ', ' ', ' ' };      //              7
 103          
 104          xdata char      OSD_Color[24] = {       0x00, 0x00, 0x00,               //OSD Color 0
 105                                                                          0xFF, 0x00, 0x00,               //OSD Color 1
 106                                                                          0x00, 0xFF, 0x00,               //OSD Color 2
 107                                                                          0xFF, 0xFF, 0x00,               //OSD Color 3
 108                                                                          0x00, 0x00, 0xFF,               //OSD Color 4
 109                                                                          0xFF, 0x00, 0xFF,               //OSD Color 5
 110                                                                          0x00, 0xFF, 0xFF,               //OSD Color 6
 111                                                                          0xFF, 0xFF, 0xFF};              //OSD Color 7
 112          /***---------------------------------------------------------------------------***/                     
 113          #ifdef  CPT_PANEL       //---------------------------------------------------------
              code BYTE       Mode_4by3[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x90,             0x0A, 0x47,             0x0B, 0x13,             0x4D, 0x53,             0x53, 0x18,
C51 COMPILER V7.02b   1574OSD                                                              05/24/2006 17:59:21 PAGE 3   

                      0x55, 0x17,             0x57, 0x18,             0x59, 0x17,             0x69, 0x35,             0x6A, 0x01,
                      0x70, 0x06,             0x8A, 0x80,             0x8B, 0x46,             0x45, 0xC1,             0x47, 0xC2      
                      };
              code BYTE       Mode_Full[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x00,             0x0A, 0x00,             0x0B, 0x10,             0x4D, 0x12,             0x53, 0x18,
                      0x55, 0x17,             0x57, 0x18,             0x59, 0x17,             0x69, 0x20,             0x6A, 0x00,
                      0x70, 0x00,             0x8A, 0x58,             0x8B, 0x09,             0x45, 0xC1,             0x47, 0xC2      
                      };      
              code BYTE       Mode_Zoom1[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x1F,   0x55, 0x1D,             0x57, 0x1F,             0x59, 0x1D,             0x45, 0xC1,             
                      0x47,   0xC2};
              code BYTE       Mode_Zoom2[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x24,   0x55, 0x22,             0x57, 0x24,             0x59, 0x22,             0x45, 0xC1,             
                      0x47,   0xC2};
              #endif
 135          #ifdef  HYDIS_PANEL     //---------------------------------------------------------
              code BYTE       Mode_4by3[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x90,             0x0A, 0x47,             0x0B, 0x13,             0x4D, 0x53,             0x53, 0x18,
                      0x55, 0x17,             0x57, 0x18,             0x59, 0x17,             0x69, 0x35,             0x6A, 0x01,
                      0x70, 0x06,             0x8A, 0x80,             0x8B, 0x46,             0x45, 0xBF,             0x47, 0xC1
                      };
              code BYTE       Mode_Full[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x00,             0x0A, 0x00,             0x0B, 0x10,             0x4D, 0x12,             0x53, 0x18,
                      0x55, 0x17,             0x57, 0x18,             0x59, 0x17,             0x69, 0x20,             0x6A, 0x00,
                      0x70, 0x00,             0x8A, 0x58,             0x8B, 0x09,             0x45, 0xBF,             0x47, 0xC1
                      };      
              code BYTE       Mode_Zoom1[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x1F,   0x55, 0x1D,             0x57, 0x1F,             0x59, 0x1D,             0x45, 0xBF,
                      0x47,   0xC1};
              code BYTE       Mode_Zoom2[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x24,   0x55, 0x22,             0x57, 0x24,             0x59, 0x22,             0x45, 0xBF,
                      0x47,   0xC1};
              #endif
 157          #ifdef  LG_PANEL        //---------------------------------------------------------
              code BYTE       Mode_4by3[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x8C,             0x0A, 0x28,             0x0B, 0x13,             0x4D, 0x53,             0x53, 0x15,
                      0x55, 0x14,             0x57, 0x15,             0x59, 0x14,             0x69, 0x35,             0x6A, 0x01,
                      0x70, 0x05,             0x8A, 0x80,             0x8B, 0x44,             0x45, 0xB3,             0x47, 0xB5      
                      };
              code BYTE       Mode_Full[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x00,             0x0A, 0x00,             0x0B, 0x10,             0x4D, 0x12,             0x53, 0x15,
                      0x55, 0x14,             0x57, 0x15,             0x59, 0x14,             0x69, 0x20,             0x6A, 0x00,
                      0x70, 0x00,             0x8A, 0x59,             0x8B, 0x09,             0x45, 0xC1,             0x47, 0xC2      
                      };      
              code BYTE       Mode_Zoom1[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x1C,   0x55, 0x1B,             0x57, 0x1C,             0x59, 0x1B,             0x45, 0xC1,
                      0x47,   0xC2};
              code BYTE       Mode_Zoom2[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x22,   0x55, 0x21,             0x57, 0x22,             0x59, 0x21,             0x45, 0xC1,
                      0x47,   0xC2};
              #endif
C51 COMPILER V7.02b   1574OSD                                                              05/24/2006 17:59:21 PAGE 4   

 179          #ifdef  PVI_PANEL       //---------------------------------------------------------
              code BYTE       Mode_4by3[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x90,             0x0A, 0x47,             0x0B, 0x13,             0x4D, 0x53,             0x53, 0x19,
                      0x55, 0x17,             0x57, 0x19,             0x59, 0x17,             0x69, 0x35,             0x6A, 0x01,
                      0x70, 0x06,             0x8A, 0x80,             0x8B, 0x46,             0x45, 0xC3,             0x47, 0xC5      
                      };
              code BYTE       Mode_Full[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x00,             0x0A, 0x00,             0x0B, 0x10,             0x4D, 0x12,             0x53, 0x19,
                      0x55, 0x17,             0x57, 0x19,             0x59, 0x17,             0x69, 0x20,             0x6A, 0x00,
                      0x70, 0x00,             0x8A, 0x58,             0x8B, 0x09,             0x45, 0xC3,             0x47, 0xC5      
                      };      
              code BYTE       Mode_Zoom1[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x1F,   0x55, 0x1D,             0x57, 0x1F,             0x59, 0x1D,             0x45, 0xC3,
                      0x47, 0xC5};
              code BYTE       Mode_Zoom2[12] = {
               // Reg.#       Vaule   Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x53,   0x24,   0x55, 0x22,             0x57, 0x24,             0x59, 0x22,             0x45, 0xC3,
                      0x47, 0xC5};
              #endif
 201          #ifdef  SAMSUNG_PANEL   //---------------------------------------------------------
              code BYTE       Mode_4by3[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x90,             0x0A, 0x4F,             0x0B, 0x13,             0x4D, 0x8A,             0x53, 0x15,
                      0x55, 0x13,             0x57, 0x15,             0x59, 0x13,             0x69, 0x32,             0x6A, 0x01,
                      0x70, 0x06,             0x8A, 0x80,             0x8B, 0x40,             0x45, 0x99,             0x47, 0x9B
                      };
              code BYTE       Mode_Full[30] = {
               // Reg.# Vaule         Reg.# Vaule             Reg.# Vaule             Reg.# Vaule             Reg.# Vaule
                      0x08, 0x00,             0x0A, 0x00,             0x0B, 0x10,             0x4D, 0x12,             0x53, 0x16,
                      0x55, 0x14,             0x57, 0x16,             0x59, 0x14,             0x69, 0x20,             0x6A, 0x00,
                      0x70, 0x00,             0x8A, 0x58,             0x8B, 0x09,             0x45, 0xC1,             0x47, 0xC3      
                      };      

⌨️ 快捷键说明

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