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

📄 dispinfo.lst

📁 此程序为twell8806驱动程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
 302   1              DisplayVolumebar(GetAudioVol());
C51 COMPILER V7.50   DISPINFO                                                              08/20/2007 10:23:30 PAGE 6   

 303   1      
 304   1              DisplayedOSD |= TVVOL;
 305   1              OSDDisplayedTime = GetTime_ms();
 306   1      
 307   1      }
 308          
 309          void DisplayMuteInfo(void)
 310          {
 311   1              CODE_P BYTE *Str ;
 312   1              BYTE len;
 313   1              extern CODE BYTE Init_Osd_DisplayMuteInfo[];
 314   1              extern CODE BYTE *MuteOnStr[];
 315   1      
 316   1              ClearOSDInfo();
 317   1              InitOSDWindow(Init_Osd_DisplayMuteInfo);
 318   1      
 319   1              Str = MuteOnStr[GetOSDLang()];
 320   1              len = strlen(Str);
 321   1              WriteStringToAddr(MUTEINFO_ADDR, Str, len);  
 322   1              DrawAttrCnt(MUTEINFO_ADDR, BACK_COLOR|CH_COLOR_RED, len );       
 323   1      
 324   1              ShowOSDWindow(TVINFO_OSDWIN,TRUE);
 325   1              ShowOSDWindowAll(1);
 326   1              DisplayedOSD |= MUTE;
 327   1      }
 328          
 329          void ClearMuteInfo(void)
 330          {
 331   1              ShowOSDWindow(TVINFO_OSDWIN,FALSE);
 332   1              DisplayedOSD &= (~(MUTE));
 333   1      }
 334          
 335          BYTE CheckAndClearOSD(void)
 336          {
 337   1              WORD    ctime,  stime, diff;
 338   1              BYTE    dt;
 339   1              BYTE    Result=0;
 340   1      
 341   1              //return 1;
 342   1              dt = GetDisplayedOSD();
 343   1              if ( dt & ( MENU | INPUTINFO | TVCHN | TVVOL /*| LOGO*/ ) ) {
 344   2      
 345   2                      if( dt & MENU ) { 
 346   3                              stime = GetOSDLastKeyInTime();  
 347   3                              diff =  20 * 100; //GetOSDDuration()
 348   3                      }
 349   2                      else { 
 350   3                              stime = OSDDisplayedTime;       
 351   3                              diff = 2 * 100; 
 352   3                              #ifdef SUPPORT_TV
                                      if( TVChManual ) diff = 150; //100              
                                      #endif
 355   3                      }
 356   2              
 357   2                      ctime = GetTime_ms();                   
 358   2      
 359   2                      if( DiffTime_ms( stime, ctime ) >= diff ) {
 360   3      
 361   3                              #ifdef DEBUG_OSD
                                      if( !(dt & MENU) ) {
                                              dPrintf("\r\n(CheckAndClearOSD)DisplayedOSD:0x%x, ", (WORD)dt);
                                              dPrintf("starttime:%d, currtime:%d", stime, ctime);
C51 COMPILER V7.50   DISPINFO                                                              08/20/2007 10:23:30 PAGE 7   

                                      }
                                      #endif
 367   3      
 368   3                              //if( dt & LOGO )                       ClearLogo();
 369   3                              if( !DisplayInputHold )
 370   3                                      if( dt & INPUTINFO )    Result = ClearInput();
 371   3                              if( dt & TVVOL )                Result = ClearTVInfo();
 372   3      
 373   3                              if( dt & MENU )                 Result = CloseOSDMenu();  
 374   3      
 375   3                              #ifdef SUPPORT_TV
                                      if( dt & TVCHN ){ 
                                              if(TVChManual)
                                              ChangeTVChannel( DummyChannel );
                                              else
                                              Result = ClearTVInfo();
                                      }
                                      #endif
 383   3      
 384   3                              if( Result == 1){
 385   4                                      if( DisplayInputHold ) DisplayInput();
 386   4                                      else {
 387   5      
 388   5                                              if( IsAudioMuteOn() )   DisplayMuteInfo();
 389   5                                              #ifdef SUPPORT_CCD_VCHIP
                                                      else 
                                                      InitClosedCaption();
                                                      #endif // SUPPORT_CCD_VCHIP
 393   5                                      }
 394   4                              }
 395   3                              return 1;
 396   3                      }
 397   2              }
 398   1      
 399   1              return 0;
 400   1      }
 401          
 402          #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV ) || defined (SUPPORT_TV)
 403          
 404          void SetWindowStart(WORD x, WORD y)
 405          {
 406   1              WriteDecoder(TW88_WINSTART_HI, (x>>8) | ((y>>8)<<4));
 407   1              WriteDecoder(TW88_WINXSTART, (BYTE)x);
 408   1              WriteDecoder(TW88_WINYSTART, (BYTE)y);
 409   1      }
 410          #endif
 411          
 412          #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
 413          
 414          void SetWindowWidth(BYTE width)
 415          {
 416   1              WriteDecoder(TW88_WINWIDTH, width);
 417   1      }
 418          
 419          void DisplayPCInfo(CODE_P BYTE *ptr)
 420          {
 421   1              WORD xstart, ystart;
 422   1              BYTE len;
 423   1      
 424   1              #ifdef DEBUG_PC
                      Printf("\r\n==== DisplayPCInfo (%s) ====", ptr);
                      #endif
C51 COMPILER V7.50   DISPINFO                                                              08/20/2007 10:23:30 PAGE 8   

 427   1      
 428   1              Clear_bypass();                                                         // HHY 1.52
 429   1      
 430   1              AutoPHPCalDisable();
 431   1              SetPHP( GetPHR() + 0x100 ); // for Sharp-NoTicon by RYU-101205  // Set PHP
 432   1      
 433   1              PanelFreeRun(1);                                                        // FreeRun
 434   1              WriteDecoder(0x06, 0x87);               // Soft Reset
 435   1      
 436   1              ClearOSDInfo();
 437   1      
 438   1              len  = strlen((CODE_P BYTE *)ptr);
 439   1      
 440   1              xstart = ( PHR_ - len*PCINFO_ZOOM*FONT_WIDTH ) / 2;
 441   1              ystart =  PVR_ / 3;
 442   1              
 443   1              InitOSDWindow(Init_Osd_DisplayPCInfo);
 444   1              SetWindowStart(xstart, ystart);
 445   1              SetWindowWidth(len);
 446   1      
 447   1              ClearDataCnt(PCMEASUREINFO_ADDR, len);
 448   1              DrawAttrCnt(PCMEASUREINFO_ADDR, CH_COLOR_RED,len);       
 449   1      
 450   1              WriteStringToAddr(PCMEASUREINFO_ADDR, (BYTE CODE *)ptr, len);
 451   1              ShowOSDWindow(PCINFO_OSDWIN,TRUE);
 452   1              ShowOSDWindowAll(1);
 453   1              
 454   1              DisplayedOSD |=PCINFO;
 455   1      
 456   1      }
 457          
 458          void ClearPCInfo(void)
 459          {
 460   1              if( !(DisplayedOSD & PCINFO) )          return;                 //ljy070803
 461   1      
 462   1              DisplayedOSD &= (~(PCINFO));
 463   1              ShowOSDWindow(PCINFO_OSDWIN,FALSE);
 464   1              dPuts("\r\n== ClearPCInfo ==");
 465   1      
 466   1      //      PanelMute(0);                                                           // HHY 1.63
 467   1      }
 468          
 469          extern CODE BYTE AutoAdjustInfo[]; 
 470          
 471          void DisplayAutoAdjust(void)
 472          {
 473   1              InitOSDWindow(Init_Osd_BarWindow);
 474   1              ClearDataCnt(OSDMENU_BARADDR, 50); // Total 25*2 Char.
 475   1              DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 50 );       
 476   1              WriteStringToAddr(OSDMENU_BARADDR, AutoAdjustInfo, 25);
 477   1      
 478   1              ShowOSDWindow(OSDBARWINDOW,TRUE);
 479   1              ShowOSDWindowAll(1);
 480   1      }
 481          void ClearAutoAdjust(void)
 482          {
 483   1              ShowOSDWindow(OSDBARWINDOW,FALSE);
 484   1      }
 485          
 486          #endif  // SUPPORT_PC
 487          
 488          //==================================================================
C51 COMPILER V7.50   DISPINFO                                                              08/20/2007 10:23:30 PAGE 9   

 489          //                                              TV Info
 490          //==================================================================
 491          #ifdef SUPPORT_TV
              
              #define TVCHN_WIDTH     3
              
              void DisplayTVChannel(BYTE chn, BYTE Chcolorflag )
              {
                      extern CODE BYTE Init_Osd_DisplayTVChannel[];
              
                      BYTE len, str[5];
                      BYTE Char_Color = CH_COLOR_GREEN;
                      WORD xstart, ystart;
              
                      DisplayedOSD &= ~TVCHN;
                      ClearOSDInfo();
              
                      if     ( chn <10 )   len = 1;
                      else if( chn <100 )  len = 2;
                      else                 len = 3;
              
                      if( (IsSavedCurChn()==0) && (Chcolorflag)) Char_Color = CH_COLOR_RED;  // Not Saved Channel
              
                      utoa( (WORD)chn, str, 10);
                      len = strlen(str);
              
                      xstart = PHR_ - len*TVCHN_ZOOM*FONT_WIDTH-10;
                      ystart =  0;
                      
                      InitOSDWindow(Init_Osd_DisplayTVChannel);
                      ClearDataCnt(TVCHINFO_ADDR, TVCHN_WIDTH);
                      DrawAttrCnt(TVCHINFO_ADDR, BACK_COLOR|Char_Color, TVCHN_WIDTH );         
                      
                      SetWindowStart(xstart, ystart);
              
                      WriteStringToAddr(TVCHINFO_ADDR, str, len);  
              
                      ShowOSDWindow(TVINFO_OSDWIN,TRUE);
                      ShowOSDWindowAll(1);
              
                      DisplayedOSD |= TVCHN;
                      OSDDisplayedTime = GetTime_ms();                        //GetTic();
              }
              
                                                                      //012345678901234
              CODE BYTE ScanTVInfo1[]=        {"Auto Scanning ...        "};
              CODE BYTE ScanTVInfo2[]=        {"Press MENU button to stop"};
              
              #define SCANTV_CHN_POS           21
              
              void DisplayScanTV(void)
              {
                      InitOSDWindow(Init_Osd_BarWindow);
              
                      DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 25 );       // All Line Attr clear by default col
             -or.
                      DrawAttrCnt(OSDMENU_BARADDR+25, BG_COLOR_WHITE | CH_COLOR_CYAN, 25 );    // All Line Attr clear by default 
             -color.
              
                      WriteStringToAddr(OSDMENU_BARADDR, ScanTVInfo1, 25);  // 25: width
                      WriteStringToAddr(OSDMENU_BARADDR+25, ScanTVInfo2, 25);  // 25: width
              
C51 COMPILER V7.50   DISPINFO                                                              08/20/2007 10:23:30 PAGE 10  

                      ShowOSDWindow(OSDBARWINDOW,TRUE);
                      ShowOSDWindowAll(1);
              }
              
              void DisplayScanTVChannel(BYTE *ptr)
              {
                      BYTE len;
                      len = strlen(ptr);
                      WriteStringToAddr(OSDMENU_BARADDR+SCANTV_CHN_POS, ptr, len);
              }
              
              #ifdef PAL_TV
              void DisplayManualScanTVProg(BYTE flag)
              {
                      CODE BYTE PlusDirection[] = { 0x1c, 0x1c, 0x1c, 0 };
                      CODE BYTE MinusDirection[] = { 0x1b, 0x1b, 0x1b, 0 };
              
                      WriteStringToAddr(OSDMENU_BARADDR+SCANTV_CHN_POS, (flag==UP? PlusDirection:MinusDirection), 3);
              }
              #endif
              
              void ClearScanTV(void)
              {
                      ShowOSDWindow(OSDBARWINDOW,FALSE);
              }
              
              #endif
 576          
 577          
 578          BYTE ClearTVInfo(void)
 579          {
 580   1              
 581   1              if( DisplayedOSD & TVVOL )
 582   1              {       ShowOSDWindow(OSDBARWINDOW, FALSE);
 583   2                      DisplayedOSD &= (~(TVVOL));
 584   2              }
 585   1              else
 586   1              {
 587   2                      ShowOSDWindow(TVINFO_OSDWIN, FALSE);
 588   2                      DisplayedOSD &= (~(TVCHN));
 589   2              }
 590   1              return 1;
 591   1      }
 592          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1272    ----
   CONSTANT SIZE    =    166    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----      37
   DATA SIZE        =      2    ----
   IDATA SIZE       =      1    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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