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

📄 dvdinfo.h

📁 车载电子影音系统dvd播放系统原程序代码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define     VTSI_VTS_AST_Ns             270
#define     VTSI_VTS_AST_ATRT           272
#define     VTSI_VTS_SPST_Ns            348 // 348+192=540
#define     VTSI_VTS_SPST_ATRT          350

// ** TCH0.29; begin...
// Mask AND/OR for V_ATR
// 00b means 4:3, 11b means 16:9, 0x0C00.
#define     MASK_ASPECT_RATIO(a)        (((a)>>10 ) & 0x3)
#define     MASK_ASPECT_RATIO_4_3       0x00
#define     MASK_ASPECT_RATIO_16_9      0x03

// 00b means LB&PS, 01b PS, 10b LB, 11b Reserved, 0x0300
#define     MASK_DISPLAY_MODE(a)        (((a)>>8 ) & 0x3)
#define     MASK_DISPLAY_MODE_PS_LB     0x00
#define     MASK_DISPLAY_MODE_PS        0x01
#define     MASK_DISPLAY_MODE_LB        0x02

// ** TCH0.99e; begin...
// 000b means 720x480, 720x576.
// 001b means 704x480, 704x576.
// 010b means 352x480, 352x576.
// 011b means 352x240, 352x288.
// Others: reserved..
#define     MASK_SOURCE_RESOLUTION(a)   (((a)>>3 ) & 0x7)
#define     MASK_SOURCE_RESOLUTION_720_480      0x000
#define     MASK_SOURCE_RESOLUTION_704_480      0x001
#define     MASK_SOURCE_RESOLUTION_352_480      0x010
#define     MASK_SOURCE_RESOLUTION_352_240      0x011
// ** TCH0.99e; end...

// Program Chain Information (PGCI)
#define     PGCI_PGC_CNT                0
#define     PGCI_PGC_PB_TM              4
#define     PGCI_PGC_UOP_CTL            8
#define     PGCI_PGC_AST_CTLT           12
#define     PGCI_PGC_SPST_CTLT          28
#define     PGCI_PGC_NV_CTL             156
#define     PGCI_PGC_SP_PLT             164
#define     PGCI_PGC_CMDT_SA            228
#define     PGCI_PGC_PGMAP_SA           230
#define     PGCI_C_PBIT_SA              232
#define     PGCI_C_POSIT_SA             234

///////////////////////////////////////////////////////////
// Follow is definition for ParserXXXX APIs.
// ParseInfo definitions (Parse VMGI)
#define     MSG_DVD_BASE                1
#define     PARSE_INDEX_BY_DWORD        0xF000
#define     PARSE_INDEX_BY_WORD         0xF100
#define     PARSE_INDEX_BY_BYTE         0xF200
#define     PARSE_INDEX_BY_PTR          0xF400   // ** TCH0.27;

#define     DVD_TOTAL_TITLES            MSG_DVD_BASE+ 1         // Total Titles
#define     DVD_TOTAL_CHAPTERS          MSG_DVD_BASE+ 2         // Total chapter in one title

#define     DVD_TT_PB_TY                MSG_DVD_BASE+  9        // ** TCH0.99;
#define     DVD_VTSN_LOCATE             MSG_DVD_BASE+ 10        //
#define     DVD_VTS_TTN_LOCATE          MSG_DVD_BASE+ 11        //
#define     DVD_VTS_AST_ATRT            MSG_DVD_BASE+ 12        // ** TCH0.26;
#define     DVD_VTS_SPST_ATRT           MSG_DVD_BASE+ 13        // ** TCH0.38;
#define     DVD_SRP_NO                  MSG_DVD_BASE+ 15        // ** TCH0.31; Don't use it from 0.39. (WRONG!!)
#define     DVD_SEARCH_TTN              MSG_DVD_BASE+ 16        // ** TCH0.39;
#define     DVD_PTL_ID_FLD              MSG_DVD_BASE+ 17        // ** TCH0.39;
#define     DVD_TT_SRP_AGL_NS           MSG_DVD_BASE+ 18    // ** TCH1.60a-1;  

#define     DVD_TTM_EXIST               MSG_DVD_BASE+ 20        //

#define     DVD_TT_PTL_ID               MSG_DVD_BASE+ 21        // ** TCH0.40; Read TT_PLT_ID

// ParseVTSI definitions
#define     VTSI_PGCN_LOCATE            MSG_DVD_BASE+ 30        //
#define     VTSI_PGN_LOCATE             MSG_DVD_BASE+ 31        //
#define     VTSI_TTU_Ns                 MSG_DVD_BASE+ 32        //
#define     VTSI_PTT_SRPs               MSG_DVD_BASE+ 33        //
#define     VTSI_PGC_CAT                MSG_DVD_BASE+ 34        // ** TCH0.40;
#define     VTSI_PGCI_SRPs              MSG_DVD_BASE+ 35        // number of VTS_PGCI_SRPs.  

// ParsePGCI definitions
#define     PGCI_TOTAL_PGN              MSG_DVD_BASE+ 60        //
#define     PGCI_TOTAL_CEN              MSG_DVD_BASE+ 61        //
#define     PGCI_PGMAP_PGN_LOCATE       MSG_DVD_BASE+ 62        //

#define     PGCI_PGMAP_CEN              MSG_DVD_BASE+ 65        //

#define     PGCI_CMDT_PRE_CMD           MSG_DVD_BASE+ 66        //
#define     PGCI_CMDT_POST_CMD          MSG_DVD_BASE+ 67        //
#define     PGCI_CMDT_C_CMD             MSG_DVD_BASE+ 68        //

#define     PGCI_NV_CTL                 MSG_DVD_BASE+ 69        //
// It's Submode of PGCI_NV_CTL
#define     PGCI_NV_NEXT_PGCN           0
#define     PGCI_NV_PREV_PGCN           2
#define     PGCI_NV_GOUP_PGCN           4
#define     PGCI_NV_PB_MODE             6
#define     PGCI_NV_STILLTIME           7

#define     PGCI_C_PBI                  MSG_DVD_BASE+ 78        //
///#define     PGCI_C_CAT                  MSG_DVD_BASE+ 79        //
///#define     PGCI_C_PBTM                 MSG_DVD_BASE+ 80        //
#define     PGCI_C_FVOBU_SA             MSG_DVD_BASE+ 81        //
#define     PGCI_C_LVOBU_SA             MSG_DVD_BASE+ 82        //
#define     PGCI_C_LVOBU_EA             MSG_DVD_BASE+ 83        //

//////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////
// Follow is definition for Load2Cache APIs.

#define     VTSM_PGCI_UTI               MSG_DVD_BASE+ 1
#define     VTSM_LU_SRP                 MSG_DVD_BASE+ 2
#define     VTSM_LUI                    MSG_DVD_BASE+ 3
#define     VTSM_PGCI_SRP               MSG_DVD_BASE+ 4

// DVD_172r_REDUCE_SRAM, add comments
#define     VMGM_PGCI_UTI               MSG_DVD_BASE+ 10
#define     VMGM_LU_SRP                 MSG_DVD_BASE+ 11
#define     VMGM_LUI                    MSG_DVD_BASE+ 12
#define     VMGM_PGCI_SRP               MSG_DVD_BASE+ 13
#define     VMGM_PTL_SRP                MSG_DVD_BASE+ 14
#define     VMGM_TT_SRPTI               MSG_DVD_BASE+ 20    
#define     VMGM_TT_SRP                 MSG_DVD_BASE+ 21    
#define     VTS_PTT_SRPTI               MSG_DVD_BASE+ 22    
#define     VTS_TTU_SA                  MSG_DVD_BASE+ 23    
#define     VTS_PTT_SRP                 MSG_DVD_BASE+ 24    
#define     VTS_PGCITI                  MSG_DVD_BASE+ 25
#define     VTS_PGCI_SRP                MSG_DVD_BASE+ 26
// Micky1.07, reduce SRAM--_bVMG_PTL_LVLI 200 bytes.
#define     VMG_PTL_ID_FLD              MSG_DVD_BASE+ 27

//////////////////////////////////////////////////////////////

//      Structure Definition
// Structure for PGC_CMDT
typedef struct tagPGC_CMDT
{
    BYTE    PRE_CMD_Ns [2];
    BYTE    POST_CMD_Ns [2];
    BYTE    C_CMD_Ns [2];
    BYTE    PGC_CMDT_EA [2];
} PGC_CMDT, * PPGC_CMDT;

typedef struct tagPGC_GI
{
    BYTE    PGC_CNT [4];
    BYTE    PGC_PB_TM [4];
    BYTE    PGC_UOP_CTL [4];
    BYTE    PGC_AST_CTLT [16];
    BYTE    PGC_SPST_CTLT [128];
    BYTE    PGC_NV_CTL [8];
    BYTE    PGC_SP_PLT [64];
    BYTE    PGC_CMDA_SA [2];
    BYTE    PGC_PGMAP_SA [2];
    BYTE    PGC_PBIT_SA [2];
    BYTE    PGC_POSIT_SA [2];
} PGC_GI, * PPGC_GI;

//////////////////////////////////////////////////////////////
//      dvd.cpp [OS issue]

////////////////////////////////////////////////////////////////////
// DVD part
// DVD Information Part
BOOL    DVD_Initial (void);
BOOL    DVD_CheckFirstSector (void);
BOOL    DVD_CheckPTL_MAIT (void);

BOOL    DVD_ParseInfo ( WORD nMode, DWORD *pdwVal, WORD nSubMode );
BOOL    DVD_ParseVTSI ( WORD nMode, DWORD *pdwVal, WORD nSubMode );
BOOL    DVD_ParsePGCI ( WORD nMode, DWORD *pdwVal, WORD nSubMode );

BOOL    DVD_LoadVTS ( BYTE bVTS );
BOOL    DVD_LoadVTSI_PTT_SRPT ( BYTE bTitle, WORD wPTT );

BOOL    DVD_LoadFPPGC (void);	// ** TCH1.72q; 
BOOL    DVD_LoadVMGMPGC ( WORD wPGCN ); // ** TCH0.31;

#define VTSM_PGC_JUMP                   0x8000

BOOL    DVD_LoadVTSMPGC ( WORD wType ); //
BOOL    DVD_LoadTTPGC ( WORD wPGCN );

BOOL    DVD_GetATRT ( BYTE bKind, BYTE bNO );       // ** TCH0.42;

/////////////////////////////////////////
// Protected function

int     _CD_ReadSector ( DWORD dwSector, WORD nOffset, void * pBuffer );

// Read/Write Data
DWORD   _ReadBufferDWORD ( char * pStr, int wOffset );
WORD    _ReadBufferWORD ( char * pStr, int wOffset );
BYTE    _ReadBufferBYTE ( char * pStr, int wOffset );


// ** TCH1.55; BOOL    _WriteBufferDWORD ( char * pStr, int wOffset, DWORD dwVal );
// ** TCH1.55; BOOL    _WriteBufferWORD ( char * pStr, int wOffset, WORD wVal );

// DEBUG Usage
void    _ShowVMGIInformation (void);	// ** TCH1.72q; 
void    _ShowVTSIInformation (void);
void    _ShowPGCIInformation (void);
void    _ShowCELLInformation (void);
void    _ShowInformation (BYTE bChoice);
///////////////////

void    _Backup_GPRM_SPRM ( BYTE bDirection );

void    _GetHMS ( char * pS );
BYTE    _TimeToDecimal ( BYTE bHex );

void    _PreparePGCIData (void);		// ** TCH1.72q; 

//////// Process PTL issues ///////////////////////////
BYTE    _DVD_PassPTL_ID_FLD ( BYTE bDomain, WORD wPTL_ID );
BYTE    _DVD_ConfirmPTL (void); // ** TCH2.74; 

//////////////////////////////////////////////////////
BYTE    _DVD_StorePGCI ( DWORD dwSector, WORD wOffset );
BYTE    _DVD_StoreBuffer ( DWORD dwSector, WORD wOffset, WORD wReadSize );  // ** TCH1.01b;

BYTE    _DVD_Load2Cache ( WORD nMode, WORD nIndex ); // ** TCH0.49;


///////////////////////////////////////
// ** TCH0.40; begin...  Need to declare after PPGC_GI declaration
extern  char    *           __pPGC_CMDT;
extern  PPGC_GI             __pPGC_GI;
// ** TCH0.40; end...

#ifdef __cplusplus
   }
#endif

#endif      // __DVDINFO_H__

⌨️ 快捷键说明

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