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

📄 dispinfo.lst

📁 车载DVD osdIC TW8816原厂代码
💻 LST
📖 第 1 页 / 共 2 页
字号:
 307          {
 308   1              ShowOSDWindow(TVINFO_OSDWIN,FALSE);
 309   1              DisplayedOSD &= (~(MUTE));
 310   1      }
 311          
 312          BYTE CheckAndClearOSD(void)
 313          {
 314   1              WORD    ctime,  stime, diff;
 315   1              BYTE    dt;
 316   1              BYTE    Result=0;
 317   1      
 318   1              //return 1;
 319   1              dt = GetDisplayedOSD();
 320   1              if ( dt & ( MENU | INPUTINFO | TVCHN | TVVOL /*| LOGO*/ ) ) {
 321   2      
 322   2                      if( dt & MENU ) { 
 323   3                              stime = GetOSDLastKeyInTime();  
 324   3                              diff =  20 * 100; //GetOSDDuration()
 325   3                      }
 326   2                      else { 
 327   3                              stime = OSDDisplayedTime;       
 328   3                              diff = 2 * 100; 
 329   3                              #ifdef SUPPORT_TV
 330   3                              if( TVChManual ) diff = 150; //100              
 331   3                              #endif
 332   3                      }
 333   2              
 334   2                      ctime = GetTime_ms();                   
 335   2      
 336   2                      if( DiffTime_ms( stime, ctime ) >= diff ) {
 337   3      
 338   3                              #ifdef DEBUG_OSD
                                      if( !(dt & MENU) ) {
                                              dPrintf("\r\n(CheckAndClearOSD)DisplayedOSD:0x%x, ", (WORD)dt);
                                              dPrintf("starttime:%d, currtime:%d", stime, ctime);
                                      }
                                      #endif
 344   3      
 345   3                              //if( dt & LOGO )                       ClearLogo();
 346   3                              if( !DisplayInputHold )
 347   3                                      if( dt & INPUTINFO )    Result = ClearInput();
 348   3                              if( dt & TVVOL )                Result = ClearTVInfo();
 349   3      
 350   3                              if( dt & MENU )                 Result = CloseOSDMenu();  
 351   3      
 352   3                              #ifdef SUPPORT_TV
 353   3                              ChannelEdit_Flag = 0;
 354   3                              ChannelEdit_on = 0;     
 355   3                              
 356   3                              if( dt & TVCHN ){ 
 357   4                                      if(TVChManual)
 358   4                                      ChangeTVChannel( DummyChannel );
 359   4                                      else
 360   4                                      Result = ClearTVInfo();
 361   4                              }
 362   3                              #endif
 363   3      
 364   3                              if( Result == 1){
C51 COMPILER V7.50   DISPINFO                                                              04/01/2008 15:02:05 PAGE 7   

 365   4                                      if( DisplayInputHold ) DisplayInput();
 366   4                                      else {
 367   5      
 368   5                                              if( IsAudioMuteOn() )   DisplayMuteInfo();
 369   5                                      }
 370   4                              }
 371   3                              return 1;
 372   3                      }
 373   2              }
 374   1      
 375   1              return 0;
 376   1      }
 377          
 378          #if defined( SUPPORT_PC ) || defined (SUPPORT_TV)
 379          
 380          void SetWindowStart(WORD x, WORD y)
 381          {
 382   1              WriteDecoder(TW88_WINSTART_HI, (x>>8) | ((y>>8)<<4));
 383   1              WriteDecoder(TW88_WINXSTART, (BYTE)x);
 384   1              WriteDecoder(TW88_WINYSTART, (BYTE)y);
 385   1      }
 386          #endif
 387          
 388          #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
 389          
 390          void SetWindowWidth(BYTE width)
 391          {
 392   1              WriteDecoder(TW88_WINWIDTH, width);
 393   1      }
 394          
 395          void DisplayPCInfo(BYTE CODE *ptr)
 396          {
 397   1              WORD xstart, ystart;
 398   1              BYTE len;
 399   1      
 400   1              #ifdef DEBUG_PC
 401   1              dPrintf("\r\n==== DisplayPCInfo (%s) ====", ptr);
 402   1              #endif
 403   1      
 404   1              Clear_bypass();                                                         // HHY 1.52
 405   1      
 406   1              AutoPHPCalDisable();
 407   1              SetPHP( GetPHR() + 0x100 ); // for Sharp-NoTicon by RYU-101205  // Set PHP
 408   1      
 409   1              PanelFreeRun(1);                                                        // FreeRun
 410   1              WriteDecoder(0x06, 0x80);               // Soft Reset
 411   1      
 412   1              ClearOSDInfo();
 413   1      
 414   1              len  = strlen(ptr);
 415   1      
 416   1              xstart = ( PHR_ - len*PCINFO_ZOOM*FONT_WIDTH ) / 2;
 417   1              ystart =  PVR_ / 3;
 418   1              
 419   1              InitOSDWindow(Init_Osd_DisplayPCInfo);
 420   1              SetWindowStart(xstart, ystart);
 421   1              SetWindowWidth(len);
 422   1      
 423   1              ClearDataCnt(PCMEASUREINFO_ADDR, len);
 424   1              DrawAttrCnt(PCMEASUREINFO_ADDR, CH_COLOR_RED,len);       
 425   1      
 426   1              WriteStringToAddr(PCMEASUREINFO_ADDR, (BYTE CODE *)ptr, len);
C51 COMPILER V7.50   DISPINFO                                                              04/01/2008 15:02:05 PAGE 8   

 427   1              ShowOSDWindow(PCINFO_OSDWIN,TRUE);
 428   1              ShowOSDWindowAll(1);
 429   1              
 430   1              DisplayedOSD |=PCINFO;
 431   1      
 432   1      }
 433          
 434          void ClearPCInfo(void)
 435          {
 436   1              if( !(DisplayedOSD & PCINFO) )          return;                 //ljy070803
 437   1      
 438   1              DisplayedOSD &= (~(PCINFO));
 439   1              ShowOSDWindow(PCINFO_OSDWIN,FALSE);
 440   1              dPuts("\r\n== ClearPCInfo ==");
 441   1      
 442   1      //      PanelMute(0);                                                           // HHY 1.63
 443   1      }
 444          
 445          extern CODE BYTE AutoAdjustInfo[]; 
 446          
 447          void DisplayAutoAdjust(void)
 448          {
 449   1              InitOSDWindow(Init_Osd_BarWindow);
 450   1              ClearDataCnt(OSDMENU_BARADDR, 50); // Total 25*2 Char.
 451   1              DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 50 );       
 452   1              WriteStringToAddr(OSDMENU_BARADDR, AutoAdjustInfo, 25);
 453   1      
 454   1              ShowOSDWindow(OSDBARWINDOW,TRUE);
 455   1              ShowOSDWindowAll(1);
 456   1      }
 457          void ClearAutoAdjust(void)
 458          {
 459   1              ShowOSDWindow(OSDBARWINDOW,FALSE);
 460   1      }
 461          
 462          #endif  // SUPPORT_PC
 463          
 464          //==================================================================
 465          //                                              TV Info
 466          //==================================================================
 467          #ifdef SUPPORT_TV
 468          
 469          #define TVCHN_WIDTH     3
 470          
 471          void DisplayTVChannel(BYTE chn, BYTE Chcolorflag )
 472          {
 473   1              extern CODE BYTE Init_Osd_DisplayTVChannel[];
 474   1      
 475   1              BYTE len, str[5];
 476   1              BYTE Char_Color = CH_COLOR_GREEN;
 477   1              WORD xstart, ystart;
 478   1      
 479   1              DisplayedOSD &= ~TVCHN;
 480   1              ClearOSDInfo();
 481   1      
 482   1              if     ( chn <10 )   len = 1;
 483   1              else if( chn <100 )  len = 2;
 484   1              else                 len = 3;
 485   1      
 486   1              if( (IsSavedCurChn()==0) && (Chcolorflag)) Char_Color = CH_COLOR_RED;  // Not Saved Channel
 487   1      
 488   1              utoa( (WORD)chn, str, 10);
C51 COMPILER V7.50   DISPINFO                                                              04/01/2008 15:02:05 PAGE 9   

 489   1              len = strlen(str);
 490   1      
 491   1              xstart = PHR_ - len*TVCHN_ZOOM*FONT_WIDTH-10;
 492   1              ystart =  0;
 493   1              
 494   1              InitOSDWindow(Init_Osd_DisplayTVChannel);
 495   1              ClearDataCnt(TVCHINFO_ADDR, TVCHN_WIDTH);
 496   1              DrawAttrCnt(TVCHINFO_ADDR, BACK_COLOR|Char_Color, TVCHN_WIDTH );         
 497   1              
 498   1              SetWindowStart(xstart, ystart);
 499   1      
 500   1              WriteStringToAddr(TVCHINFO_ADDR, str, len);  
 501   1      
 502   1              ShowOSDWindow(TVINFO_OSDWIN,TRUE);
 503   1              ShowOSDWindowAll(1);
 504   1      
 505   1              DisplayedOSD |= TVCHN;
 506   1              OSDDisplayedTime = GetTime_ms();                        //GetTic();
 507   1      }
 508          
 509          #if defined( PAL_TV )
 510                                                                  //012345678901234
 511          CODE BYTE ScanTVInfo1[]=        {"Auto Scanning ...        "};
 512          CODE BYTE ScanTVInfo2[]=        {"Freq:             CH:       "};
 513          CODE BYTE ScanTVInfo3[]=        {"Press MENU button to stop"};
 514          
 515          #define SCANTV_CHN_FREQ_POS              30
 516          #define SCANTV_CHN_POS           46
 517          
 518          void DisplayScanTV(void)
 519          {
 520   1              InitOSDWindow(Init_Osd_BarWindow_pal);
 521   1      
 522   1              DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 25 );       // All Line Attr clear by default col
             -or.
 523   1              DrawAttrCnt(OSDMENU_BARADDR+25, BG_COLOR_WHITE | CH_COLOR_CYAN, 25 );    // All Line Attr clear by default 
             -color.
 524   1              DrawAttrCnt(OSDMENU_BARADDR+50, BG_COLOR_CYAN | CH_COLOR_WHITE, 25 );    // All Line Attr clear by default 
             -color.
 525   1      
 526   1              WriteStringToAddr(OSDMENU_BARADDR, ScanTVInfo1, 25);  // 25: width
 527   1              WriteStringToAddr(OSDMENU_BARADDR+25, ScanTVInfo2, 25);  // 25: width
 528   1              WriteStringToAddr(OSDMENU_BARADDR+50, ScanTVInfo3, 25);  // 25: width
 529   1      
 530   1              ShowOSDWindow(OSDBARWINDOW,TRUE);
 531   1              ShowOSDWindowAll(1);
 532   1      }
 533          void DisplayChannelFreq(BYTE *ptr)
 534          {
 535   1              BYTE len;
 536   1              len = strlen(ptr);
 537   1              WriteStringToAddr(OSDMENU_BARADDR+SCANTV_CHN_FREQ_POS, ptr, len);
 538   1      }
 539          
 540          #else // PAL_TV else
                                                                      //012345678901234
              CODE BYTE ScanTVInfo1[]=        {"Auto Scanning ...        "};
              CODE BYTE ScanTVInfo2[]=        {"Press MENU button to stop"};
              
              #define SCANTV_CHN_POS           21
              
              void DisplayScanTV(void)
C51 COMPILER V7.50   DISPINFO                                                              04/01/2008 15:02:05 PAGE 10  

              {
                      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
              
                      ShowOSDWindow(OSDBARWINDOW,TRUE);
                      ShowOSDWindowAll(1);
                      SetDisplayedOSD( MENU ); // hans
              }
              #endif
 562          
 563          void DisplayScanTVChannel(BYTE *ptr)
 564          {
 565   1              BYTE len;
 566   1              len = strlen(ptr);
 567   1              WriteStringToAddr(OSDMENU_BARADDR+SCANTV_CHN_POS, ptr, len);
 568   1      }
 569          
 570          #ifdef PAL_TV
 571          void DisplayManualScanTVProg(BYTE flag)
 572          {
 573   1              CODE BYTE PlusDirection[] = { 0x1c, 0x1c, 0x1c, 0 };
 574   1              CODE BYTE MinusDirection[] = { 0x1b, 0x1b, 0x1b, 0 };
 575   1      
 576   1              WriteStringToAddr(OSDMENU_BARADDR+21, (flag==UP? PlusDirection:MinusDirection), 3);
 577   1      }
 578          #endif
 579          
 580          void ClearScanTV(void)
 581          {
 582   1              ShowOSDWindow(OSDBARWINDOW,FALSE);
 583   1      }
 584          
 585          #endif
 586          
 587          BYTE ClearTVInfo(void)
 588          {
 589   1              
 590   1              if( DisplayedOSD & TVVOL )
 591   1              {       ShowOSDWindow(OSDBARWINDOW, FALSE);
 592   2                      DisplayedOSD &= (~(TVVOL));
 593   2              }
 594   1              else
 595   1              {
 596   2                      ShowOSDWindow(TVINFO_OSDWIN, FALSE);
 597   2                      DisplayedOSD &= (~(TVCHN));
 598   2              }
 599   1              return 1;
 600   1      }
 601          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1723    ----
   CONSTANT SIZE    =    286    ----
   XDATA SIZE       =   ----    ----
C51 COMPILER V7.50   DISPINFO                                                              04/01/2008 15:02:05 PAGE 11  

   PDATA SIZE       =   ----      49
   DATA SIZE        =      3    ----
   IDATA SIZE       =   ----    ----
   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 + -