亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? utl.c

?? 車載電子影音系統dvd播放系統原程序代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
// ******  Big modification History Area  ******
// Micky1.21, CodeReview
//  - Remove __btFreeze.
// Micky1.07, remove CHIP_W9928 for 28AF related codes
// Micky1.07, remove DVD28C_xxx reference
// Micky1.07, remove CDDA_WAITSERVO

// LLY.274p, some big modification
// [1] rename all MP3 relative info. because module name has changed !!
//     - "mp3.h"  -->  "fmanager.h"
//     - MP3_GetRange()  -->  FM_GetRange()
// Micky2.80a
//  - remove all COMMAND_AUDIO codes.
//  - remove MULTI_DISC_SYSTEM codes
//  - remove unused codes from UTL_GetCurrentTime(), DiffOfTwo(), UTL_ReadSectors()
// LLY2.80a, the modification history
//  - remove the code while un-define UNRESET_AFTER_CDROM_DECODING,
//    ie. always go "unreset" path
///////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////
// ***** Global Define Area *****
// ifdef _DUMP_SHOWTIME, will display some information for UTL_OutputShowTime
// It's debug only.
// #define   _DUMP_SHOWTIME

// if define it, will print STC time when STC>celltime 2 seconds.
//#define _DEBUG_TIME

// ifdef _USE_DEBUG_CMD, will use SP_Ptr to check the sucess of CDROM Decoding > 1.60
// #define  _USE_DEBUG_CMD
/////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////
// *****  Include header file Area  *****
// The file "winav.h" must be included in first line
#include "winav.h"
//DVD_039-1
#include "cell.h"
#include "cc.h"     // for variable reference
#include "utl.h"
#include "comutl.h"
#include "servo.h"
#include "hal.h"
#include "cdinfo.h"
//#include "vcd20.h"
// wyc.172r, need to include digest define.
#include "digest.h"

#include "input.h"  // for KEY_xxx reference
#include "chips.h"
#include "osd.h"
#include "monitor.h"
#include "avsys.h" // LLY.277a-2
#include "amp.h"
#include "linear.h"     //Kevin0.86, add

#include "isr.h"
#include "servo.h"
// wyc.277a-AVSys
#include "initial.h"
#include "ucode.h"
#ifdef    _WINDVD
#include    "navigate.h"
#endif    // _WINDVD

#ifndef NO_MP3
// MP3DISC016
#include  "fmanager.h" //  "mp3.h"
//DVD016-1extern  BIT __btMP3Disc;
#endif  // #ifndef NO_MP3
// Micky2.80, include "thumb.h" for reference __bThumbnailMode.
#include    "thumb.h"
///////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////
// ***** Extern other module's global variable Area *****
extern  WORD    __wXStart,__wYStart;        // *** 0.46(TCH); For Zoom Clipping
extern  WORD    __wSlowSpeed;                   // in "cc.c"
extern  DWORD   __dwSTCValue;  // LLY.0991
// wyc.172r, reduce SRAM
#ifndef NO_DVDDIGEST
extern  BYTE    __bPreDVDDigest;
extern  BYTE    __bDigestStop;
#endif // NO_DVDDIGEST
//wyc.100
extern  BYTE    __bDVDDigest;
//end..
//Kevin0.86, comment
//extern BYTE     __bInputNumIndex ;
//extern BYTE     __bProgramCurrentIndex;
//end ..

//MICKY041 begin
extern DWORD   __dwTimeTorelence;
//MICKY041 end
extern  BYTE    __bSTCRunning;
// wyc1.10, rename this variable for supporting KEY_NEXT w/o reset video.
extern  BYTE    __bNextHWReset;
//////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
// ***** Declare Global Variable Area *****
#ifdef  INPUT_PATH_HOSTIF
DWORD   __dwUTLReadSector;
#endif  // #ifdef  INPUT_PATH_HOSTIF

// wyc.277a-AVSys, record the DVD system status when exit DVD system to AV1. 
#ifdef  SUPPORT_AV_SYSTEM
BYTE    __bDVDStatus;
#endif // #ifdef  SUPPORT_AV_SYSTEM

//DWORD   __dwAudioType=3;     // assume as MPEG mono audio data for safety
//LLY.101, extend CheckAudioType flag from BIT to BYTE unit
//BIT     __btCheckAudioType=FALSE;
// Micky2.80, review global variables init.
BYTE    __bCheckAudioType;// Micky2.80, review global variables init=CHECK_NONE;
BIT     __btCheckVideoType;// Micky2.80, review global variables init=FALSE;
WORD    wRISCArg;

BYTE    __bModePlay;//Micky2.80, review global variables init.= MODE_PLAYUNKNOW;      //
BYTE    __bLastModePlay;
// LLY.038, keep the previous play mode before enter CDROM decoding
BYTE    __bModePlayPreCDROM;// Micky2.80, review global variables init= MODE_PLAYUNKNOW;
// LLY.274p, keep the current and new desired playing mode attribute
BYTE    __bAttrPlay;
BYTE    __bAttrPlayNew;

BYTE  IDATA     __bMin, __bSec, __bFrame;
// wyc1.24, SFR for control booting from SRAM or FLASH.
#if  IO == IO_8051
sfr UTL_RUN_PROGRAM = 0xc3;   // Chuan0.86, used to control PC to 4K SRAM
#endif
WORD    __wFMJPGPlayCount;
extern  BYTE    __bFMJPGNext;
extern  DWORD   __dwFMJPGNextGap;

//BIT __btPreMPEGtoCDDA=FALSE;          // TCC276-2nd, removed since not used.

//MICKY modify for CDDA channel swap begin
//BIT __btMPEGtoFirstCDDA=FALSE;                // TCC276-2nd, removed since not used
//MICKY modify for CDDA channel swap end

// f/w 0.45
#ifdef _TIME_CIRCLE             // TCC172r, these 2 variables are only used if defined _TIME_CIRCLE
DWORD   __dwPreTimeCircle;
BYTE    __bNormalCount;
#endif  // #ifdef _TIME_CIRCLE

#if defined(WMA_DEBUG) || defined(MP3_DEBUG) //Kevin1.22a, add
DWORD    __dwPlayFileTime;
#endif

//DVD_050SRAM
DWORD   _dwUTLTemp;
DWORD   _dwUTLTemp1; // LLY.161-2
//DVD_051Micky
// it records the stable time value
// to prevent the time value is undated by interrupt
DWORD   data    __dwSysTime;
// support a function to read stable time

DWORD   _dwTriggerShowTime;// Micky2.80, review global variables init= NULL;       // Next TRIGGER OSD/PANEL time
BYTE    __bGap_TriggerShowTime;// Micky2.80, review global variables init= COUNT_500_MSEC+ COUNT_200_MSEC;       // Next TRIGGER OSD/PANEL time
// ** TCH1.60-1; DWORD           _dwTimePrev= NULL;        // ** TCH0.99-1; record the previous show time
DWORD   _dwTimePrev;        // ** TCH0.99-1; record the previous show time
DWORD   _dwUTLNextTriggerCount;   // ** TCH1.70-2; record SysTimer for next Trigger.

// DVD_170Micky, enhance MP3 display time method
// accumulate frames count.
DWORD    _dwTotalFrameCount;   // total decoded frames count for current track
DWORD    _dwPreFrameCount;     // previous frame count number
// wyc.172-CDDA, support a flag to represent playing across tracks automatically.
BYTE    __bCDDAAutoChTrk;

// DVD_172Micky, add two variables for UTL while loop use only!!!
// As _dwUTLTemp/_dwUTLTemp1 can't be used when cross function.
DWORD   _dwTimeStart;   // record the start time for while loop
WORD    _wTimeOutCount; // record the time out count for while loop
// wyc.275-PicCD, a variable to check if need to record the PARSER status and set DVDCTLR to connect bitstream in audio buffer.
// wyc2.85, rename __bJPGVar
BYTE    __bJPGVar;
#ifdef PRESTOP_BEFORE_SETUP_AND_PROGRAM //xuli0909
extern BYTE __bSetupMode,__bProgramStop;
#endif

//  *********************************************************************
//  Function    :   UTL_ReadSectors
//  Description :   Input the CD-ROM data, then control MPEG to decode
//                              :       CD-ROM data
//  Arguments   :   hsgTime     : starting sector for decoding
//                  NoOfSector  : read sector NO. (max is 40 ? )
//                  bSectorFormat:The sector mode, the definition is the
//                                same as HAL_SetSectorFromat parameter
//  Return      :   TRUE is successful
//  Side Effect :   it'll change MPEG status
//  *********************************************************************
BYTE    UTL_ReadSectors ( DWORD hsgTime, BYTE NOofSector, BYTE bSectorFormat)
{
#ifdef  _USE_DEBUG_CMD
    DWORD       dwPtr_SP;   // ** TCH1.60a;
#endif  //      _USE_DEBUG_CMD

#ifdef  INPUT_PATH_HOSTIF

    // ** TCH0.25; begin...
    // Need to check the valid of range
    if ( ! HAL_IsNeedCDROMDecoding ( hsgTime, NOofSector ) )
    {
#ifdef    _DUMP_CDINFO

#endif    // _DUMP_CDINFO
        return TRUE;
    }
#ifdef    _DUMP_CDINFO  // ** TCH0.39;
    PRINTF ( "\n [UTL:UTL_ReadSectors] [%ld-%ld]...", hsgTime, hsgTime+ NOofSector-1 );
#endif    // _DUMP_CDINFO

    // ** DVD-TCH0.25; Suppose to read EXTRA Sectors if possible
    if ( NOofSector< __wCDROMReadingRange )
        NOofSector= (BYTE)__wCDROMReadingRange;

    __dwSectorCDROMBegin= hsgTime;
    __dwSectorCDROMEnd= __dwSectorCDROMBegin+ NOofSector- 1;

#ifdef    _DUMP_CDINFO
    PRINTF ( "--> Real  [%ld-%ld]...", __dwSectorCDROMBegin, __dwSectorCDROMEnd );
#endif    // _DUMP_CDINFO
    // ** TCH0.25; end...

    __dwUTLReadSector= hsgTime;
    // ** TCH0.39; Simulate the same value for ATAPI/ CDIF
    UTL_SetPlayMode ( MODE_PLAYCDROM );
    // Micky2.81_host, support host I/F
    {
        // force data to be ready in DRAM
        // Chuan0.83, missing BYTE declaration, compile fail @Keil
        void SERVO_CDROMRead(BYTE NOofSector);
        __dwW99AVECCBASE=ECCBASE_BYPASS;
        SERVO_CDROMRead(NOofSector);
    }


    return  TRUE;

#else   //#ifndef  INPUT_PATH_HOSTIF
        // TCC276-2nd, move common part of ATAPIIF/DVDIF/CDIF together.
    // ** TCH0.25; begin...
    if ( ! HAL_IsNeedCDROMDecoding ( hsgTime, NOofSector ) )
    {
        return TRUE;
    }
#ifdef    _DUMP_CDINFO      // ** TCH0.39;
    PRINTF ( "\n [UTL:UTL_ReadSectors] [%ld-%ld]...", hsgTime, hsgTime+ NOofSector-1 );
#endif    // _DUMP_CDINFO

#ifdef  _USE_DEBUG_CMD
    // ** TCH1.60a; begin...
    W99AV_Command1(COMMAND_RDEBUGINFO,CMDARG_RDEBUGINFO);  // Chuan2.80p, Use define instead of number
    W99AV_OutIndex ( 0x10000000 ); // set AIR(31:0)=0x10000000
    dwPtr_SP= W99AV_InData ();

#ifdef    _DUMP_CDINFO
    {
        DWORD       dwTCH, dwTCH1;

        W99AV_Command1(COMMAND_RDEBUGINFO,CMDARG_RDEBUGINFO);  // Chuan2.80p, Use define instead of number
        for ( dwTCH=0; dwTCH<2; dwTCH++)
        {
          W99AV_OutIndex(0x10000000+dwTCH); // set AIR(31:0)=0x10000000
          if ( ! dwTCH )
            dwPtr_SP= W99AV_InData ();
          dwTCH1=W99AV_InData();
          PRINTF ( "\n **** COM_DEBUG [%ld]= [%lx]..", dwTCH, dwTCH1 );
        }

        dwTCH= 0;

        if ( dwTCH == 1 )
        {
extern           void _CC_DumpDRAM(char* strFile, DWORD dwStart, DWORD dwEnd);  // LLY.046OSD

            for ( dwTCH1= 0x4800; dwTCH1< 0x4900; dwTCH1++ )
            {
               W99AV_WriteDRAMData ( dwTCH1, 0x12345678 );
            }

            _CC_DumpDRAM ( "CDROM_B.TXT", 0x4800, 0x7200 );
        }
    }
#endif    // _DUMP_CDINFO
    // ** TCH1.60a; end...
#endif  //      _USE_DEBUG_CMD

    // wyc0.87, fix pathtable start+ NOofSector may exceed DiscEnd.
    // need to check if read range is over disc end.
    // DVD needn't to do this check because it is control by servo, not parser.
    /*
    if ( NOofSector< __wCDROMReadingRange )
        NOofSector= (BYTE)(__wCDROMReadingRange);
    */
    if ( NOofSector< __wCDROMReadingRange )
    {
        NOofSector= (BYTE)(__wCDROMReadingRange);
        if ( (__bCurrentIF == BITSTREAM_CDIF) && ((hsgTime + NOofSector) >= __dwTimeDiscEnd) )
            NOofSector= (BYTE)(__dwTimeDiscEnd - hsgTime -2);   // don't know why it's 2??
    }
    // ** TCH0.25; end...

// f/w 0.45(f/w 0.42, 11.20.97)
// can solve play CD-DA->Open->Close->audio noise???
    CHIPS_OpenAudio( FALSE );
    // close CD-IF
    HAL_ControlCDIF(HAL_CDIF_CLOSE);

    // LLY.160, don't keep previous play mode while it's MODE_PLAYCDROM
    // LLY.038, keep the previous play mode before enter CDROM decoding
    if(__bModePlay != MODE_PLAYCDROM)
        __bModePlayPreCDROM= __bModePlay;

    __bModePlay= MODE_PLAYCDROM;        // ** S-TCH;
    // LLY.274p, must assign playing mode attribute to None
    // Because, it don't call UTL_SetPlayMode(MODE_PLAYCDROM)
    // Notice: Must check more ???
    __bAttrPlay= ATTR_NONE;
#ifdef  SUPPORT_CDIF
if (__bCurrentIF == BITSTREAM_CDIF)
{
    // DVD_172Micky, use _dwUTLTemp/_dwUTLTemp1 for temporary variable use.
    // remove dwTemp/dwCount/wTemp/bTemp.
    DWORD       dwHSG;
    WORD        i;
    BYTE        bRet;   //= FALSE;
    //bCMCR is not used now, use bECCEnable to replace it.
    BYTE        bECCEnable; //=TRUE;

    // TCC276, move to below.
    // bRet = FALSE;
    bECCEnable = TRUE;

    dwHSG= hsgTime;
    // the jump CDROM time will be earlier than the dedicated starting sector
    if ( hsgTime > __dwTimeTorelence+15L )
        dwHSG-= (__dwTimeTorelence+15L);
    else
        dwHSG= NULL;

// for a disc Terasa Teng can't find MSF(00:04:00)
// the Gotime will be over the specified position
for ( i= 0; i< 2; i++ )
{
    if (bECCEnable)
    {
        // clear the CDF status bit

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人黄色一级视频| 欧美国产精品一区| 国产视频视频一区| 亚洲午夜电影在线| 成人动漫一区二区| 精品黑人一区二区三区久久| 亚洲最新在线观看| av不卡免费在线观看| 欧美成人精品高清在线播放| 亚洲综合在线电影| av综合在线播放| 国产视频一区在线观看| 人人狠狠综合久久亚洲| 欧美日韩一区国产| 亚洲免费观看在线观看| 国产成人精品免费视频网站| 精品美女一区二区三区| 三级精品在线观看| 欧美三级欧美一级| 一区二区免费看| 在线欧美一区二区| 亚洲女人的天堂| 99精品欧美一区二区三区小说| 精品精品欲导航| 欧美aaaaa成人免费观看视频| 91污在线观看| 亚洲男同性视频| 99精品黄色片免费大全| 亚洲女女做受ⅹxx高潮| 色先锋久久av资源部| 一区二区三区四区不卡在线| 不卡视频一二三| 中文字幕亚洲一区二区va在线| 国产一区欧美日韩| 国产香蕉久久精品综合网| 国产高清久久久久| 中文字幕欧美国产| 99久久99久久免费精品蜜臀| 中文字幕亚洲精品在线观看| av日韩在线网站| 综合激情成人伊人| 91女神在线视频| 亚洲午夜私人影院| 日韩一级黄色大片| 国产尤物一区二区在线| 欧美高清在线精品一区| 色综合久久综合| 午夜电影网亚洲视频| 日韩欧美一二区| 国产传媒欧美日韩成人| 国产精品成人一区二区艾草| 在线免费不卡视频| 久久精品国产精品亚洲综合| 久久影院午夜片一区| www.性欧美| 亚洲欧美日韩在线播放| 欧美男人的天堂一二区| 久久精品国产亚洲一区二区三区| 精品国产乱码久久久久久免费| 国产91丝袜在线播放0| 一区二区三区精品在线观看| 制服.丝袜.亚洲.中文.综合| 国产自产视频一区二区三区| 亚洲欧美日韩一区二区三区在线观看| 欧美三级电影在线看| 美女看a上一区| 国产精品女主播av| 欧美一区二区啪啪| www.色综合.com| 毛片av一区二区| 一区二区在线免费| 久久婷婷国产综合精品青草| 99久久99久久免费精品蜜臀| 日本亚洲欧美天堂免费| 国产精品久久三| 日韩欧美一区在线| 91丨九色丨蝌蚪富婆spa| 久久99久久99精品免视看婷婷 | 成人精品高清在线| 午夜激情久久久| 国产精品大尺度| 精品成人a区在线观看| 欧美性大战久久久久久久蜜臀| 国产在线看一区| 日本中文一区二区三区| 亚洲欧美色图小说| 亚洲精品在线电影| 日韩一区二区在线观看| 色婷婷av一区二区三区大白胸| 国产一区久久久| 亚洲国产日日夜夜| 亚洲精品欧美综合四区| 国产亚洲自拍一区| 欧美r级电影在线观看| 欧美精品少妇一区二区三区| 95精品视频在线| 99久久国产综合精品女不卡| 黄页视频在线91| 麻豆国产91在线播放| 丝袜美腿亚洲综合| 午夜视黄欧洲亚洲| 亚洲国产人成综合网站| 亚洲欧美一区二区三区极速播放| 国产日韩欧美不卡在线| 精品国产麻豆免费人成网站| 91精品国模一区二区三区| 欧美三级韩国三级日本三斤 | 日韩精品资源二区在线| 在线不卡a资源高清| 欧美日韩高清一区| 欧美日韩国产天堂| 欧美日韩不卡在线| 91精品久久久久久久99蜜桃 | 日本欧美一区二区在线观看| 亚洲成人黄色小说| 日韩精品国产精品| 日本vs亚洲vs韩国一区三区| 日韩经典一区二区| 日韩电影在线看| 裸体歌舞表演一区二区| 精品一区二区三区久久久| 国内不卡的二区三区中文字幕| 久久爱另类一区二区小说| 精一区二区三区| 精品一区二区在线播放| 国产麻豆精品theporn| 高清国产一区二区| 99精品桃花视频在线观看| 在线一区二区三区四区五区| 欧美色网一区二区| 91精品国产麻豆| 久久蜜桃一区二区| 日韩一区欧美一区| 午夜伊人狠狠久久| 美腿丝袜亚洲三区| 国产成人午夜视频| 色婷婷久久久亚洲一区二区三区| 欧美精品1区2区| 2020国产精品自拍| 日本一区二区高清| 亚洲一区二区免费视频| 免费日本视频一区| 国产成人aaa| 欧美性猛交xxxxxx富婆| 精品国精品国产尤物美女| 国产女主播在线一区二区| 国产精品福利影院| 日韩av网站在线观看| 成人亚洲精品久久久久软件| 一本一道综合狠狠老| 欧美草草影院在线视频| 亚洲欧美综合网| 美日韩一区二区| 97久久精品人人做人人爽| 欧美日韩精品系列| 国产精品美女久久久久aⅴ| 亚洲图片欧美色图| 成人小视频免费观看| 欧美久久久久久久久中文字幕| 欧美韩国日本一区| 全部av―极品视觉盛宴亚洲| 99久久精品免费| 久久中文字幕电影| 日本亚洲最大的色成网站www| www.日韩大片| 日韩欧美色电影| 一区二区三区日本| 岛国精品在线播放| 欧美电视剧在线看免费| 一区二区三区**美女毛片| 国产91在线观看丝袜| 欧美v日韩v国产v| 亚洲高清视频的网址| 99久久婷婷国产精品综合| 久久久亚洲国产美女国产盗摄 | 欧美精品在线一区二区三区| 国产精品高潮呻吟| 国产福利91精品| 日韩欧美一区二区免费| 午夜影视日本亚洲欧洲精品| 日本久久电影网| 亚洲欧洲色图综合| 成人影视亚洲图片在线| 久久精品网站免费观看| 免费观看在线色综合| 欧美日韩成人一区二区| 亚洲午夜一区二区三区| 在线观看欧美精品| 亚洲蜜臀av乱码久久精品| 99精品偷自拍| 亚洲丝袜精品丝袜在线| 成人成人成人在线视频| 中文字幕免费不卡| 国产 日韩 欧美大片| 久久久久久久久久久久久久久99| 精彩视频一区二区| 久久夜色精品一区| 国产精品一区免费在线观看| 精品日韩在线观看| 狠狠色丁香婷婷综合|