📄 cc.c
字号:
&GAMEMAIN_ProcessKey,#endif#ifdef SUPPORT_POWERON_MENU //CoCo2.56 &POWERONMENU_CheckModeKey,#endif //SUPPORT_POWERON_MENU#ifdef DOLBY_CERTIFICATION //kevin0.80 &CHIPS_Dolby_ProcessKey,#endif // LLY0.95, add Common Dialog process key routine// Notice: The priority is higher than PSCAN prompt.#ifndef NO_DRM &OSDCOMDLG_ProcessKey,#endif // #ifndef NO_DRM#ifdef SUPPORT_PSCAN_PROMPT_OSD &OSDPROMPT_ProcessKey,#endif //#ifdef SUPPORT_PSCAN_PROMPT_OSD #ifdef SUPPORT_STB &MAIN_MENU_ProcessKey, //CoCo.stb.20060320#else#ifndef NO_SETUP#ifdef IMAGE_FRAME_SETUP //CoCo2.38 &MAIN_MENU_ProcessKey, #else &SETUP_ProcessKey,#endif //IMAGE_FRAME_SETUP#endif //#ifndef NO_SETUP #endif //SUPPORT_STB#ifdef SUPPORT_POWERON_MENU //CoCo2.38 &POWERONMENU_ProcessKey,#endif#ifdef SUPPORT_RADIO_TUNER &RADIO_ProcessKey,#endif //SUPPORT_RADIO_TUNER &MEDIA_MediaSelection_ProcessKey,#ifndef NO_PROGRAM_UI //++CoCo2.37p &OSDPRGM_ProcessKey,#endif //#ifndef NO_PROGRAM_UI //++CoCo2.37p#ifndef NO_SEARCH_UI //++CoCo2.37p &OSDSRCH_ProcessKey,#endif //#ifndef NO_SEARCH_UI //++CoCo2.37p#ifdef SUPPORT_BOOKMARK &OSDBOOKMARK_ProcessKey,#endif //#ifdef SUPPORT_BOOKMARK#ifndef NO_DIGEST &DIGEST_ProcessKey,#endif //#ifndef NO_DOIGEST &_CC_NumberProcessKey, //Alan2.37, move it after DIGEST_ProcessKey() for Mantis #1722 &THUMB_ProcessKey, &MM_ProcessKey,#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p &OSDDSPLY_ProcessKey,#endif //#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p// wyc2.37-909s, replace to NO_DISC_MODE#ifndef NO_DISC_MODE //++CoCo2.37p &CC_VCD_ProcessKey,#endif //#ifndef NO_DISC_MODE //++CoCo2.37p#ifndef NO_DISC_MODE //CoCo2.37p &CC_DVD_ProcessKey,#endif //#ifndef NO_DISC_MODE //CoCo2.37p};BYTE bMaxFunctions = sizeof(FuncArray)/sizeof(pFunction);extern BYTE __bMMAutoPlay; //CoCo2.38// wyc2.16c-909S, cover in SUPPORT_STB define.#ifdef SUPPORT_STBextern int STB_Entry(void); //CoCo.stbextern void AP_MainLoop(void); //CoCo.stbextern BYTE __bMediaSelected;extern BYTE _bPrevMedia, _bNextMedia;#endif// wyc2.16-909S// Micky2.16#ifdef SYSTEM_ECOS// ***********************************************************************// Function : cyg_user_start// Description : Entry point of eCos OS// Now, only creat and start the CTKDVD thread// Argument : None// Return : None// ***********************************************************************void cyg_user_start(void){ extern void INITIAL_RunSystem(void);#ifndef NO_DRM // added by J500CSC_20060823, for initialize DivX DRM usage PARSER_DRM_EarlyInit( ); // added by J500CSC_20060823, for initialize the correct DivX DRM Model ID for Vestel PARSER_DRM_SetModelID( MODEL_ID_LOW_BYTE, MODEL_ID_TOP_BYTE );#endif // INITIAL_RunSystem();}#endif //#ifdef SYSTEM_ECOS// *********************************************************************// Function : main ()// Description : The Firmware Entry point// Arguments : NONE// Return : NONE// Side Effect : What ???// *********************************************************************//ccc begin// ** TCH0.60; main ()void CC_DVD_MainLoop(void){ while ( 1 ) {#if 0 // elmer2.37, move watchdog mechanism form here to alarm#ifdef SUPPORT_WATCH_DOG REG_SRAM_WATCHDOG++;#endif#else MONITOR_CheckWatchDog();#endif DBG_Polling(); // LLY2.36, do IR polling while checking mode is polling if(INPUT_GetIRCheckMode()==IR_CHECK_MODE_POLLING) { DSR_IR(); } // Micky1.05, add auto test for IC sorting by CoCo#ifdef AUTO_TEST _CC_AutoTest(); //CoCo1.07, verify auto-test#endif// ==============================================================/// Section[2] : Show IR Key codes/// : To display the IR Key code before the key was processed// ==============================================================#ifdef _SHOW_IR_MAP { void _CC_ShowIRMap(); unverified. // Micky0.80 _CC_ShowIRMap(); }#endif //#ifdef _SHOW_IR_MAP/// End Of Section[2] : Show IR Key codes // wyc2.17-909S, follow will do it, so don't need to call it here. //PANEL_Trigger(0); //Jeff 20050530 Add for Panel Trigger// ==============================================================/// Section[3] : Process the input Key/// : Process the IR input key or F/W key./// 3.1) When key is from IR, will transfer the key to proper value, /// and do OSD message map.// ============================================================== CC_MainProcessKey();/// End Of Section[3] : Process the input Key// winnie 2.77, add to save volume function and fix play move un-continually issue while press vol +/- quickly// The reason is that volume value be stored frequently. So, using time count to store the volume value.#ifdef SUPPORT_SAVE_VOLUME if((OS_GetSysTimer()-__dwTimerCount_Volume)>COUNT_2_SEC) { //Compare the stored volume with current volume. if two value is different, volume needs to save. if( __dwVolAudio != (DWORD)DVDSETUP_GetVolume()) { DVDSETUP_SaveVolume(); } __dwTimerCount_Volume=OS_GetSysTimer(); } #endif //Jeff 20050530 // wyc2.17-909S, suppose 300ms is enough. if((__bISRKey==KEY_NO_KEY)&&((OS_GetSysTimer()- __dwTimerCount_Keyscan)>COUNT_300_MSEC)) { __bISRKey = PANEL_KeyScan(); #ifdef SUPPORT_POWER_SWITCH //process power Switch if(__bISRKey == KEY_PICTURE) { // Switch On, and power always OFF if ((!__btPowerDown)) { DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_MM_INFOFTR,"\n------POWER OFF=%d ---------",__btPowerDown); CC_PWRCtrl(); } __bISRKey=KEY_NO_KEY; __bPowerSw=TRUE; } if (__bISRKey==KEY_LCD) { //Switch OFF, if ((__btPowerDown) && (__bPowerSw)) { extern BYTE _bPreRepeatFlag; _bPreRepeatFlag=1; DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_MM_INFOFTR,"\n------POWER ON=%d ---------",__btPowerDown); __bISRKey=KEY_POWER; CC_PWRCtrl(); POWERONMENU_Initial(); } __bPowerSw=FALSE; __bISRKey=KEY_NO_KEY; }#endif //SUPPORT_POWER_SWITCH PANEL_Trigger(0); #ifdef SUPPORT_TFT TFT_Trigger();#endif __dwTimerCount_Keyscan = OS_GetSysTimer(); } #ifdef SUPPORT_STB if( __bChooseMedia != MEDIA_SELECT_DVD && __bChooseMedia != MEDIA_SELECT_USB) break;#endif#ifdef CT950_STYLE //CoCo2.38#ifdef SUPPORT_POWER_SWITCH //process Power Switch if (!__bPowerSw) AUTOPWR_Trigger();#else AUTOPWR_Trigger();#endif //SUPPORT_POWER_SWITCH ALARM_Trigger();#endif //CT950_STYLE/// *** For PowerDown mode, Sector[4]~[9] are skipped // Nothing more needed to be done at PowerDown mode. if (__btPowerDown) goto MAIN_LOOP_END; //CoCo1.02, add OSD game from XuLi's code#ifdef SUPPORT_OSDGAME if(__enGameID!=GAME_NONE) { GAMEMAIN_Trigger(); goto MAIN_LOOP_END; }#endif // Micky0.80, put after Power down check.#ifdef SUPPORT_MEDIA_MANAGEMENT MEDIA_Management();#endif// ==============================================================/// Section[4] : Check the time out for input number mode/// 4.1) Process the time out for input number/// 4.2) Process the time out for KEY_N10PLUS/// Comments:/// - This section is not necessary for SETUP.// ============================================================== _CC_Trigger_NumberTimeOut();/// End Of Section[4] : Check the time out for input number mode// ==============================================================/// Section[5] : Modes Trigger/// : For specific mode, it may need some auto run behavior/// : while no user input/// 5.1) SETUP Trigger// ==============================================================// Micky0.80, will be done within OSD_Trigger./*/// 5.1) SETUP Trigger // brian.277a-3rd, allways call it. SETUP_Trigger();// 5.4) OSDPROMPT Trigger //Alex1.07a, timeout for showing PSCAN PROMPT notes#if defined (SUPPORT_PSCAN_PROMPT_SETUP) || defined (SUPPORT_PSCAN_PROMPT_OSD) OSDPROMPT_Trigger(); #endif // #if defined (SUPPORT_PSCAN_PROMPT_SETUP) || defined (SUPPORT_PSCAN_PROMPT_OSD)*/ OSDSS_Monitor(); //Add the monitor to enter screen saver.// Micky0.80, do all UI trigger// must put the flow before checking setup mode-> leave main loop.// for UI gerenal trigger/ time out.(But don't include display time) if ( (OS_GetSysTimer () > _dwTimeCount_OSDTrigger) ) { // Micky0.72, modify from 100ms to 50ms. _dwTimeCount_OSDTrigger += COUNT_50_MSEC; OSD_Trigger( OSD_TRIGGER_CONTROL, 0xFFFF); }// LLY1.20, remove this procedure into _MM_MotionTrigger() case MM_STAGE_PLAYEND#if 0//Alan1.10, for char-based subpicture#ifdef SUPPORT_CHAR_SUBPICTURE if (ATTR_AVI == __bAttrPlay && MODE_PLAYMOTION == __bModePlay) CHAR_SP_Trigger();#endif#endif // #if 0/// End Of Section(5) : Mode Trigger/// ****** DVD Channel Sections Only Begin ********************/// Below Flow are necessary only for DVD Channel mode/// !!! Only can add the DVD Channel related/// !!! control flow within this block/// Comments:/// - For SETUP, it only needs to monitor screen saver.// ==============================================================/// Section[6] : Event monitor/// 6.1) Screen Saver/// 6.2) Auto Vocal Detection// ============================================================== DISP_MonitorVBICtrl();// SETUP related codes must be put before Section 6.2.// Screen saver's behavior was done within MONITOR_ScreenSaver./// End Of SETUP related codes.#ifdef SUPPORT_SERVO_SOURCE //++CoCo2.37p MEDIA_MonitorTOPOPEN();#endif //#ifdef SUPPORT_SERVO_SOURCE //++CoCo2.37p // elmer2.36, fix usb in setup mode MEDIA_MonitorStatus();/// *** For SETUP mode, Section[6.2]~[9] are skipped. if ( __bSetupMode ) goto MAIN_LOOP_END; /// 6.2) Auto Vocal Detection// check the input of Mic. for autovocal.// DVD_172Micky, FLOW_CONTROL begin// can't put betwwen __bISRKey != KEY_NO_KEY & __bKey != KEY_NO_KEY// put it before ProceedFlowControl,// if vocal is detected(_bISRKey=KEY_VOCAL), will do KEY_VOCAL first then ProceedFlowState// if vocal key is not detected, will do ProceedFlowState directly.// so, it's safe. // This part is for Auto-Vocal detection#ifdef ENABLE_AUTOVOCAL _CC_AutoVocal( NULL_0 ); // Brian.170, for SW MIC detection#endif // ENABLE_AUTOVOCAL// DVD_172Micky, FLOW_CONTROL end/// End Of Section[6] : Event monitor// ==============================================================/// Section[7] : The DVD Channel Flow Trigger/// 7.1) Flow State Control/// 7.2) Disc Flow Trigger// ==============================================================/// 7.1) Flow State Control
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -