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

📄 cc.h

📁 车载电子影音系统dvd播放系统原程序代码
💻 H
📖 第 1 页 / 共 2 页
字号:

/**************************************************************************

        (C)Copyright Cheertek Inc. 2002-2003,
           D300, all right reserved.

        Product : WinAV Firmware

        Date    : 1998.10.10.
        Author  : Cheertek (D300 TCH)
        Purpose : Control Center module
                  The moudle will control all operations
        Sources : cc.h/ cc.c

****************************************************************************/

#ifndef __CC_H__
#define __CC_H__

#ifdef __cplusplus
        extern  "C"     {
#endif

//Kevin2.26, move from chips.h
extern  BYTE    __bVersionMPEG;
extern  BYTE    __bPackageID;  
extern  BYTE    __bSupportFeature; //Kevin1.11
#define SUPPORT_FEATURE_DTS         0x1
#define SUPPORT_FEATURE_PROLOGIC    0x2
#define SUPPORT_FEATURE_WMA         0x4 
#define SUPPORT_FEATURE_HDCD        0x8

// Micky1.07, reduce SRAM--_bVMG_PTL_LVLI 200 bytes.
#define REDUCE_SRAM_VMG_PTL_LVLI

////////////////////////////////////////////
// argument parameters

#define     FAST_FACTOR         0       // 0:I,P; 1:I, 2:Other I
// wyc.162, moves these define from cc.c to cc.h
// DVD_099cMicky, add a flag for ISR Key
#define KEY_FROM_ISR 1      // the key is from ISR
#define KEY_FROM_FW 2       // the key is generate by F/W
// DVD_101bMicky, add one more key source for distinguish
// CC_DoKeyAction(KEY_STOP) is called directly or through __bISRKey
#define KEY_FROM_NONE   3

//DVD_039-1SCF
// don't need
//#define     SCAN_GAP            750     // SCAN Jump time: 10 seconds
//Kevin1.24, let the display jump time of CDDA SCF & SCB be more consistent
#define     SCB_EXTRA           75 //300    // SCAN Backward usage; More jump than Forward Jump
#define     PRACTICE_BACKGAP    225     // PRATICE back sectors
//DVD_039-1SCF
// the max. value can be 7 levels for scan
#define MAX_SCAN_LEVEL          5
//DVD_039-2SLOW
// the max. value can be 7 levels for slow
#define MAX_SLOW_LEVEL          5


// LLY.170, re-define some variable for program mode usage
// Notice:
// [1] the max of entry no for each row is 3
// [2] the max of row no for the program mode is 6
#define ENTRYNO_ROW         3  // the entry number of each row in program mode
#define ROWNO_PROGRAM       3  // the total row number in program mode
#define PROGRAM_TRACK   ENTRYNO_ROW*ROWNO_PROGRAM


#define     NORMALKEY_OFFSET    6       // the total key levels is 1+ 2*(NORMALKEY_OFFSET)
#define     ECHO_LEVEL          8       // Echo Level is from 0 to ECHO_LEVEL

/* LJY2.37, move to winav.h
// LLY.160a-1, re-adjust the max volume level from 12 --> 16
// Chuan0.81, The SAVCR of CT908 is 20 bits
// ** TCH1.00-1-908; S200-Jerry request
#define     VOLUME_MAX              0x7FFF0      // 31984
#define     VOLUME_GAP              0x7FFF       // 1999

#define     VOLUME_MIN              0x0
#define     VOLUME_DEFAULT      VOLUME_MAX
*/

//Kevin1.08, add MIC volume level
#define     MIC_VOL_MAX             0x7FFF0      
#define     MIC_VOL_GAP             0x7FFF       
#define     MIC_VOL_MIN             0x0
#define     MIC_VOL_DEFAULT         MIC_VOL_MAX

// SCAN usage
#define     SCAN_NONE           0       // NO SCAN mode
#define     SCAN_GO             1       // SCAN had done
#define     SCAN_END            2       // SCAN had got IFSC flag and wait for next SCAN command

// The REPEAT function is disable when PBC is ON
#define     REPEAT_NONE         0               // Play the disc and stop
#define     REPEAT_TRACK        1               // Repeat play the track
// ** TCH0.25; begin...
#define     REPEAT_DISC         5               // Repeat play the disc
#define     REPEAT_ALLDISCS     6               // Repeat all discs (Multi-Disc)
#define     REPEAT_CHAPTER      2               // Repeat One Chapter
#define     REPEAT_TITLE        3               // Repeat One Title
// ** TCH0.25; end...
#define     REPEAT_FOLDER       4       // ** TCH2.81; Repeat one folder

#define     AUDIO_LR            0               // Audio is Stereo (LR)
#define     AUDIO_RL            1               // Audio is Stereo (RL)
#define     AUDIO_LL            2               // Audio is LL
#define     AUDIO_RR            3               // Audio is right
#define     AUDIO_3D            4               // 3D-Audio
#define     AUDIO_VOICEOFF      6
#define     AUDIO_STEREO        AUDIO_RL        // Audio is Stereo (LR)

#define     BOOKMARK_NO         6       // BookMark capability

// Micky0.85, re-define the ID for CT908
// must by the sequence 25->50->100->150-> 200.
// as haljpeg will use the method > , < for different action
#define     VIEW_ZOOM25         1 	// JPEG, 25%
#define     VIEW_ZOOM50         2 	// JPEG, 50%
#define     VIEW_ZOOM100        3	// JPEG, 100%
#define     VIEW_ZOOM150        4	// JPEG, 150%
#define     VIEW_ZOOM200        5	// JPEG, 200%

// VIEW_NORMAL still define the "fit to screen" mode
#define     VIEW_NORMAL         VIEW_ZOOM100
#define     VIEW_ZOOMX2         10	// zoom x2
#define     VIEW_ZOOMX4         11	// zoom x4
// VIEW_ZOOMX1 is a pseudo ID, only for OSD reference.
#define     VIEW_ZOOMX1         12   // VCD/DVD fit to screen

// Micky2.80, integrate the ZOOM ID control.
// main/ HAL/ OSD all reference the set defined in CC.h
/*
#define     VIEW_NORMAL         0	// video fit to screen
#define     VIEW_ZOOMX2         1	// zoom x2
#define     VIEW_ZOOMX4         2	// zoom x4
#define     VIEW_ZOOM25         3 	// JPEG, 25%
#define     VIEW_ZOOM50         4 	// JPEG, 50%
#define     VIEW_ZOOM100        5	// JPEG, 100%
#define     VIEW_ZOOM150        6	// JPEG, 150%
#define     VIEW_ZOOM200        7	// JPEG, 200%
*/
// Reserve some IDs for ZOOMxxx. Max. is 19.
#define     VIEW_ZOOM_SUPPORT	20  // query if ZOOM support
#define     VIEW_ZOOM_LEFT	    21	// view zoom left
#define     VIEW_ZOOM_RIGHT	    22	// view zoom right
#define     VIEW_ZOOM_UP	    23	// view zoom up
#define     VIEW_ZOOM_DOWN      24	// view zoom down

// LLY.036, define for cursor position in search mode
#define     SEARCH_CURSOR_BEGIN     1
#define     SEARCH_CURSOR_TITLE     (SEARCH_CURSOR_BEGIN+0)
#define     SEARCH_CURSOR_CHAPTER   (SEARCH_CURSOR_BEGIN+1)
#define     SEARCH_CURSOR_TIME      (SEARCH_CURSOR_BEGIN+2)  // LLY.039
#define     SEARCH_CURSOR1_END      SEARCH_CURSOR_CHAPTER
#define     SEARCH_CURSOR2_END      SEARCH_CURSOR_TIME  // LLY.039

// LLY.036, define for search mode switch
#define     SEARCH_MODE_BEGIN           0
#define     SEARCH_MODE_OFF             (SEARCH_MODE_BEGIN+0)
#define     SEARCH_MODE_TITLE_CHAPTER   (SEARCH_MODE_BEGIN+1)
#define     SEARCH_MODE_TIME            (SEARCH_MODE_BEGIN+2)
//alex1.23,20040218 combine gototime , search
//combine search mode
/**********************************************************************/
#define     SEARCH_MODE_END             SEARCH_MODE_TIME
//#define     SEARCH_MODE_END             SEARCH_MODE_TITLE_CHAPTER

// wyc.277a-2-AVSys, new define follow mode for AUX channel. Update the sequence.
#define     AUX_CHANNEL_BEGIN           0
#define     AUX_CHANNEL_DVD             AUX_CHANNEL_BEGIN
#define     AUX_CHANNEL_TUNER           (AUX_CHANNEL_BEGIN + 1)
#define     AUX_CHANNEL_AV1             (AUX_CHANNEL_BEGIN + 2)
#define     AUX_CHANNEL_AV2             (AUX_CHANNEL_BEGIN + 3)
#define     AUX_CHANNEL_END             AUX_CHANNEL_AV2

// LLY.039, define the no of digit for goto time mode support
#define DISPTIME_NO             7

///////////////////////////////////////////
// Micky2.79, tune the usage of __bCountStop, don't reference DOUBLE_STOP
extern BYTE    __bCountStop;

// ** TCH0.50; begin...

// DVD_172r2, enlarge share buffer size.
// DVDINFO will use it as temp. buffer for DRAM moving.
// 192/4= 48 double words. 3 times read DRAM burst. call 4 times write DRAM burst.
//#define     LENGTH_SHAREBUFFER          160
#define     LENGTH_SHAREBUFFER          192
///#define     LENGTH_SHAREPOOL            8192
///#define     LENGTH_SHAREPOOL            9192    // ** TCH1.00b; size of (_cPGCI+_cVNG_PGCI_UT)
///#define     LENGTH_SHAREPOOL            14860   // ** TCH1.01b; add 720 VMG_PGCI_SRP (720* 8= 5760 bytes)
// DVD_172r2, reduce pool size.
// MP3 : 6838(6388+450)
// VCD : 6104(4992+600+500)
// DVD : 7926(5884 + 348 + 200 +  984 + 510)
///#define     LENGTH_SHAREPOOL            15900     // ** TCH1.71;
// DVD_276Micky, adjust the pool length
// to resere SRAM space for serial debug or 28C Combo
// the actual size DVD will use is 7926.

// Micky1.03, fix Matrix Region 2-> select play will re-loading.
// the total cells is 116. enlarge to 150 cells.(DVDINFO.c MAX_XELLS_WITHIN_PGC= 150)
// Micky1.07, reduce SRAM--_bVMG_PTL_LVLI 200 bytes.
// can set max. cells
#ifdef  _RESERVE_SRAM
// Micky1.07, reduce SRAM--_bVMG_PTL_LVLI 200 bytes.
#ifdef  REDUCE_SRAM_VMG_PTL_LVLI
#define MAX_CELLS_WITHIN_PGC    255
#else
#define MAX_CELLS_WITHIN_PGC    150
#endif
#else
#define MAX_CELLS_WITHIN_PGC    255
#endif
#define RESERVE_SRAM_BYTES      ((255-MAX_CELLS_WITHIN_PGC)*2)

/*
// Micky2.78+one_cpu
// reserve SRAM for serial debug and one_cpu
#ifdef  _RESERVE_SRAM
// DVDINFO.
// It may sacrifice some worst case titles(cells over 100).
// Micky0.91, release the reserve SRAM in PGCI part(200 bytes).
// MAX_CELLS_WITHIN_PGC(255-100), SIZE_PGCI(5884-200)
//#define RESERVE_SRAM_BYTES  (310+200)
// MAX_CELLS_WITHIN_PGC(255-100)
#define RESERVE_SRAM_BYTES  310
#else
#define RESERVE_SRAM_BYTES      0
#endif
*/

// Micky2.80, reduce VTSI from 984 to 540.
// DVD : 7482(5884 + 348 + 200 +  540 + 510)
// just cut 500 bytes.(444+76)
//#define     LENGTH_SHAREPOOL                (8000-RESERVE_SRAM_BYTES)
// Micky1.07, reduce SRAM--_bVMG_PTL_LVLI 200 bytes.
// DVD :7282(5884+348+540+510)
// VCD : 4992(CDDA: 4992)
// MP3 : 6008(JPEG: 6008)
#ifdef  REDUCE_SRAM_VMG_PTL_LVLI
#define     LENGTH_SHAREPOOL                (7500-RESERVE_SRAM_BYTES-200)
#else
#define     LENGTH_SHAREPOOL                (7500-RESERVE_SRAM_BYTES)
#endif

// TCC171, return value for auto-upgrade check
// Chuan 172 2002/02/21: Add some value to check.
#define FLASH_FAIL_NO_ERROR           0
#define FLASH_FAIL_OTHER_DISC         1
#define FLASH_FAIL_INVALID_DISC       2
#define FLASH_FAIL_USER_ABORT         3
#define FLASH_FAIL_CDROMDECODE        4    // Chuan 277 2002/09/12: Add CDROM DECODE FAIL STATUS
#define FLASH_AUTO_UPGRADE            5
#define FLASH_UPDATE_LOGO             6
#define FLASH_FAIL_CHECKSUM           7    // Chuan0.87-2th, Add CheckSUM Info.

extern  char        __cBuffer [];  // Max for SPPalette
extern  BYTE        * __pbBuffer; // Pointer for __cBuffer.   // ** TCH1.60a-2;
extern  BYTE        __bPool [];  // Common-Pool for DVD/ VCD    // ** TCH1.61;
extern  WORD        __wPoolOffset;  // record the current usage of Pool
// ** TCH0.50; end...
// **** TCH0.99E-XQ, Begin...
extern  BYTE        __bStillTime;   // record the Still Time (0: NONE, 0xFF: Infinite; Other: seconds.)
extern  BYTE            __bVOBUStill;    // flag indicate the VOBU still is on/off
// DVD_100Micky
extern BYTE    __bKeySource;

// f/w 0.34
extern BYTE *__bpDataPointer;
extern  BYTE IDATA          __bISRKey;              // The key value comes from Key-Scan or IR
extern BYTE                 __bFWKey;               // LLY2.37p, the key valuef comes from F/W
extern  WORD                __wSCAN_GAP;
extern  DWORD               __dwDSPArg;
// global variables
// DVD_274pMicky, remove the __bSurround declaration.
//extern  BYTE                __bSurround;        // Record Surround kind
extern  BYTE                __bZoomFactor;
extern  WORD                __wXStart;
extern  WORD                __wYStart;
extern  WORD                __wMaxHStart;
extern  WORD                __wMaxVStart;
extern  DWORD               __dwCheckTime;  // record start time for time out
//DVD_051Micky, add byte size timer count
extern  BYTE    data        __bSystemTimer;

extern  DWORD data          __dwCountSystem;
extern  WORD  data          __wDiscType;
extern  BYTE                __bDiscInfo;        // ** TCH1.70; Record Disc
// wyc1.25, add one variable to record flow when detected as wrong disc for debug usage,
extern  BYTE    __bTestFlow;

⌨️ 快捷键说明

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