📄 cc.bak.c
字号:
// Micky2.36, use UTL_GetSysTimer() instead of __dwCountSystem
//////////////////////////////////////////////////////////////
// ***** Big Modification History Area *****
// Micky1.21, CodeReview
// - Remove __btFreeze.
// - At KEY_FREEZE, don't check previous command mode.
// - remove __btVideoFreeze, reference __bModeCmd/ bKeyPrevious=KEY_FREEZE directly
// - remove OpenAudio(false) at kEY_PLAY
// LLY.274, some big modification:
// [1] Rename all MP3 relative info. because module name has changed !!
// - MP3_Trigger() --> FM_Trigger()
// - MP3_ProcessKey() --> FM_ProcessKey()
// - __bMP3MenuID --> __bFMMenuID;
// - MP3_MENU_NONE --> FM_MENU_NONE
// - MP3_MENU_SONG --> FM_MENU_FILE
// - MP3_MAX_SONG_NO --> FM_MAX_FILE_NO
// Micky2.80a
// - remove all COMMAND_AUDIO codes.
// - remove MULTI_DISC_SYSTEM codes
// - remove NO_OSD_GAME codes
// LLY2.80a
// - remove ADD_BACKGND_FOR_CDDA codes
// Micky2.81
// - remove #define GENERAL_RELEASE_STILL, always enabled.
// - Rename _CC_TransferProcessKey as _CC_PreProcessKey.
/////////////////////////////////////////////////////////////
// DVD_103Micky, add define for ZOOM<->Pause
#define SUPPORT_ZOOM_PAUSE
// DVD_099bMicky, Fast will join the round for Scan
//#define SAME_FAST_AS_SCF2
// ** TCH1.27; define it, the NV flow is following PBC_OFF.
/// #define SUPPORT_NEXT_OVERRULE_NVFLOW
// The file "winav.h" must be included in first line
#include "winav.h"
#include <string.h>
// Micky2.31, reduce codes, don't use C string API
#include "ctstring.h"
// Micky2.80p, declare malloc.h into platform.h
#include "initial.h"
#include "utl.h"
#include "hal.h"
#include "servo.h"
#include "input.h"
#include "chips.h"
#include "thumb.h"
#include "comutl.h"
#include "avsys.h"
#include "amp.h"
#ifndef SYSTEM_8051
BYTE EX1, EX0, EA;
#endif
//DVD_022, KARAOKE
#ifdef KARAOKE
#include "karaoke.h"
#endif
#ifdef _WINDVD
#include "setup.h"
#include "navigate.h"
#include "cell.h"
#include "dvdinfo.h" // ** TCH0.27;
#endif // _WINDVD
#include "cdinfo.h"
#include "vcd20.h"
#include "digest.h"
#include "cc.h"
#include "isr.h"
#include "osd.h"
#include "linear.h"
#include "monitor.h"
#include "sysdebug.h" //CoCo.sd
// Micky1.21, CodeReview
// to be removed next time
///BIT __btFreeze;
// LLY.274, rename all MP3 relative info. because module name has changed !!
#ifndef NO_MP3
// MP3DISC
#include "fmanager.h" // "mp3.h"
//DVD016-1BIT __btMP3Disc=FALSE;
#endif
#ifdef TFT_CONTROL
#include "tft.h" // "mp3.h"
#endif
extern void _SetAudType(BYTE bType); // in CHIPS module
// ** TCH0.50; begin... Add some declaration for SRAM Reduce
char __cBuffer [LENGTH_SHAREBUFFER+ 1]; // Max for SPPalette
BYTE * __pbBuffer; // ** TCH1.60a-2; Pointer to __cBuffer for unsigned operation
BYTE __bPool [LENGTH_SHAREPOOL]; // Common-Pool for DVD/ VCD // ** TCH1.61;
WORD __wPoolOffset; // record the current usage of Pool
// ** TCH0.50; end...
///BYTE __bChipsVersion; //Kevin1.05-3, make sure to see definition in chips.h
// Micky2.79, tune the usage of __bCountStop, don't reference DOUBLE_STOP
// __bCountStop=0, means playing(include pause)
// __bCountStop=1, means pre-stop(Value 1 exist only when DOUBLE_STOP is defined)
// __bCountStop>=2, means real-stop
BYTE __bCountStop;
// LLY2.37p, add new variable to keep F/W assign key
BYTE __bFWKey;
// f/w 0.34
BYTE *__bpDataPointer;
BIT __btNTSCBitStream; //Micky2.80, review global variables init.=FALSE;
// for debugging!!!!
DWORD __dwCheckTime;
BYTE __bZoomFactor; //Micky2.80, review global variables init.=VIEW_NORMAL;
// Micky1.20, 4M flash
#ifndef NO_DIGEST
extern BYTE __bTrackNO; // DIGEST usage, current track NO (Had played)
// wyc.172r, reduce the SRAM
//LJY0.87(LJY2.81), for DVCD discview
extern DWORD __dwTimeShow; // DIGEST usage;
#endif
extern DWORD __dwTimeHang; // in isr.c
// wyc1.07a. remove this variale.
//extern BYTE __bKeyRepeat; // in isr.c
// wyc.172, two vraiables to check servo can't open problem.
DWORD __dwOpenTime;
// TCC041, declared in SER_ATA.C,
// wyc.172-2, extern this variable from servo and move to begin of program
extern BYTE __bCloseCommand ;
// These two variables is for KARAOKE
// LLY.274p-1, remove to CHIPS module
//BYTE __bSurround= 0; // Record Surround kind
// DVD_274pMicky, __bEchoLevel is moved to chips.c
//char __bEchoLevel= ECHO_LEVEL/ 2; // Record the echo level
// global definition
//DVD_051Micky, add byte size timer count
// for avoid DWORD data move by interrupt inteference
// must clear it as 0 before using
// only alow max. 3 seconds(base on 50Mhz)
BYTE data __bSystemTimer;//Micky2.80, review global variables init.=NULL;
DWORD data __dwCountSystem;//Micky2.80, review global variables init.= NULL; // 50ms /time
DWORD __dwTimeBegin;//Micky2.80, review global variables init.= NULL; // time begin
DWORD __dwTimeEnd;//Micky2.80, review global variables init.= NULL; // time end
DWORD data __dwTimeNow;//Micky2.80, review global variables init.= NULL; // time current
DWORD IDATA __dwTimeKey;//Micky2.80, review global variables init.= NULL; // time reference; First Number Key
WORD DATA __wDiscType; // Record Disc Type
BYTE __bDiscInfo; // ** TCH1.70; Record Disc
// wyc1.25, add one variable to record flow when detected as wrong disc for debug usage,
BYTE __bTestFlow;
BYTE DATA __bKey;//Micky2.80, review global variables init.= KEY_NO_KEY; // key informaion
DWORD __dwTimeRef;//Micky2.80, review global variables init.= NULL; // Time reference; SCAN use(Count)
DWORD __dwTimeDiscBegin;//Micky2.80, review global variables init.= NULL; // record a disc playable Begin Sectors (VCD is from Track 2)
DWORD __dwTimeDiscEnd;//Micky2.80, review global variables init.= NULL; // record a disc playable End Sectors
DWORD __dwVOBuffer; // The threshold that disable the I/P, unit: WORD(16bit)
DWORD __dwVUBuffer; // The threshold that enable I/P, unit: WORD(16bit)
// Micky0.86, add audio buffer threshold value
DWORD __dwAOBuffer;
DWORD __dwAUBuffer;
//Alex1.21,20031210 support bookmark
#ifdef SUPPORT_BOOKMARK
BYTE __bBookMark_Title[BOOKMARK_NO+ 1]; // record BookMark Title
#endif //#ifdef SUPPORT_BOOKMARK
WORD __wBookMark [BOOKMARK_NO+ 1]; // record BookMark Time
// index[0] will record which index was selected; Just show if index[0]= NULL
BIT __btBookMark;//Micky2.80, review global variables init.= FALSE; // BookMark ON/OFF (PBC OFF)
WORD __wPlayItem;//Micky2.80, review global variables init.= 2; // default VCD is track 2;
// DVD_274pMicky, __wVVolAudio is moved to chips.c
//WORD __wVolAudio= VOLUME_DEFAULT; // HIBYTE is right channel, LOBYTE is left channel; 1996.9
WORD __wStatus;//Micky2.80, review global variables init.= NULL; // record VCD 2.0 List type
WORD __wNumberPrevious;//Micky2.80, review global variables init.= NULL; // record previous valid number key
//DVD_047-1. Number confirm
void _ConfirmAction(WORD wValue);
WORD _wPreValue;//Micky2.80, review global variables init.=0xffff;
DWORD __dwTimeNumber;
BYTE __bModeCmd; // Record current macro command
// Remove the initialization as it add Initial_Variables()
WORD __wTrackBegin;//Micky2.80, review global variables init.= 1; // first valid track
WORD __wTrackEnd;//Micky2.80, review global variables init.= 1; // last valid track
// Micky2.31, remove the initial value, as INITIAL_Variables has done it.
BYTE __bRepeat;//= REPEAT_NONE; // record repeat mode
// REPEAT_NONE: non-repeat, REPEAT_TRACK:repeat one track,
// REPEAT_DISC: repeat all tracks
BYTE __bModeChannel;//Micky2.80, review global variables init.= AUDIO_STEREO; // record channel information
BYTE __bAudioType;//Micky2.80, review global variables init= HAL_AUDIO_AC3; // record Audio Type information // ** TCH0.25;
BYTE __bError;//Micky2.80, review global variables init.= ERR_NOERR; // record the previous error
// DVD_274pMicky, __cKeyShift is moved to chips.c
//char __cKeyShift= NULL; // Key adjustment; Up/Down
// f/w 0.45 fix
// program array size
//Kevin0.86, move to linear.c
//WORD __wProgramData [PROGRAM_TRACK]; // update max. program entry to PROGRAM_TRACK
//BYTE __bProgramMaxEntry;//Micky2.80, review global variables init. = 0;
//BYTE __bInputNumIndex;//Micky2.80, review global variables init. = 0;
BYTE __bTitleNum,__bChapterNum;
// wyc.102, add a variable to indicate the index of current playing program entry
// end ...
BYTE __bTimeMin, __bTimeSec; // GOTOTime Usage
// DVD_102pMicky, integrate __bTVMode with SetupInfo.bTVSystem
// remove __bTVMode
//BYTE __bTVMode= TVMODE_PAL; // record TV mode
BYTE __bRepeatAB;//Micky2.80, review global variables init.= REPEAT_NONE; // RepeatAB ON/OFF (PBC OFF)
BYTE __bShowTimeType;//Micky2.80, review global variables init.= MSG_RELTIME; // Output Module use. ref to osd.h
BYTE __bGoToTimeNO; // count the I/P Number in GoToTime
///////////////
// DIGEST Usage
// Micky1.20, 4M flash
#ifndef NO_DIGEST
BIT __btDIGEST; // means Digest Mode
BYTE __bDigestStyle; // Digest Mode
#endif
//////////////////////////////////////////////////////
BIT __btPlaying;//Micky2.80, review global variables init.= FALSE; // means is playing (NPF/FF/...)
// Micky2.31, remove the initial value, as INITIAL_Variables has done it.
BIT __btPlayEnd;//= TRUE; // Check if it's into Play-End mode
BIT __btPause;//Micky2.80, review global variables init.= FALSE; // if it's into Pause mode
BIT __btPBC;//Micky2.80, review global variables init.= FALSE; // means VDC2.0 PBC
BIT __btDriveOpen;//Micky2.80, review global variables init.= FALSE; // means drive is in close mode when Power-ON
BYTE __bFirstPlay;//Micky2.80, review global variables init.= TRUE; // Does it play first time ?
// add the usage of recover hang
BIT __btMute;//Micky2.80, review global variables init.= FALSE; // Disable/Enable Mute
// DVD_276Micky, bit reduce
///BIT __btJumping= FALSE; // Disable/Enable Jumping Now
BIT __btRandom;//Micky2.80, review global variables init.= FALSE; // in random mode (PBC off)
// Micky2.31, remove __bDisplay initial value.
BYTE __bDisplay; // OSD Display Mode recording
/*
#ifdef _DEBUG_INFO
// LLY.170-2, use new __bDisplay spec.
BYTE __bDisplay= 1; // OSD Display Mode recording
#else // #ifdef _DEBUG_INFO
BYTE __bDisplay;//Micky2.80, review global variables init.= FALSE; // OSD Display Mode recording
#endif // #ifdef _DEBUG_INFO
*/
//alex1.23,20040218 combine gototime , search
//remove __btGotoTime declare
/*
BIT __btGoToTime;//Micky2.80, review global variables init.= FALSE; // GoToTime ON/OFF (PBC OFF)
*/
BYTE __bAutoVocal;//Micky2.80, review global variables init.= NULL; // Enable Auto-Sing
// Micky2.31, remove the variable, as doesn't support voice cancel
//BIT __btVoiceCancel= FALSE; // karaoke usage
BYTE __bScan; // The Status of SCAN Command (encounters IFSC)
DWORD _dwTimeCheckTray;//Micky2.80, review global variables init. = 0 ; // TCC172
// global usage; don't remove those variables
// Please don't use in the functions that be called by Interrupt
DWORD IDATA __dwTemp;
WORD IDATA __wTemp;
BYTE IDATA __bTemp;
BIT __btTemp;
//DVD_039-2SLOW
// modify slow by levels
// __wSlowSpeed is actual slow speed ratio
WORD __wSlowSpeed;//Micky2.80, review global variables init.=2; // Slow factor
BYTE __bSlowLevel;//Micky2.80, review global variables init.=1;
// LLY.036
// SEARCH mode usage
BYTE __bSearchMode;//Micky2.80, review global variables init.= NULL; // Search mode on/off
BYTE __bSearchCursor; // indicate the search cursor positon
BYTE __bSearchTitle; // the title number for search mode
WORD __wSearchChapter; // the chapter number for search mode
WORD __wSearchChapter_Ns_Title; // the total chapter number for search
BYTE __bTimeHour; // GoTo Time usage
//DVD_051Micky, Number >10
// bit 15 =1, represent the 1st input digit
// bit 14 =1, represent the 2nd input digit
// must clear the value as 0 before use
WORD __wNumberQueue;//Micky2.80, review global variables init.=0;
// GOTOTIME
DWORD __dwGoToTime; // Time that use GOTO position
BIT __btNewTime;//Micky2.80, review global variables init.=FALSE; // A flag that means it's a NEW time
BIT __btPlayFromBegin;//Micky2.80, review global variables init.=FALSE; // Told F/W it should play Track-Begin first
BIT __btFromStopMode;//Micky2.80, review global variables init.=FALSE; // GOTO position comes from a "STOP" mode
DWORD __dwResumeTime;//Micky2.80, review global variables init.= NULL; // Time that record final stop point
BIT __btVideoFreeze;//Micky2.80, review global variables init.= FALSE; // "FREEZE" mode
BIT __btPowerDown;//Micky2.80, review global variables init.= FALSE; // PowerDown Mode ON/OFF
// TCC155, a flag for checking tray is open or closed
BYTE _bOpen;//Micky2.80, review global variables init. = 1 ;
//LJY2.37, port KCHong's code
//Kevin2.26, move form chips.c
BYTE __bVersionMPEG; //chip version
BYTE __bPackageID; //part no
BYTE __bSupportFeature; //supported audio features
#ifdef SUPPORT_ANTISHOCK
BYTE __bWrongPartNo; //Kevin2.37-2
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -