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

📄 osdfont0.c

📁 车载电子影音系统dvd播放系统原程序代码
💻 C
📖 第 1 页 / 共 2 页
字号:
                    if ( !(_wOSDTemp1&0x3) )
                    {
                        _bPosiIndex = aFontWidth_0[_wOSDTemp1>>2]>>2; //*2/8   
                    }   

                    //Low DW Half. the line hasn't been coded.
                    //if ( (_bShowTime>=FONT_HEIGHT908) && (_wOSDTemp1%4)==0 && (_bPosiIndex<=4) )
/*
                    if ( bLowDW && (_wOSDTemp1%4)==0 && (_bPosiIndex<=4) )
                    {
                        _wStartPxl--; //restore
                        //if (_OSD_FillDatatoCache1())
                        //    goto WAIT_ACK;
                        //continue; 
                    }                                  
*/                    
                    if (_OSD_FillDatatoCache0())
                        goto WAIT_ACK;
                }
            }          
            // Step 6: Waiting for Command acknowledge
            WAIT_ACK:
#ifdef  SUPPORT_ACKSTATUS        
            __bW99AVACKStatus |= OSD_FILL_CFONTTABLE;
#endif        
//LJY0.85, to invoke Service_420() while loading font table.
#ifndef	INPUT_PATH_HOSTIF  
  Service_420 () ;
#endif

            _W99AV_WaitACK(INT_CACK);
        }
#ifdef SYSTEM_8051
        // Step 7: enable Time0/ INT1
        ET0=1;  // LLY.0992
        EX1=1;  // LLY.170
#endif // #ifdef SYSTEM_8051
    }

//LJY1.10, no need for poweron standby mode
#ifndef POWERON_STANDBY   
    start_service_420 = 1;    //LJY1.05, enable service 420.
#endif    

#endif  // #ifndef NO_OSD
}


//Kevin0.84, fill 908 font table
//  ************************************************************************
//  Function    :   _OSD_FillDatatoCache0
//  Description :   Fill OSD font table to Cache
//  Arguments   :   bData, specify the desired DRAM address to store FONT_TABLE
//                  bNo, specify total char number in current font table
//                  bByteNum, a point to BYTE array, ie. font table array
//  Return      :   TRUE, Cache Full or Data Completed
//                  FALSE, Cache still non-full.
//  Side Effect :
//  ************************************************************************
BYTE _OSD_FillDatatoCache0()
{
#ifndef  NO_OSD    
/////#ifdef COMPRESSION_OSD_FONT 
    
    /*
    //High DW Half 
    //if ( !bLowDW)  
    {
        //////if (_bPosiIndex>4)
        if (_bPosiIndex&0xfc)
            _bPosiIndex=4;        
    } 
    */
    /*
    //Low DW Half
    else
    {
        if (_bPosiIndex>4)
            _bPosiIndex-=4;//5->1, 6->2, 7->3, 8->4
        else
            _bPosiIndex = 0;
    }    
    */
    switch  (_bPosiIndex)
    {
/*       
        //the line hasn't been coded. so fill four bytes of zeros 
        case 0: //0 byte wide (0 pixels) for Low DW use only
            //if ((_wOSDTemp1%4)==0) // Chuan 172r 2002/03/29: write two zero /////if(!(_wOSDTemp1&0x3))
            if ( !(_wOSDTemp1&0x3) )            
            {
#if  IO == IO_PCI
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
#else
                OUTB(CDPR, 0x0);
                OUTB(CDPR, 0x0);
                OUTB(CDPR, 0x0); 
                OUTB(CDPR, 0x0);        
#endif                
                _wOSDTemp1+=4; //0x00, 0x00, 0x00, 0x00
            }
            //else
            //{
                //do nothing
                //_wOSDTemp1=_wOSDTemp1; 
            //}                                
            break;                
*/       
        case 1: //1 byte wide (4 pixels)
            //if ((_wOSDTemp1%4)==0) // Chuan 172r 2002/03/29: write two zero /////if(!(_wOSDTemp1&0x3))
            if ( !(_wOSDTemp1&0x3) )            
            {
#if  IO == IO_PCI
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
#else
                OUTB(CDPR, 0x0);
                OUTB(CDPR, 0x0);
                OUTB(CDPR, 0x0);        
#endif                
                _wOSDTemp1+=4; //0x00, 0x00, 0x00, _bIdex
            }
            else
            {
                _wOSDTemp1++; //_bIdex
            }                                
#if  IO == IO_PCI
            W99AV_OutCacheData(_bIdex);
#else
            OUTB(CDPR, _bIdex);        
#endif             
            break;        
        
        case 2: //2 bytes wide (8 pixels)
            //if ((_wOSDTemp1%4)==0) // Chuan 172r 2002/03/29: write two zero 
            if ( !(_wOSDTemp1&0x3) )            
            {
#if  IO == IO_PCI
                W99AV_OutCacheData(0x00);
                W99AV_OutCacheData(0x00);
#else
                OUTB(CDPR, 0x0);
                OUTB(CDPR, 0x0);        
#endif                
                _wOSDTemp1+=3; //0x00, 0x00, _bIdex
            }
            else
            {
                _wOSDTemp1++; //_bIdex
            }                                
#if  IO == IO_PCI
            W99AV_OutCacheData(_bIdex);
#else
            OUTB(CDPR, _bIdex);        
#endif 
            break;
            
        case 3: //3 bytes wide (12 pixels)
            //if ((_wOSDTemp1%4)==0) // Chuan 172r 2002/03/29: write one zero
            if ( !(_wOSDTemp1&0x3) )            
            {
#if  IO == IO_PCI
                W99AV_OutCacheData(0x00);
#else
                OUTB(CDPR, 0x0);
#endif                
                _wOSDTemp1+=2; //0x00, _bIdex
            }
            else
            {
                _wOSDTemp1++;            
            }                
#if  IO == IO_PCI
            W99AV_OutCacheData(_bIdex);
#else
            OUTB(CDPR, _bIdex);        
#endif 
            break;
            
        case 4: //4 bytes wide (16 pixels)
        case 5:
        case 6:
        case 7:
        case 8:
            _wOSDTemp1+=1; //_bIdex
#if  IO == IO_PCI
            W99AV_OutCacheData(_bIdex);
#else
            OUTB(CDPR, _bIdex);        
#endif             
            break;            
            
        default:
            //add protection here
            break;
    }
    
/*    
if (_bPosiIndex!=0)
{    
#if  IO == IO_PCI
        W99AV_OutCacheData(_bIdex);
#else
        OUTB(CDPR, _bIdex);        
#endif               
}
*/

#if 0
    *(_bIndexArray+(BYTE)(_wOSDTemp1%_bPosiIndex)) = _bIdex;
    //_dwFontData = (_dwFontData<<8) | _bIdex;
    _wOSDTemp1++;
    if ((_wOSDTemp1%_bPosiIndex)==0)
    {
        //_dwFontData = _dwFontData << ((4-_bPosiIndex)<<3);
        //_bIndexArray = (BYTE DATA*)&_dwFontData ;
#if  IO == IO_PCI
        _outp(CDPR_BYTE, *_bIndexArray);
        _outp(CDPR_BYTE, *(_bIndexArray+1));
        _outp(CDPR_BYTE, *(_bIndexArray+2));
        _outp(CDPR_BYTE, *(_bIndexArray+3));        
#else
        OUTB(CDPR, *(_bIndexArray+3));
        OUTB(CDPR, *(_bIndexArray+2));
        OUTB(CDPR, *(_bIndexArray+1));
        OUTB(CDPR, *_bIndexArray);        
#endif                
        _wOSDTemp1+=(4-_bPosiIndex);
    }
#endif
    //if (!(_wOSDTemp1%256)||(_wOSDTemp1==_wOSDTemp))
    if (!(_wOSDTemp1&0xff)||(_wOSDTemp1==_wOSDTemp))
    {
        return TRUE;
    }
/////#endif  // #ifdef COMPRESSION_OSD_FONT
#endif  // #ifndef  NO_OSD
    return FALSE;
}        

#endif  // #ifdef SUPPORT_GZIP_COMPRESSION

⌨️ 快捷键说明

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