ircmd.c
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:309k
源码类别:

DVD

开发平台:

C/C++

  1. /*************************************************************
  2. ** FILE
  3. ** ircmd.c
  4. **
  5. ** DESCRIPTION
  6. ** splitted from ir.c, now all the IR (or global) functions
  7. ** are implemented here.
  8. **
  9. **   Create:   JJ
  10. **   Maintain:   Kenny 2000/09/29
  11. **               Terry 2003.02.24   move file header to ircmd_h.h
  12. **                                  move util code to ircmd_util.c
  13. **                                  move amp. code to ircmd_amp.c
  14. **
  15. ****************************************************************/
  16. #include "ircmd_h.h"
  17. #include "gpio.h"
  18. #include "asf_if.h"
  19. #include "lbaif.h"
  20. #include "sinf.h"
  21. #include "timer.h"
  22. //#ifdef OP_UI
  23. //#include "menu_func.h"
  24. //#include "infobanner_func.h"
  25. //#include "infobanner_def.h"
  26. //#endif//
  27. #ifdef JPG_EFFECT
  28. #include "jpegeffect.h"
  29. #endif
  30. #ifdef USER_LOGO
  31. #include "userlogo.h"
  32. #endif
  33. #ifdef SDRAM_16Mb_Mode
  34. #include "memmap.h"
  35. #include "memmap0.h"
  36. #endif
  37. #ifdef SPHE8202_ALL_TYPE_CARD_WRITE
  38. extern BYTE card_browse_sign;//dingzhy 4-11-18 9:40
  39. #endif
  40. //dtb in 20030915
  41. #ifdef SUPPORT_MIDI
  42. #include "fsmidi.h"
  43. #ifdef SUPPORT_MIDI_MENU_SEL
  44. #include "fsMidiUI.h"
  45. #endif
  46. #endif
  47. #ifdef SUPPORT_MP4
  48. //#include "drm.h"
  49.     #ifdef DIVX_DRM
  50. #include "DRM_UI.h"
  51.     #endif
  52. #include "avi_if.h"
  53. #endif
  54. #ifdef SUPPORT_MULTI_PARTITION//liweihua 2004-11-2 20:45
  55. #include "playmode.h"
  56. #endif
  57. #ifdef DVB1000_OSD_MENU //Maoyong 2004-10-19 14:32
  58. #include "dvbmenu.h"
  59. #include "sp_dtv.h"
  60. #endif
  61. #ifdef VOL_LED//HIMAGE1251
  62. BYTE nLed_index=0;
  63. #endif
  64. #ifdef  UPGRADE_TRAYOUT //joshua add    04-07-13
  65. extern  int trayout_flag;
  66. #endif
  67. #ifdef ONLY_SOUND_FIELD_KEY//zhaoyanhua add 03-10-29 15:37
  68. #include "dsp3_if.h"
  69. #define MAX_PAGE_ITEM   4
  70. #define MAX_ITEM_SEL    11
  71. BYTE surround_type = 0;
  72. extern  const UINT8 sound_item[MAX_PAGE_ITEM][MAX_ITEM_SEL];//include in sound.c
  73. #endif
  74. #ifdef ONLY_EQ_KEY//zhaoyanhua add 03-10-29 15:34
  75. #include "dsp3_if.h"
  76. #define MAX_PAGE_ITEM   4
  77. #define MAX_ITEM_SEL    11
  78. #define MAX_BAND        7
  79. #define MAX_MUSIC       7
  80. BYTE EQ_type = 0;
  81. extern  const UINT8 sound_item[MAX_PAGE_ITEM][MAX_ITEM_SEL];//include in sound.c
  82. extern  const UINT8 music_osd_set[MAX_MUSIC][MAX_BAND];
  83. extern void SettingEqLevel(BYTE *);
  84. extern void SettingEQType(BYTE type);
  85. void SetEQ(void);
  86. #endif
  87. #if 0//def  CNTR_5SPK_VOLUME
  88. static int tVolumeL,tVolumeR;   //wangfeng 2004-2-9 16:16
  89. #endif
  90. #ifdef MODIFY_OSD_SHOW_NEW_STYLE_WINDOW
  91. extern void osd_init_newstyle_window_NTSC(void);
  92. extern void osd_init_newstyle_window_PAL(void);
  93. #endif
  94. #ifdef IR_SWITCH_CD_USB_CF_OTHER  //dingzhy 04-10-22
  95. EXTERN  BYTE now_valid_type;
  96. #endif
  97. #ifdef SUPPORT_PROLOGIC_II//zhaoyanhua add 2004-2-11 13:51
  98. extern void setup_OffPrologic_II(void);    //setup_tab.c
  99. extern int setup_IsPrologicOn();    
  100. #endif// ifdef SUPPORT_PROLOGIC_II
  101.    
  102. #ifdef AUDIO_2CH_5_1CH//zhaoyanhua add 03-10-29 15:30
  103. #define AUDIO_2CH  1
  104. #define AUDIO_5_1CH  2
  105. BYTE  ChannelFlag = AUDIO_2CH;
  106. extern void AudioSet2chOutput(void);//setup_tab.c
  107. extern void AudioSet5_1chOutput(void);//setup_tab.c
  108. extern void AudioSetPrologic_IIOutput(void);//setup_tab.c
  109. extern int setup_IsSpkDownmixOff(void);
  110. extern int setup_IsSpkStereo(void);
  111. extern UINT8 setup_GetPrologicII(void);
  112. #endif
  113. #ifdef DIV_GOTO_DISPLAY//zhaoyanhua add 03-10-24 20:12
  114. BYTE SearchPage = 0;
  115. extern void ShowSearchPage(BYTE page,BYTE need_hi);
  116. #endif
  117. #ifdef HANYANG_LR_CHANGE_PAGE
  118. extern void FSGUI_File2DirArea(void);
  119. #endif
  120. #ifdef SETUP_ON_OPEN_VALID
  121. BYTE OpenFlag=0;    //dingzhy for real open sign
  122. #endif
  123.  
  124. #ifdef OFF_PROLIGIC_WHEN_TURN_KEY//zhaoyanhua add 2003-12-11 11:14
  125. extern UINT8 setup_GetPrologicII(void);
  126. #endif
  127. #ifdef TWO_KEY_SWITCH_TWO_SUBTITLE  //added by wangwei,2004-9-29 13:47
  128. extern void sup_select_subtitles(int n);
  129. extern void sup_select_channel_2(int chn);
  130. int twoSubTTFlag = 0;
  131. int IDTWO = 0;
  132. #endif  //TWO_KEY_SWITCH_TWO_SUBTITLE
  133. #ifdef DYNAMIC_SPECTRUM    //fengjl 3-10-29 20:56
  134. extern BYTE band_onoff;  
  135. #endif
  136. #ifdef NEW_PARENTAL_GUI//zhaoyanhua 2003-11-29 9:40
  137. BYTE one_key_pass_play = 0;
  138. #endif
  139. #ifdef ROTATE_NOT_ZOOM//zhaoyanhua 2003-12-9 16:38
  140. extern UINT8  Is_Rotate_State(void);
  141. #endif
  142. #if defined(SUPPORT_BASS_TREBLE)//xyy 2004-3-8
  143. extern void ddx_ircmd_BassAdjust(int updown);
  144. extern void ddx_ircmd_TrebleAdjust(int updown);
  145. #endif
  146. #ifdef JPEG_THUMBNAIL_MENU  //Maoyong 2004-8-13 20:09
  147. extern BYTE ThunmnailChkValidPrevNext(BYTE rx);
  148. #endif
  149. #ifdef USER_MPEG_LOGO       //maoyong 2004.02.20
  150. extern  BYTE    mpeg_logo_onoff;
  151. #endif
  152. #ifdef  POLLING_10MS_SAVE_RESUME    //Maoyong 2004.03.01
  153. #define DVD_RSM_WRITE_SIZE  (sizeof(same_disc_vob11_pos) + sizeof(pDSV->rsm_info[0]) + sizeof(resumeMSF) )
  154. BYTE    rsm_I2c_write_cnt = DVD_RSM_WRITE_SIZE;     
  155. #endif
  156. #ifndef DVDRELEASE
  157. //#define IRCMD_DBG       1
  158. #endif
  159. #ifndef IRCMD_DBG
  160. #undef printf
  161. #undef print_block
  162. #define printf(f, a...) do {} while (0)
  163. #define print_block(x,y) do {} while (0)
  164. #endif
  165. #include "ircmd_util.c"
  166. #include "rsm_util.h"
  167. #ifdef SUPPORT_REP_READ    //Maoyong 2004.06.07
  168. #include "read.h"
  169. #include "func.h"
  170. #endif
  171. #ifdef  DYNAMIC_SPECTRUM //zhaoyanhua add 03-11-1 15:30
  172. void ClearShowSpectrum(void);
  173. #endif
  174. #ifdef NEWSTYLE_WINDOW
  175. #include "osd_arc.h"
  176. #endif
  177. #if defined(SUPPORT_CARD_STORAGE)||defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)
  178. #include "cardfs.h"
  179. extern CARD_FILE    cardFile;//liweihua 2004-4-5
  180. extern CARD_INFO    cardP;
  181. #if defined(CF_CARD_WRITE) || defined(FAT_Write_UI)//|| defined(WRITE_USB)//liweihua mod 20031219
  182. BYTE Select_Media;
  183. BYTE pressnum_flag;
  184. extern void show_switch(BYTE Select_Media);  //wuxiaofeng
  185. //extern void show_switch(void);  //wuxiaofeng
  186. #endif
  187. #endif
  188. #ifdef FAT_FILE_MODE
  189. extern UINT16 fat_play_mode;
  190. extern BYTE mode_menu_id;
  191. #endif
  192. #ifdef SUPPORT_SPI
  193. #include "spi.h"
  194. #endif
  195. extern int setup_IsSpkDownmixOff(void);
  196. extern void osd_init_prog(void);
  197. extern void sound_init(void);
  198. extern void sound_init_2(void);//wanghaoying 20030910
  199. extern void run_save_total_sel(void);
  200. extern void run_set_variable(void);
  201. extern void run_set_variable(void);
  202. extern void set_default_value(void);
  203. extern void setup_SetPScan(void);
  204. extern void SetIDETimeOut(UINT);    //wanghaoying 2003-8-12 16:08 to declaration
  205. extern void setup_eq_display(UINT8 val);
  206. extern void sound_set_EQ_again(void);//nono 4-7-22 18:09
  207. #ifdef NEWSTYLE_WINDOW
  208. extern void browse_DrawRightItem(void);
  209. extern void osd_draw_region_arc(ARC_REGION_LOC *loc_var,BYTE updown);
  210. extern void osd_init_newstyle_window(void);
  211. extern void exe_show_time(void);
  212. extern void osd_draw_rect(UINT32 xStart, UINT32 yStart, UINT32 xLen, UINT32 yLen, BYTE bkColor);
  213. extern void exit_browse_func(void);
  214. //zhaoyanhua add 2003-12-7 19:01
  215. extern void updateAudioLanguage(void);
  216. extern void updateSubtitle(void);
  217. extern void updateRepeatMode(void);
  218. extern void UpdateAngleInfo(void);
  219. #ifdef  CLEAR_KEY_IN_WINDOW         //Maoyong add 2004.02.18
  220. extern void browse_func_clear(void);
  221. #endif
  222. #endif
  223. #ifdef CD_PLAYER        //liweihua add 2003-8-19 20:25
  224. extern void show_cdplayer(void);
  225. extern void osd_init_cdplayer(void);
  226. #endif
  227. #ifdef VIRTUAL_KEYBOARD     //liweihua 2003-9-16
  228. extern void show_virtual_keyboard(void);
  229. extern void hl_keyboard_button(BYTE SelectID);
  230. extern void osd_draw_virtual_keyboard(int xStart, int yStart,BYTE r);
  231. #endif
  232. #ifdef USE_PROLOGIC_II_KEY
  233. extern BYTE prologic_val;//clead 2003-8-7 
  234. extern set_prologic_val(BYTE prologic_mode);
  235. #endif
  236. #ifdef IR_KEY_SET_VIDEO_MODE
  237. extern void set_video_val(BYTE video_mode);
  238. #endif//IR_KEY_SET_VIDEO_MODE
  239. #ifdef CF_GPIO_CONTROL_COLOR
  240. BYTE vfd_color; //wangap 20031031
  241. #endif
  242. #if defined(DISPLAY_REMAIN_TIME) //shawn 0227
  243. int display_and_time=0;
  244. BYTE display_flag = 0;
  245. #endif
  246. #ifdef SUPPORT_MIDI
  247. extern int     iMidiSpeed;
  248. #endif
  249. #ifdef DVD_SEQ_PLAY
  250. extern  BYTE   dvd_menu_play;//wanghaoying for warning msg//terry,2002/5/2 04:02PM,new dvd play mode
  251. #endif
  252. #ifdef DOUBLE_TITLE//susu add 2003-8-22 9:03
  253. extern void exe_double_title(void);
  254. extern void exit_double_title(void);
  255. #endif
  256. #ifdef SPHE1000
  257. extern BYTE from4189;
  258. extern BYTE support_dvb_flag;
  259. #endif
  260. #ifdef DVB_SETUP
  261. extern void SP_SetVolume(UINT8 volume);
  262. #endif
  263. #ifdef EASTWIN
  264. extern UINT8 bINVERTER_POWER , bAMP_IS_ON, bPOWER_ON_MUTE_EXE;
  265. #endif
  266. /*Here deleted by xyy 2004-8-5*/
  267. #if defined(NEXT_FORWARD_IN_A_KEY)||defined(NEW_NEXT_FORWARD_IN_A_KEY)
  268. extern int rep_ir_times;
  269. extern BYTE key_data_flag;
  270. #endif
  271. #ifdef SUPPORT_MP4
  272. #include "irconfig.h"
  273. int IsUserControlDisabledByTrickyPlay( UINT32 uiKey )
  274. {   // 2004/10/07 yltseng
  275.     if( ( GetCurrentFileType() == CDROM_MP4 ) && ( !AVI_SUPPORT_TRICKY_PLAY() ) &&
  276.         ( ( play_state >= VCD_STATE_NORMAL ) && ( play_state <= VCD_STATE_SLOW ) ) )
  277.     {       
  278.         UINT16 aInvalidKey[] = { 
  279.             IRC_BW_SLOW, IRC_AB, IRC_GOTO
  280.             #ifdef TWO_FUN_IN_ONE_VFD_KEY
  281.             IRC_VFD_NEXT, IRC_VFD_PREV, 
  282.             #endif 
  283.         };
  284.         int i = 0;
  285.         for( ; i <(int)(sizeof( aInvalidKey ) / sizeof( UINT16 )); i++ )
  286.         {
  287.             if( uiKey == aInvalidKey[i] )
  288.                 return 1;
  289.         }
  290.     }
  291.     return 0;
  292. }
  293. #endif
  294. /*Marked by maoyong 2004-9-24 9:51
  295. //terry,2004/1/30 03:14PM
  296. void call_full_scrn_fun(IRCMDFUNC *fun)
  297. {
  298.     UINT32 i = 0x01, j;
  299.     for(j = 0; i < FULLOSD_MASK;)
  300.     {
  301.       #ifdef SUPPORT_FUNCTION_MENU
  302.       if((full_scrn & SETUP_PLUS) || (setup_menu_plus_timer))
  303.       {
  304.           fun[2]();
  305.           return;
  306.       }
  307.       else
  308.       #endif //end #ifdef SUPPORT_FUNCTION_MENU
  309.       if(full_scrn & i)
  310.       {
  311.         fun[j]();
  312.         return;
  313.       }
  314.       j++;
  315.       i <<= 1;
  316.     }
  317. }
  318. */
  319. /*
  320. ** IRCMD
  321. */
  322. UINT32  ircmd_callback_check_generic(UINT32 func)
  323. {
  324.     return func;
  325. }
  326. /*
  327. ** FUNCTION
  328. ** ircmd_post_func(UINT32 func)
  329. **
  330. ** DESCRIPTION
  331. ** post a system command.
  332. */
  333. //static    void    ircmd_post_func(UINT32 func)//kenny 2001/5/16 mark it
  334. void    ircmd_post_func(UINT32 func)
  335. {
  336.     SetIDETimeOut(SHORT_TMOUT);//printf("set srv timeout tm = %dn",SHORT_TMOUT);//terry,2003/7/17 11:17PM
  337. #ifdef DISP_REGION_BOTTOM// feeling ,these funcs would change the disp region 
  338. if(func == ( (CMD_FUNC|CMD_FUNC_SELECT) )//these func would cause the display bottom to up, or  up to bottom
  339.      ||(func == (CMD_FUNC|CMD_FUNC_PLAY)) 
  340.      ||(func == (CMD_FUNC|CMD_FUNC_MENU)) 
  341.      ||(func == (CMD_FUNC|CMD_FUNC_STOP)) 
  342.      ||(func == (CMD_FUNC|CMD_FUNC_RETURN)) )
  343. {
  344. /*if ((pFsJpeg->ControlArea == CNT_AREA_FILE) && 
  345.     ((pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
  346. #ifdef SUPPORT_NESGAME
  347. || (pFsJpeg->gifsFuncBtn == FS_FUNC_GAME)
  348. #endif
  349. #ifdef SUPPORT_FILE_SYSTEM_MODE
  350. || (pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER) 
  351. #endif
  352. #ifdef SUPPORT_MIDI
  353. || (pFsJpeg->gifsFuncBtn==FS_FUNC_MIDI)
  354. #endif
  355.     ))*/
  356. {
  357.      if(t_disp)
  358.      {
  359.     osd_init();
  360.     DispCookOSD0(1);
  361.      }
  362.      }
  363.      }//end if(func == ( (CMD_FUNC|CMD_FUNC_SELECT) )
  364. #endif    
  365.     if (func)
  366.     {
  367.         if (ircmd_callback_check==NULL)
  368.             ircmd_callback_check = ircmd_callback_check_generic;
  369.         func = ircmd_callback_check(func);
  370.         #ifdef SUPPORT_MIDI_MENU_SEL   //dtb
  371.         if(gIsMidiSelMenu) //(Is_MIDI_STATE())&&
  372.         {
  373.             //xlluo add for show invaild flag 04-5-9
  374.             extern BYTE bIsShowInvalid; 
  375.             if(bIsShowInvalid==TRUE)
  376.             {
  377.                 ir_select_number=0;
  378.                 bIsShowInvalid =0;    
  379.                 invalid_key();
  380.                 show_dvd_err();
  381.             }else if (bIsShowInvalid ==2)
  382.             {//show nothing
  383.                     ir_osd_post_show =0;
  384.                     bIsShowInvalid =0;    
  385.                   return;
  386.             }
  387.            // ;//null      //ouyang 2004.07.31
  388.         } else
  389.         #endif
  390.         if(func==0)
  391.         {
  392.             ir_select_number=0;
  393.             invalid_key();
  394.             show_dvd_err();
  395.         }
  396.     }
  397.     if( (func)&&(!(func&0x20000)) )
  398.     {
  399.         if(cd_type_loaded==CDROM)
  400.             e_msf=0;
  401.         #ifdef SUPPORT_WMA
  402.         #if defined(SUPPORT_CARD_STORAGE)||defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)//liweihua 2004-9-7 11:27
  403.         if((GetCurrentFileType() == CDROM_WMA) && (media_type == MEDIA_CARD))
  404.             AVD_SetMediaTimeout();
  405.         #endif
  406.         if (GetCurrentFileType() != CDROM_WMA)
  407.         #endif
  408.             AVD_SetMediaTimeout();//terry,2001/6/8 03:15PM ,we wait kernel code finish
  409. #ifdef MONE_TIMEOUR_SRC
  410.         printf("ircmd_post_func timeoutn");
  411. #endif
  412.         if(play_state==VCD_STATE_PAUSE){ //Jeff 20011004
  413.             chg2normal_play(PAUSE2NORM,TRANSFER);
  414.         }
  415.         if(!(func&0x10000))
  416.             PostCommand(func);
  417.     }
  418.     SetIDETimeOut(PLAY_TMOUT);//printf("set srv timeout tm = %dn",PLAY_TMOUT);//terry,2003/7/17 11:17PM
  419. }
  420. //terry,2004/4/6 07:44PM
  421. //void ircmd_sub_picture(void)
  422. #include "ircmd_subtitle.c"
  423. #ifdef NEW_INPUT_MENU
  424. extern void input_str_clear_variable(void);
  425. #endif
  426. #ifdef CNTR_5SPK_VOLUME     //linrc add 2004-10-11 11:02 -->when main volume change,other volume change too
  427. #ifdef CNTR_5SPK_TYPE_2     //but the other volume can change to big sound
  428. inline void Set_5SPK(void)  //ESS is like this type 
  429. {
  430.     if(IS_AUDIF_CODING_MODE_LPCM || IS_AUDIF_CODING_MODE_DTS 
  431.         || IS_AUDIF_CODING_MODE_PCM || IS_AUDIF_CODING_MODE_WMA
  432.         || IS_AUDIF_CODING_MODE_DTSCD)
  433.     {
  434.         AUDIF_Set_Volume(volume_5SPK[0]);//2004AUDDRV AudioSetVolume(volume_5SPK[0]);
  435.     }   
  436.     else  AUDIF_Set_Volume(15);//2004AUDDRV AudioSetVolume(15);  
  437. }
  438. #endif
  439. #endif
  440. void ircmd_angle(void)
  441. {
  442. //  printf("===================ircmd_angle=============n");
  443. #ifdef ANGLE_GOTO_IN_A_KEY
  444.     
  445.     if( (bIrSkipState1!=1) )//2004-5-5 15:16
  446.     {
  447.          bIrSkipState1 = 1;
  448.          rep_ir_times = 0;
  449.          bIrSkipCnt1 = 0;
  450.          return;
  451.     }
  452.     else
  453.     {
  454.          bIrSkipState1 = 0;
  455.          rep_ir_times = 0;
  456.          bIrSkipCnt1 = 0;
  457.     }
  458. #endif//NEXT_FORWARD_IN_A_KEY
  459. #if defined(DIVX_DRM) && !defined(DIVX_DRM_AES_ONLY)
  460.     if( cd_type_loaded == CDROM )
  461.     {
  462.         if( ( play_state == VCD_STATE_MP3_FILELIST )&&(GetCurrentFileType()== CDROM_MP4) )
  463.         {
  464.             osd_divx_drm_display(1,0);
  465.             return;
  466.         }else
  467.         {
  468.             invalid_key();
  469.             return;
  470.         }
  471.     }
  472. #endif  
  473.     UINT16 id; 
  474. #ifdef USE_ANGLE_SWITCH_CHANNEL//xyy 2004-8-5 
  475. /*huziqin 2004-4-29.set channel volume*/
  476. #ifdef SUPPORT_APOGEE_AMP
  477. #ifdef DOLBY_AMP_VOLUME_CTRL
  478.     subvol_next_channel();
  479.     return;
  480. #endif  //DOLBY_AMP_VOLUME_CTRL
  481. #endif
  482. #endif
  483. #if defined(FAT_Write_UI)||defined(CF_CARD_WRITE)//||defined(WRITE_USB)//liweihua 2003-10-30 10:30
  484.     if((cd_type_loaded==CDROM)&&(pFsJpeg->ControlArea == CNT_AREA_FILE))
  485.     {
  486.         if (full_scrn & PERIPHERAL)
  487.         {
  488.             #ifdef NEW_INPUT_MENU
  489.             input_str_clear_variable();
  490.             #endif
  491.             
  492.             full_scrn &= (~PERIPHERAL);
  493.             osd_init();
  494.             pressnum_flag=0;
  495.             #ifdef SPHE8202_ALL_TYPE_CARD_WRITE
  496.             card_browse_sign = 1; //dingzhy
  497.             #endif
  498.         }
  499.         else
  500.         {
  501.             full_scrn |= PERIPHERAL;
  502.             #if defined(SUPPORT_FILE_SYSTEM_MODE)||defined(SUPPORT_MP4)  //sunzhh add 041124
  503. if(IsOtherStatePlayMode())            
  504.                 ircmd_return();
  505.             #endif 
  506. #if defined(FAT_Write_UI)//sunzhh 20041126
  507.             if ((pFsJpeg->gbfsSlide)&& (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG))
  508.             {
  509.   
  510.                 ircmd_return();
  511.                 FSChangeGraphMode();                     
  512.                 FS_Return2Menu();
  513.             }                         
  514. #endif
  515.             #if defined(STORAGE_WRITE_GUI)||defined(CARD_WRITE_GUI)            
  516.                 if((((detect_type&USB_DEVICE)&&(detect_type&0x1E))   //||((detect_type&CF_CARD_DEVICE!=0)&&(detect_type&0x1C!=0)))&&(media_type == MEDIA_CD))
  517.                 #ifdef CARD_SETUP_TYPE_3
  518.                     ||((detect_type&CF_CARD_DEVICE)&&(detect_type&0x1C))
  519.                 #endif
  520.                )&&(media_type != MEDIA_CARD)) 
  521.             {
  522.                      show_mediaswitch();
  523.             }
  524.             else
  525.             #endif    
  526.                 show_switch(Select_Media);
  527.             //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:54
  528.             SetFullscrnCmdFuncPtr( switch_up, switch_down, switch_left,
  529.                                    switch_right, switch_select);
  530.         }
  531.         return;
  532.     }
  533. #endif
  534.     /*
  535.     #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
  536.         #ifdef NEWSTYLE_WINDOW
  537.             if ( (full_scrn&MESSAGE) && (action_click==2) ) // alan, 2003/8/28 05:32PM
  538.                 action_click = 0;
  539.             else
  540.         #endif
  541.         action_click = 1; //Jeff 20030506
  542.     #endif
  543.     */
  544.     #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
  545.         #ifdef NEWSTYLE_WINDOW
  546.             if ( (full_scrn&MESSAGE) && (action_click==2) )  
  547.                 action_click = 0;
  548.             else
  549.         #endif
  550.         action_click = 1; //Jeff 20030506
  551.     #else
  552.         #ifdef NEWSTYLE_WINDOW
  553.             if ( (full_scrn&MESSAGE) && (action_click==2) ) // alan, 2003/8/28 05:32PM
  554.                 action_click = 0;
  555.         #endif
  556.     #endif
  557. #ifdef NEW_SEARCH_OSD  //yw 021007
  558.     if(key_up_down==0)
  559.         id=Angle_Chg(action_click,-1); //Jeff 20021008
  560.     else
  561. #endif
  562.         id=Angle_Chg(action_click,1);
  563.     if(id)
  564.     {
  565. //wanghaoying marked 2004-7-13 10:39, for they are the same
  566. //#if defined(MUSTEK_ESS_DVD)||defined(GBM_DVD)
  567.         OSD1000ISP_STATUS(Angle_Chg(0,1), OSDIR_ANGLE);
  568.         PrintOsdMsg(STR_OS_ANGLE|(0x0a<<OSDSTR_ID_TOTL_BIT),REGION1,1|(((Angle_Chg(0,1)-1)<<8)),4);
  569. //#else
  570. //        PrintOsdMsg(STR_OS_ANGLE|(0x0a<<OSDSTR_ID_TOTL_BIT),REGION1,1|(((Angle_Chg(0,1)-1)<<8)),4);
  571. //#endif
  572.     }
  573.     else {
  574.     #ifdef NEWSTYLE_WINDOW
  575.         if(full_scrn&MESSAGE)//xyy 2003-7-29 15:08
  576.             psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][STR_OS_NONE]);
  577.         else
  578.     #endif
  579.         invalid_key();
  580.     }
  581.     #ifdef NEWSTYLE_WINDOW
  582.         if(full_scrn&MESSAGE)//xyy 2003-7-29 15:08
  583.         UpdateAngleInfo();
  584. #endif //not apogee amplifier
  585. }
  586. #ifdef USE_PROLOGIC_II_KEY      //clead 2003-8-7
  587. void ircmd_prologic(void)
  588. {
  589.     UINT8 id=0;
  590.         AUDIF_Set_Volume(0);//2004AUDDRV AudioSetVolume(0);  // cmhuang, 2003/8/28 11:58PM
  591. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW    // alan, 2003/8/27 11:36AM
  592.     if(action_click)
  593. #endif
  594.         prologic_val++;
  595.     if(prologic_val>2) 
  596.         prologic_val=0;
  597.     
  598.     switch(prologic_val)
  599.     {
  600.     case 0:
  601.         id=STR_OS_PL_MOVIE;
  602.         break;
  603.     case 1:
  604.         id=STR_OS_PL_MUSIC;
  605.         break;
  606.     case 2:
  607.         id=STR_OS_OFF;
  608.         break;
  609.     }
  610.     OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
  611.     PrintOsdMsg(STR_OS_PROLOGIC|(id<<OSDSTR_ID_TOTL_BIT),REGION1,1,4);
  612.     set_prologic_val(prologic_val);
  613.     AUDIF_Demute();//2004AUDDRV AudioDemute();  // cmhuang, 2003/8/28 11:58PM    
  614. }
  615. #endif 
  616. #ifdef IR_KEY_SET_VIDEO_MODE
  617. #ifndef SET_4_VIDEO_MODE
  618. void ircmd_set_video_mode(void)
  619. {
  620.     UINT8 id=0;
  621.     ReadFromI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);//CLEAD_VIDEO_MODE
  622.     switch(video_mode_val)
  623.     {
  624.     case 0:
  625.         id=STR_OS_DEFAULT_SETUP;
  626.         break;
  627.     case 1:
  628.         id=STR_OS_STANDARD;
  629.         break;
  630.     case 2:
  631.         id=STR_OS_LIVELY;
  632.         break;
  633.     case 3:
  634.         id=STR_OS_SHOWPLACE;
  635.         break;
  636.     case 4:
  637.         id=STR_OS_BRIGHTNESS;
  638.         break;
  639.     case 5:
  640.         id=STR_OS_MILD;
  641.         break;
  642.     case 6:
  643.         id=STR_OS_RESUME;
  644.         break;
  645.     }
  646.     OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
  647.     PrintOsdMsg(id,REGION1,1,0);
  648.     set_video_val(video_mode_val);
  649. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
  650.     if(action_click)
  651. #endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
  652.     video_mode_val++;
  653.     if(video_mode_val>6) video_mode_val=0;
  654.     WriteToI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);
  655. }
  656. #else//#ifndef SET_4_VIDEO_MODE
  657. void ircmd_set_video_mode(void)
  658. {
  659.     UINT8 id=0;
  660.     ReadFromI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);//CLEAD_VIDEO_MODE
  661.     switch(video_mode_val)
  662.     {
  663. #if 0
  664.     case 0:
  665.         id=STR_OS_DEFAULT_SETUP;
  666.         break;
  667. #endif
  668.     case 0:
  669.         id=STR_OS_STANDARD;
  670.         break;
  671.     case 1:
  672.         id=STR_OS_DYNAMIC;//STR_OS_LIVELY;
  673.         break;
  674. #if 0
  675.     case 3:
  676.         id=STR_OS_SHOWPLACE;
  677.         break;
  678.     case 4:
  679.         id=STR_OS_BRIGHTNESS;
  680.         break;
  681. #endif
  682.     case 2:
  683.         id=STR_OS_MILD;
  684.         break;
  685.     case 3:
  686.         id=STR_OS_MEMORY;//STR_OS_RESUME;
  687.         break;
  688.     }
  689.     OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
  690.     PrintOsdMsg(id,REGION1,1,0);
  691.     set_video_val(video_mode_val);
  692. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
  693.     if(action_click)
  694. #endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
  695.     video_mode_val++;
  696.     if(video_mode_val>3) video_mode_val=0;
  697.     WriteToI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);
  698. }
  699. #endif//#ifndef SET_4_VIDEO_MODE
  700. #endif//#ifdef IR_KEY_SET_VIDEO_MODE
  701. //void ircmd_audio_language(void);
  702. #include "ircmd_audio.c"
  703. //
  704. #ifdef USER_MPEG_LOGO
  705. //#include "..\setup\setup_page.h"//20040217
  706. void ircmd_mpeg_logo(void)
  707. {
  708. #ifdef SUPPORT_MIDI_MENU_SEL    //ouyang add for not ircmd_mpeg_logo in midi2004-10-13 15:16
  709.         if (Is_MIDI_STATE())
  710.         {
  711. invalid_key();
  712. return;
  713.         }
  714. #endif
  715. #ifdef JIEKE_MIDI_STATE   //ouyang add for jieke state 2005-1-6 9:43
  716.    if((system_state==SYSTEM_NODISC)||(system_state==SYSTEM_OPEN))
  717.    {
  718.     invalid_key();
  719.       return;
  720.     }
  721.     #endif
  722. //extern UINT8 setup_sel[SysNextPage][MPEG_LOGO_ITEM];//Item number
  723. //    extern UINT8 setup_sel[7][8];   // alan, 2003/9/16 05:03PM
  724. //    extern BYTE   mpeg_logo_onoff;
  725. //nono mark It can add in inv_tbl_nintaus.h 2004-3-8 20:36
  726. #if 0//def MENU_CAPTURE_LOGO_INVALID        //Maoyong 2004.02.20
  727.     if(is_menu()){
  728.         invalid_key();
  729.         return;
  730.     }
  731.     
  732. #endif
  733.     
  734. #ifdef JIEKE_DVD//wangfeng 2003-12-16 16:53    
  735.     if(setup_GetMPEGLogoItem()==2){
  736. //    if(setup_sel[7][2]==2){
  737.         invalid_key();
  738.         return;
  739.     }
  740.     if((full_scrn&SETUP)||(full_scrn&PROGRAM)){
  741.         //invalid_key();
  742.         return;
  743.     }
  744. #endif    
  745.     counter_down = 100;//terry,2003/9/12 03:55PM
  746.     if(pFsJpeg->gifsState == FS_STATE_JPEG)
  747.     {
  748. #if 0//def STOP_LOADER//nono 3-12-4 13:35
  749.         abort_play();
  750.         delay_srv_10ms(100);//nono 3-12-4 13:35
  751. #endif//#ifdef STOP_LOADER//terry,2003/8/23 08:58PM
  752. OSD1000ISP_STATUS(OSDISP_SAVELOGO, OSDIR_GLOBAL);
  753. psprintf(RegionValStr[REGION2], "");//wangfeng 2003/12/12
  754. PrintOsdMsg(STR_OS_SAVELOGO, REGION2, 1, 1);    
  755.         Save_Mpeg_Logo();
  756.         printf("Save logo...n");
  757.     }
  758.     else
  759.     {
  760.         watchdog_onoff(0);  // alan, 2003/9/23 03:05PM
  761.         run_pause_setting();
  762.         OSD1000ISP_STATUS(OSDISP_SAVELOGO, OSDIR_GLOBAL);
  763. //      psprintf(RegionValStr[REGION2], "SAVING LOGO...");  // alan, 2003/9/22 02:13PM
  764.         psprintf(RegionValStr[REGION2], "");//wangfeng 2003/12/12
  765.         PrintOsdMsg(STR_OS_SAVELOGO, REGION2, 1, 1);    
  766. #if 0//def STOP_LOADER//nono 3-12-4 13:32
  767.         abort_play();
  768. #endif//#ifdef STOP_LOADER//terry,2003/8/23 08:58PM
  769.         //delay(2500);
  770.         delay_srv_10ms(250);//nono 3-12-4 13:32
  771.         
  772.         LoadModual(MODUAL_CDROM);
  773.         Save_Mpeg_Logo();
  774.         delay_srv_10ms(100);//terry,2003/9/12 04:33PM
  775.         ircmd_play();
  776.     }
  777.     setup_SetMPEGLogo();
  778.     //exe_setup_function(STR_OS_SELECT_LOGO,STR_OS_DEFAULT_SETUP,0);  // alan, 2003/9/16 05:03PM
  779. //  exe_setup_function(STR_OS_SELECT_LOGO,STR_OS_MPEG_LOGO,0);  //NONO 2004-2-17 17:02
  780.     //setup_sel[7][2]=3;
  781.     //SETUP_MPEG_LOGO=3;//nono 2004-2-17 17:02
  782. //  setup_sel[SysNextPage][MPEG_LOGO_ITEM]=3;
  783. //  run_save_sel_cmd(SysNextPage, MPEG_LOGO_ITEM);//nono 2004-2-17 17:02
  784.     
  785.     counter_down = 10;//terry,2003/9/12 03:55PM
  786. }
  787. #endif
  788. //
  789. /***********************************************/
  790. /*     Kenny add it for selection key          */
  791. /*                                             */
  792. /***********************************************/
  793. void ircmd_select(void)
  794. {
  795. #ifdef FILE_MODE_WRITE //lijd 2005-1-5 19:22
  796. if(pFsJpeg->gifsState  ==  FS_STATE_MEDIA)
  797. {
  798.     FileModeGUI_select();
  799. return;
  800.         }
  801. #endif
  802.   #ifdef SUPPORT_MIDIDISK_TITLE
  803.         if (bIsPlayMidiTitle)//xlluo for midi title
  804.         {
  805. invalid_key();
  806. return;
  807.         }
  808. #endif
  809.     #ifdef MOVE_HIGH_LIGHT_IN_PROG_MODE
  810.     if((!full_scrn)&&(cd_type_loaded== CDROM)){     //wsf  2004-7-20 14:55  changed for cancel program when select other ,just in CDROM DISC
  811.         if(!Is_OTHER_STATE()){              
  812.             prog_cnt=0;
  813.             prog_func_off();
  814.             prog_func_clear();        
  815.         }
  816.     }
  817.     #endif
  818. #ifdef PROGRAM_SHOW_DISPLAY    //dingzhy    
  819. if ((full_scrn & PROGRAM)&&(t_disp))
  820.             DispFadeOut();
  821. #endif  
  822.     
  823. #ifdef CARD_VCD_DISPLAY_GOTO_FIRST_TIME_PAGE    //liumzh 2004-9-4 2:24
  824.   if((pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)&&(media_type==MEDIA_CARD))     
  825.   {
  826.    remain = 0;
  827.   }
  828. #endif
  829.     #ifdef IRCMD_DBG
  830.     printf("=================================ircmd_select========================n");
  831. #endif
  832.     #ifdef SUPPORT_MULTI_PARTITION//liweihua mod 2004-11-2 21:46
  833.     if((pFsJpeg->gifsState == FS_STATE_HDD)
  834.         #ifdef FAT_FILE_MODE
  835.         ||(pFsJpeg->gifsState == FS_STATE_MODE)
  836.         ||(fat_play_mode == 1)
  837.         #endif
  838.         )
  839.     {
  840.         HDDCard_select();
  841.             return;
  842.     }
  843.     #endif
  844. #ifndef IR_10_PLUS
  845.     //printf("now_num_ns:%xn",now_num_ns);
  846.     if(now_num_ns)
  847.     {
  848.         ir_num_select(ir_select_number);
  849.     }else
  850. #endif
  851. //#ifdef USER_MPEG_LOGO
  852. //  if(pFsJpeg->gifsState == FS_STATE_JPEG)
  853. //  {
  854. //      Save_Mpeg_Logo();
  855. //      printf("Save logo...n");
  856. //      return;
  857. //  }
  858. //#endif
  859.     #ifdef SUPPORT_FUNCTION_MENU
  860.     if(full_scrn || setup_menu_plus_timer)
  861.     #else
  862.     if(full_scrn)
  863.     #endif //end #ifdef SUPPORT_FUNCTION_MENU
  864.     {
  865.         //call_full_scrn_fun((IRCMDFUNC *)ircmd_select_table);
  866.         ircmd_full_scrn_select();   //Maoyong marked above line and chg 2004-9-24 11:02
  867.         //terry,2002/6/17 11:06PM
  868.         //panasonic test disc, title 8 ,hl select on pasue stae
  869.         //prohibit it!!
  870.     }
  871.     else if( (HL_exist)&&(!is_dvd_prohibit_key())&&(play_state!=VCD_STATE_PAUSE) )
  872.     {//terry,2002/5/22 07:10PM,
  873.         ircmd_post_func(CMD_FUNC|CMD_FUNC_SELECT);
  874.         //3-12-9 19:04 NONO MARKED.uopdate dsp code.
  875.         //setup_SetDTSDOWNMIXConfig();//NONO force set downmix 2003-11-24 14:23
  876.         //terry,2002/6/3 10:38AM
  877.         //bug:Press select 2nd times quickly on Panasonic's menu
  878.         //Sol:Waiting for new vobu data
  879.         if(IsAVDMediaTimeout())
  880.             HL_exist=0;
  881.     } else if ( cd_type_loaded == CDROM ) //Jeff 20010802
  882.     {
  883.         if( play_state == VCD_STATE_PAUSE )//nono 2003-9-12 10:07
  884.         {
  885.           #ifdef SUPPORT_MIDI  //ouyang 2004-8-16 11:00  first enter "pause" then "select",lyric stop 
  886.              if((midiState == MIDI_STATE_PAYLOAD)||(gIsMidiSelMenu)) 
  887.                 ircmd_play();            
  888.           #endif     
  889.             chg2normal_play( PAUSE2NORM, REALPLAY );
  890.         }
  891. #ifdef ZOOM_DIRECT_STOP_SLIDE       //wanghaoying 2003-08-25 21:56
  892.         else if(Is_JPEG_PLAY_STATE())
  893.         {
  894.             jpg_slide_time = JPEG_SLIDE_TIME;
  895. /*
  896.             // marked by Robert 031021.
  897.             if(vpp_zoom!=0)
  898.             {
  899.                 vpp_zoom = 0;
  900.                 show_zoom(1);
  901.             }
  902. */
  903.             ircmd_post_func(CMD_FUNC|CMD_FUNC_PLAY);
  904.         }
  905. #endif  // 2004/04/16 yltseng, in order to prevent showing "Invalid Key" when Pause -> Select
  906.         else
  907.         {
  908.          #ifdef EASTWIN_PORTABLE_DVD
  909.          if( (cd_type_loaded==CDROM )&&( Is_MP3_STATE()) )//tulijuan040907 from other states back not FF/FR
  910.     {
  911.     adv_search_time = 0;
  912.      play_state = VCD_STATE_NORMAL;
  913.           }
  914.           #endif  
  915.             ircmd_post_func(CMD_FUNC|CMD_FUNC_SELECT);  //Jeff 20010814
  916.         }
  917.     }else if( psd_state==(PSD_SEL_LIST|PSD_PLAY_SEG) )
  918.     {
  919.         #ifdef CONTINUOUS_NUM_KEY_SELECT//Jack added 04/11/13
  920.         ircmd_post_func(CMD_SELECT | (1));  
  921.         #else
  922.         ircmd_1();
  923.         #endif
  924.     }else if( (play_state==VCD_STATE_PREVIEW) ||(play_state==VCD_STATE_9FRAMES) )
  925.     {
  926.         ircmd_play();
  927.     }else if( (cd_type_loaded==CDDVD)&& (play_state!=VCD_STATE_STOP)&&still_timer )
  928.     {
  929.         AVD_SetMediaTimeout();
  930.         timeout_playback=0;
  931. #ifdef  VALID_SELECT_IN_SOME_MODES
  932.     }else if((play_state==VCD_STATE_SLOW)||(play_state==VCD_STATE_PAUSE)||
  933.             (play_state==VCD_STATE_FASTBACKWARD)||(play_state==VCD_STATE_FASTFORWARD))  //alex, Linkconcept. 20030219
  934.     {
  935.             ircmd_play();
  936.     }else if(play_state==VCD_STATE_STOP)   //alex, Linkconcept. 20030219
  937.     {
  938.             ircmd_resume();
  939. #endif                  
  940.     }
  941.     else
  942. //#ifndef USER_MPEG_LOGO
  943.         invalid_key();
  944. //#else
  945. //          {
  946. //
  947. //              run_pause_setting();
  948. //              LoadModual(MODUAL_CDROM);
  949. //              Save_Mpeg_Logo();
  950. //              ircmd_play();
  951. //          }
  952. //#endif
  953.             /* alan marked 02-05-13 */
  954.             //if( (RegionOnOff[1][2]==STR_OS_NO)&&(timeout_osd[1])&&IsAVDMediaTimeout() )
  955.             //{//terry,cls invalid osd msg , 0511
  956.             //  timeout_osd[1]=1;
  957.             //}
  958. }
  959. void ircmd_title_menu(void)
  960. {
  961. #ifdef SUPPORT_MIDI_MENU_SEL//xlluo for midi title
  962.         if (Is_MIDI_STATE())
  963.         {
  964. invalid_key();
  965. return;
  966.         }
  967. #endif
  968. #ifdef SUPPORT_MIDIDISK_TITLE
  969.         if (bIsPlayMidiTitle)//xlluo for midi title
  970.         {
  971. invalid_key();
  972. return;
  973.         }
  974. #endif
  975. #ifdef TITLE_PBC_IN_ONE_KEY     //wanghaoying 2003-8-28 2:36 added
  976.     if(cd_type_loaded!=CDDVD)
  977.     {
  978.         ircmd_playmode_toggle();
  979.         return;
  980.     }
  981. #endif
  982. #if defined(USE_TITLEMENU_TO_JPG_RETURN)
  983. #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
  984.     if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
  985. #else
  986.     if(Is_MP3_STATE())
  987. #endif
  988.     {
  989.         invalid_key();  
  990.         return;
  991.     }
  992.     
  993.     if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
  994.     {
  995.         ircmd_return();
  996.     }
  997.     if(Is_JPEG_STATE())
  998.     return;
  999. #endif//USE_TITLEMENU_TO_JPG_RETURN
  1000. #if defined(JPG_EFFECT)&&defined(USE_TITLE_KEY_TO_CALL_JPGEFFECT_HELP)&&defined(CALL_JPGEFFECT_HELP)
  1001. //  jpeg_use_key_to_call_help();
  1002. #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
  1003.     if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
  1004. #else
  1005.     if(Is_MP3_STATE())
  1006. #endif
  1007.     {
  1008.         invalid_key();  
  1009.         return;
  1010.     }
  1011.     
  1012. #ifdef SUPPORT_GIF//when play GIF pic, cannot display "USE_TITLE_KEY_TO_CALL_JPGEFFECT_HELP "effect ,suqiaoli add 2004-2-27
  1013.     if( GetCurrentFileType() == CDROM_GIF)
  1014.     {
  1015.         invalid_key();
  1016.         return;
  1017.     }
  1018. #endif  
  1019.     
  1020.     if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
  1021.     {
  1022.         if (pFsJpeg->gbfsSlide == 1)
  1023.         return;
  1024.         Jpg_Show_Usage_Flag=1;
  1025.         //ircmd_post_func(CMD_FUNC | CMD_FUNC_PREVIEW);
  1026.         Jpg_Show_Usage();
  1027.         return;
  1028.     }
  1029.     if(Is_JPEG_STATE())
  1030.     return;
  1031. #endif
  1032. #ifdef JPG_LOGO // 2004/10/07 yltseng
  1033.     if(Is_JPEG_STATE())
  1034.     {
  1035.         Fetch_Jpg_Logo();
  1036.         return;
  1037.     }
  1038. #endif
  1039. #ifdef SUPPORT_MP4              //sunzhh add 2004-9-10
  1040. if (GetCurrentFileType() == CDROM_MP4)
  1041.     {
  1042.         invalid_key();
  1043.         return;
  1044.     }
  1045. #endif  
  1046.     #if defined(JIEKE_DVD) && defined(DVD_SEQ_PLAY)//add by wangfeng 2003-11-28 18:01
  1047.     if((dvd_menu_play==0)&&(cd_type_loaded==CDDVD)){
  1048.     invalid_key();  
  1049.     }
  1050.     else
  1051.     #endif
  1052. #ifdef USE_TITLE_RESUME//2004-6-2 22:48
  1053.     if(is_menu()==1 && cd_type_loaded==CDDVD )
  1054.     {
  1055.         ircmd_post_func(CMD_FUNC | CMD_FUNC_RESUME);
  1056.         return;
  1057.     }
  1058.     else
  1059. #endif//USE_TITLE_RESUME
  1060.     {
  1061.     OSD1000ISP_STATUS(OSDISP_TITLE, OSDIR_TITLE);
  1062.     PrintOsdMsg(STR_OS_TITLE,REGION1,1,0);
  1063.     ircmd_post_func(CMD_FUNC | CMD_FUNC_TITLE);
  1064. #ifdef  INVALID_ZOOM_IN_DVD_MENU//XLJ2004-3-26
  1065. //cancel zoom when return to short film in DVD menu by pressing title key. heqiang, 2004-4-23 9:52
  1066.     ircmd_cancel(C_SHOW | C_PLAY | C_ZOOM);
  1067. #endif//INVALID_ZOOM_IN_DVD_MENU    
  1068.     }
  1069. #if 1//def FUSS_DVD
  1070.     if(RegionOnOff[REGION1][2]==STR_OS_TITLE)
  1071.     {
  1072.         #ifdef IRCMD_DBG
  1073.         printf("rep canceln");
  1074.         #endif
  1075.         cancel_rep();
  1076.     }
  1077. #endif
  1078. #ifdef EASTWIN
  1079. #if defined(SUPPORT_CARD_STORAGE) || defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)//liweihua add 20040129
  1080.            if((media_type != MEDIA_CARD)&&(cd_type_loaded!=CDDVD ))//tulijuan040909 
  1081.                 ircmd_9frames();
  1082. #else
  1083.            ircmd_9frames();//tulijuan
  1084. #endif
  1085. #endif
  1086. }
  1087. #if defined(TAS3001_AMP)||defined(NO_AMP_ONLY_TUNER)
  1088. void ircmd_clear(void)
  1089. {
  1090.     //dvd-6-0 con1 pin2 ddxcs (ca720 pin 112 gpio22 )set high  for power off
  1091.     ircmd_power();//2002 0918
  1092.     // regs0->gpio_sel|=(3<<0);
  1093.     regs0->gpio_out[22/16]|=(1<<(22%16));
  1094.     // regs0->gpio_oe[22/16]|=(1<<(22%16));
  1095. }
  1096. #elif defined(USE_CLEAR_KEY_AS_ONLY_P_SCAN)       //gerry,2004-1-30 20:02
  1097. void ircmd_clear(void)
  1098. {   
  1099. //  printf("-----------P_SCAN---n");
  1100. /*
  1101.         //tv_out_id = P_SCAN;
  1102.         //if(tv_out_id== P_SCAN) 
  1103.                setup_tv_out(TV_SVIDEO);
  1104.         //else  
  1105.            setup_tv_out(P_SCAN);        
  1106.         //setup_tv_out(P_SCAN);
  1107.         
  1108.         setup_SetPScan();
  1109. */
  1110.         extern UINT8 ap_tv_out_id;
  1111.         extern const UINT8 tv_out_map[MODE_MAX_PSCAN];
  1112.         if(full_scrn&SETUP)
  1113.             return;
  1114.         if(MODE_MAX_PSCAN==0x02)
  1115.         {
  1116.             ap_tv_out_id=P_SCAN-1;
  1117.         }
  1118.         else
  1119.         {
  1120.             ap_tv_out_id=P_SCAN;            
  1121.         }   
  1122.         if (ap_tv_out_id>=MODE_MAX_PSCAN) ap_tv_out_id=0;
  1123.         tv_out_id=tv_out_map[ap_tv_out_id];
  1124.         setup_tv_out(tv_out_id);
  1125.         setup_SetPScan();
  1126.     
  1127.         PrintOsdMsg(STR_OS_P_SCAN_YUV, REGION1, 1, 0);
  1128.     }
  1129. #else//#elif defined(USE_CLEAR_KEY_AS_ONLY_P_SAN)       //gerry,2004-1-30 20:02
  1130. void ircmd_clear(void)
  1131. {
  1132.     extern UINT8 bMouseDown;   //xlluo add for midi 2004.09.24
  1133. #ifdef IRCMD_DBG
  1134.     printf("================= clear =================n");
  1135. #endif
  1136.     if(!full_scrn)
  1137.     {
  1138.         if(ir_select_number)
  1139.         {
  1140.             ir_select_number=0;
  1141.             osd_tog_region(REGION1, OSD_OFF);
  1142.         }else
  1143. #ifdef SUPPORT_MIDI//axel for seprate clear function from UP/0 keys 2004/9/4
  1144.         if(gIsMidiSelMenu)
  1145.         {
  1146.             if (!bMouseDown)
  1147.             {
  1148.                 if (MenuState >= MENU_MULTI_INDEX_SEL)
  1149.                     MultiSel_DelCurSong();
  1150.                 else
  1151.         MidiUI_Sel_Clear_OSD();
  1152.             }
  1153.       #ifdef SUPPORT_MIDIUI_IME
  1154.         if(MenuState==MENU_MULTI_INDEX_SEL)
  1155.             Ime_RefreshFirstPage(0);
  1156.       #endif//SUPPORT_MIDIUI_IME
  1157.         }else
  1158. #endif//SUPPORT_MIDI
  1159.         {
  1160.             invalid_key();
  1161.         }
  1162.         return;
  1163.     }
  1164.     #ifdef CLEAR_KEY_QUIT_CUST_SETUP    // linrc 2004-6-10 21:40
  1165.     if((full_scrn&CUSTM)||(full_scrn&SETUP))
  1166.     {
  1167.        ExitSetupPage(1); 
  1168.     }    
  1169.     #endif 
  1170. #ifdef  SUPPORT_BOOK
  1171.     if(full_scrn&MARK)
  1172.     {
  1173.         book_func_clear();
  1174.         return;
  1175.     }
  1176.     else
  1177. #endif
  1178.     if(full_scrn&GOTO)
  1179.     {
  1180.         search_func_clear();
  1181.         return;
  1182.     }else if(full_scrn&PROGRAM)
  1183.     {
  1184. //    #ifdef OP_UI//zhaoyanhua add 2004-4-12 15:51
  1185. //        prog_func_clear();
  1186. //    #else
  1187.         prog_func_input(11); //clear
  1188. //    #endif
  1189.     }
  1190.     else if(full_scrn&SETUP)
  1191.     {
  1192.         #ifdef KONKA_DVD    //clead 20020904
  1193.         setup_func_clear();
  1194.         #endif
  1195.         if(digit_cnt!=0)
  1196.             show_password(CLREAR_PASSWD);
  1197.     }
  1198.     #if defined(CLEAR_KEY_IN_WINDOW) && defined(NEWSTYLE_WINDOW)    //Maoyong 2004.02.18
  1199.     else if(full_scrn & MESSAGE)
  1200.     {       
  1201.         browse_func_clear();
  1202.     }
  1203.     #endif
  1204. }
  1205. #endif
  1206. //void ircmd_setup(void)
  1207. #include "ircmd_setup.c"
  1208. void ircmd_karaoke(void)//2-7-6 16:02
  1209. {
  1210. #ifdef KARAOKE_USE_IR_CRT
  1211. #ifdef SDRAM_16Mb_Mode
  1212.     invalid_key();
  1213.     return;
  1214. #endif
  1215. #ifdef ADJUSTING_ACTION_VALID_RIGHT_NOW
  1216.     setup_MIC(1);
  1217. #elif defined(KARAOKE_MENU)//wangfeng 2003-10-31 11:36
  1218. printf("<>:full_scrn=>%dn",full_scrn);
  1219.     if(full_scrn&SETUP)
  1220.     return;
  1221.     else
  1222.     setup_KARAOKE();
  1223. printf("<>:full_scrn2=>%dn",full_scrn);
  1224. #else
  1225. setup_MIC(action_click);
  1226. #endif
  1227. #endif// KARAOKE_USE_IR_CRT
  1228. }
  1229. void ircmd_bk_slow(void)
  1230. {//need to implement
  1231. #ifdef SUPPORT_MP4  // 2004/07/27 yltseng   
  1232.     if( IsUserControlDisabledByTrickyPlay( IRC_BW_SLOW ) )
  1233.     {
  1234.         invalid_key();
  1235.         return;
  1236.     }
  1237. #endif
  1238. #ifdef SUPPORT_SLOWBACKWARD         //gerry for backward slow function,3-8-19 23:45
  1239.    if(rep_ab_mode != REPEAT_AB_IDLE)
  1240.     {
  1241.         invalid_key();
  1242.         return;
  1243.     }
  1244.    //if( (cd_type_loaded!=CDDVD)||PE_DSI_novideo() )
  1245.     if(cd_type_loaded!=CDDVD)
  1246.     {
  1247.         invalid_key();
  1248.         return;
  1249.     }
  1250.     if(pre_slowmotion())
  1251.         return;
  1252. #ifdef SF_PLAY_SR
  1253.     if(video_slow<0)  //wsf add 040205
  1254.     {
  1255.         video_slow=0;
  1256.       ircmd_play();
  1257.       return;
  1258.     }
  1259. #endif
  1260.     //add DVD multiple slow backward, Jeff 20030417
  1261.     if (video_slow >= 0) {//zhaoyanhua modify 2003-4-18 15:08
  1262.         video_slow = -2;
  1263.     } else {
  1264. #ifdef FUSS_DVD
  1265.         video_slow-=2;
  1266. #else
  1267.     video_slow--;
  1268. #endif
  1269.     }
  1270.     #ifdef FUSS_DVD
  1271.     if (video_slow >= -8)
  1272.     #else
  1273.     if (video_slow > -8)
  1274.     #endif
  1275.     {
  1276.         int idSlow;
  1277.         idSlow = (-1) * video_slow;
  1278.         avd_slow_state(video_slow+1);
  1279.         #ifdef ALWAYSE_SHOW_SLOW    //dingzhy for TONIC 
  1280.         PrintOsdMsg(STR_OS_SB|(idSlow<<OSDSTR_ID_TOTL_BIT),REGION1,0,7);
  1281.         #else
  1282.         PrintOsdMsg(STR_OS_SB|(idSlow<<OSDSTR_ID_TOTL_BIT),REGION1,1,7);
  1283.         #endif
  1284.     }
  1285.     else
  1286.     {
  1287.             video_slow=0;
  1288.             ircmd_play();
  1289.         }
  1290. #endif      //SUPPORT_SLOWBACKWARD
  1291. }
  1292. void ircmd_reading(void)
  1293. {
  1294. #ifdef SUPPORT_REP_READ
  1295. #ifdef IRCMD_DBG
  1296.     printf("============== ircmd_reading ================n");
  1297. #endif
  1298.     //if in no volume state not, can't do repeat read
  1299.     if(user_mute || (audio_volume == 0) ){
  1300.         invalid_key();
  1301.         return;
  1302.     }
  1303.     
  1304.     if(full_scrn&READ){
  1305.         CancelRead();       
  1306.         if(rep_ab_mode == REPEAT_FIND_B)
  1307.             ircmd_post_func(CMD_FUNC|CMD_FUNC_REPAB);   
  1308.     }else{
  1309.         full_scrn=READ;
  1310.         ShowReadPage();
  1311.         
  1312.         //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:19
  1313.         SetFullscrnCmdFuncPtr(read_func_up, read_func_down, read_func_left,
  1314.                               read_func_right, read_func_select);
  1315.     }
  1316. #endif  //SUPPORT_REP_READ
  1317. }
  1318. void ircmd_resume(void)
  1319. {
  1320. #ifdef SUPPORT_CDG
  1321.         UINT8 cdg=0;
  1322.     if ( (cd_type_loaded==CDDA) && (cd_subtype==CD_DA) && bReadSubChannel )
  1323.     {
  1324.         cdg=1;
  1325. #if 1//def HUAJIA_DVD
  1326.         if ( CDG_IsCDGNow() ) {
  1327. #if defined(NEW_STYLE_SETUP)||defined(SDRAM_16Mb_Mode)
  1328.         ircmd_play();
  1329. #else
  1330.             invalid_key();
  1331. #endif//NEW_STYLE_SETUP
  1332.             return;
  1333.         }
  1334. #endif
  1335.     }
  1336. #endif
  1337. #ifdef DISABLE_PLAY_AT_DVDREGIONERR   //oujx for tonic
  1338.     if(cd_type_loaded==CDDVD)
  1339.     if(dvd_error==REGION_ERR)
  1340.     {
  1341.         invalid_key();
  1342.         return;
  1343.     }
  1344. #endif
  1345.     if( resumeMSF == 0 )
  1346.     {
  1347. #if defined(NEW_STYLE_SETUP)||defined(SDRAM_16Mb_Mode)
  1348.         ircmd_play();
  1349. #else
  1350.         invalid_key();
  1351. #endif//NEW_STYLE_SETUP
  1352.         return;
  1353.     }
  1354.     if((cd_type_loaded != CDDA)&&(cd_type_loaded !=CDROM)&&(cd_type_loaded !=CDDVD))
  1355.     {
  1356.         if(IsPBCOn())
  1357.         {
  1358.             if ( (pFsJpeg->List.s.header!=LIST_PLAY) && (pFsJpeg->List.s.header!=LIST_SELECTION) )       //Jeff 20020520
  1359.             {
  1360.                 invalid_key();
  1361.                 return;
  1362.             }
  1363.         }
  1364.     }
  1365. #ifdef SUPPORT_CDG
  1366.         if(cdg)
  1367.     if ( CDG_IsCDGNow() && bReadSubChannel ) {
  1368.         CDG_Pause();
  1369.     }
  1370. #endif
  1371.     OSD1000ISP_STATUS(OSDISP_RESUME, OSDIR_GLOBAL);
  1372.     //PrintOsdMsg(STR_OS_RESUME,REGION0,2,0);
  1373.     PrintOsdMsg(STR_OS_RESUME,REGION1,2,0);
  1374.     cancel_rep();
  1375.     ircmd_post_func(CMD_FUNC | CMD_FUNC_RESUME);
  1376.     if (!user_mute) { //Jeff 20010904
  1377.         AUDIF_Demute();//2004AUDDRV AudioDemute();
  1378.     }
  1379. }
  1380. #include "ircmd_num.c" //terry,2004/1/14 02:42PM
  1381. #include "ircmd_zoom.c"//terry,2004/1/14 02:40PM
  1382. //void ircmd_zoom(void)
  1383. #ifdef CF_GPIO_CONTROL_COLOR
  1384. #include "ircmd_vfd_gpio.c"
  1385. #endif
  1386. //void ircmd_up(void)
  1387. //void ircmd_down(void)
  1388. //void ircmd_left(void)
  1389. //void ircmd_right(void)
  1390. #include "ircmd_dir.c" //terry,2004/1/30 04:14PM
  1391. void pbcoff_init()
  1392. {
  1393.     if( (cd_type_loaded==CDROM)||(cd_type_loaded==CDDVD) )
  1394.         return;
  1395.     if(!IsPBCOn())
  1396.         return;
  1397.     //pbc_black_enable=0;//jhuang 891108
  1398.     psd_st.psd_list_id = 0xffff;
  1399.     ircmd_callback_check = NULL;
  1400.     if((play_state!=VCD_STATE_STOP)&&((psd_state&PSD_PLAY_SEG)!=PSD_PLAY_SEG)&&(timeout_playback==0))
  1401.         bPbcOff=1;
  1402.     else
  1403.         ircmd_post_func(CMD_FUNC | CMD_FUNC_PBC);
  1404.     psd_state = 0;
  1405. }
  1406. void pbcon_init()
  1407. {
  1408.     psd_st.psd_list_id = 0x0;
  1409.     ircmd_cancel(C_SHOW|C_PLAY);
  1410.     playmode_sel(CLEAR_ALL); //0-11-17 12:15
  1411.     ircmd_post_func(CMD_FUNC | CMD_FUNC_PBC);
  1412.     //    DispCookOSD0(1);
  1413. }
  1414. /*
  1415. ** playmode.
  1416. */
  1417. #ifdef FUSS_DVD
  1418. void    ircmd_playmode_toggle(void)
  1419. {//pbc on/off
  1420.     int id;
  1421. #ifdef SUPPORT_MIDI_MENU_SEL
  1422.     extern UINT8 gIsMidiSelMenu;
  1423.     if((gIsMidiSelMenu)) 
  1424.     {
  1425.          ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
  1426.         return ;
  1427.     }
  1428. #endif
  1429.     ircmd_cancel(C_SHOW|C_PLAY);
  1430.     if((cd_type_loaded!=CDDVD)&&(action_click))//nono 20020708
  1431.     {
  1432.         #ifdef IRCMD_DBG
  1433.         printf("rep canceln");
  1434.         #endif
  1435.         cancel_rep();
  1436.     }
  1437.     if(cd_type_loaded!=CDDVD)
  1438.     {
  1439.         if(action_click)
  1440.         {
  1441.             if (IsPBCOn())
  1442.             {
  1443.                 disc_st_time = M2I(gettrkmsf(cd_trk_lo_now));
  1444.                 pbcoff_init();
  1445.             }
  1446.             else
  1447.             {
  1448.                 shuffle_flag = 0;
  1449.                 pbcon_init();
  1450.                 AVD_SetMediaTimeout();
  1451. #ifdef MONE_TIMEOUR_SRC
  1452.                 printf(__FUNCTION__" timeoutn");
  1453. #endif
  1454.             }
  1455.         }
  1456.         if (IsPBCOn())
  1457.             id=STR_OS_ON;
  1458.         else
  1459.             id=STR_OS_OFF;
  1460.         OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
  1461.         //PrintOsdMsg(STR_OS_MENUPLAY|(id<<8),REGION1,1,4);
  1462.         PrintOsdMsg(STR_OS_MENUPLAY|(id<<OSDSTR_ID_TOTL_BIT),REGION1,1,4);
  1463.     }else
  1464.     {
  1465. #ifdef ONLY_PBC//nono 20020708
  1466.         {
  1467.             invalid_key();
  1468.             return;
  1469.         }
  1470. #else
  1471.         ircmd_root_menu();      //terry,0508, revise seq.
  1472. #endif
  1473.     }
  1474. }
  1475. #else
  1476. void ircmd_playmode_toggle(void)
  1477. {
  1478.     //pbc on/off
  1479.     int id;
  1480. #ifdef REPEAT_AB_REPEAT_IN_ONE_EKY
  1481. extern int repeat_key;
  1482. #endif
  1483. #ifdef SUPPORT_MIDIDISK_TITLE
  1484.     if (bIsPlayMidiTitle)//xlluo for midi title
  1485.     {
  1486. invalid_key();
  1487. return;
  1488.     }
  1489. #endif
  1490. #ifdef INVALID_MENUKEY_WHEN_PROG_PLAY
  1491.     if(prog_cnt)                  //hq,for ngailik, 2004-3-6 22:07
  1492.     {
  1493.         invalid_key();  
  1494.         return;
  1495.     }    
  1496. #endif//INVALID_MENUKEY_WHEN_PROG_PLAY  
  1497. #ifdef SUPPORT_MIDI_MENU_SEL
  1498.     extern UINT8 gIsMidiSelMenu;
  1499.     if((gIsMidiSelMenu)) 
  1500.     {
  1501.          ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
  1502.         return ;
  1503.     }
  1504. #endif
  1505. #ifdef MENU_STOP_EXCHANGE        //xulf 2003-12-06 for menu and PBC 2-key.
  1506.     if(cd_type_loaded == CDROM) // Added by Robert for JPEG thumbnail previewing mode. 2002/05/07
  1507.     {
  1508.         if(JPEG_NORMAL_MODE == pFsJpeg->g_nJpegMode)
  1509.         { 
  1510.             OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
  1511.             PrintOsdMsg(STR_OS_MENUPLAY,REGION1,1,0);
  1512.             return;
  1513.         }
  1514.     }
  1515. #endif
  1516. #if defined(USE_PBC_TO_JPG_RETURN)//add by wangfeng 2003-12-13 10:49
  1517. #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
  1518.     if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
  1519. #else
  1520.     if(Is_MP3_STATE())
  1521. #endif
  1522.     {
  1523.         invalid_key();  
  1524.         return;
  1525.     }
  1526.     
  1527.     //if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
  1528.     if(Is_JPEG_PLAY_STATE()==1)//nono 3-12-17 19:42
  1529.     {
  1530.         ircmd_return();
  1531.     return;
  1532.     }
  1533. //  if(Is_JPEG_STATE())
  1534. #endif//USE_PBC_TO_JPG_RETURN)
  1535. #ifdef  INVALID_ZOOM_IN_DVD_MENU//XLJ2004-3-26
  1536. //cancel zoom when return to choosing Menu by pressing menu key. heqiang, 2004-4-23 9:52
  1537.     ircmd_cancel(C_SHOW | C_PLAY | C_ZOOM);
  1538. #else//INVALID_ZOOM_IN_DVD_MENU
  1539.     ircmd_cancel(C_SHOW | C_PLAY);
  1540. #endif//INVALID_ZOOM_IN_DVD_MENU  
  1541. #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
  1542.     action_click = 1;
  1543. #endif
  1544.     #if defined(SUPPORT_FILE_SYSTEM_MODE)
  1545.     if((cd_type_loaded!=CDDVD)&&(action_click)&&(Is_MP3_STATE()==0)&&(Is_OTHER_STATE()==0)&&(Is_JPEG_STATE()==0) )//nono  edit it  2004-03-01 13:41
  1546.     #else
  1547.     if((cd_type_loaded!=CDDVD)&&(action_click)&&(Is_MP3_STATE()==0) )//nono 20020708
  1548.     #endif//#if defined(SUPPORT_FILE_SYSTEM_MODE)
  1549.     #ifdef SKYWORTH_DVD
  1550.      if(cd_type_loaded!=CDROM)
  1551.     #endif 
  1552.     {
  1553.         #ifdef IRCMD_DBG
  1554.         printf("rep canceln");
  1555.         #endif
  1556.         cancel_rep();
  1557.       
  1558.     }    
  1559.     if (cd_type_loaded == CDROM) // Added by Robert for JPEG thumbnail previewing mode. 2002/05/07
  1560.     {
  1561.         if (Is_JPEG_STATE())
  1562.         {
  1563.             ircmd_callback_check = fs_callback_check;
  1564.             ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
  1565.         }
  1566.         else
  1567.             invalid_key();
  1568.     }
  1569.     else if (cd_type_loaded != CDDVD)
  1570.     {
  1571. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
  1572.         if (action_click)
  1573. #endif
  1574.         {
  1575.             if (IsPBCOn())
  1576.             {
  1577.                 disc_st_time = M2I(gettrkmsf(cd_trk_lo_now));
  1578.                 pbcoff_init();
  1579.             }else
  1580.             {
  1581.                 shuffle_flag = 0;
  1582.                 pbcon_init();
  1583. #ifdef PBC_ON_NO_REPEAT
  1584.   repeat_key=0;
  1585. #endif
  1586.                 AVD_SetMediaTimeout();
  1587. #ifdef MONE_TIMEOUR_SRC
  1588.                 printf(__FUNCTION__" timeoutn");
  1589. #endif
  1590.             }
  1591.         }
  1592.         if (IsPBCOn())
  1593.         {
  1594.             OSD1000ISP_STATUS(OSDISP_MENUON, OSDIR_MENU);
  1595.             id = STR_OS_ON;
  1596.         }
  1597.         else
  1598.         {
  1599.             OSD1000ISP_STATUS(OSDISP_MENUOFF, OSDIR_MENU);
  1600.             id = STR_OS_OFF;
  1601.         }
  1602.         //PrintOsdMsg(STR_OS_MENUPLAY | (id << 8), REGION1, 1, 4);
  1603. #ifdef VCD_SHOW_PBC_NOT_MENUPLAY
  1604.         PrintOsdMsg(STR_OS_PBC | (id << OSDSTR_ID_TOTL_BIT),REGION1,1,4);
  1605. #else
  1606.         PrintOsdMsg(STR_OS_MENUPLAY | (id << OSDSTR_ID_TOTL_BIT), REGION1, 1, 4);
  1607. #endif
  1608.     }
  1609.     else
  1610.     {
  1611. #ifndef  DVD_SEQ_PLAY
  1612. #if defined(ONLY_PBC)||defined(SETUP_DONGLI459)//nono 20020708
  1613.         {
  1614.             invalid_key();      //2-6-18 23:04 for jcg_dvd
  1615.             return;
  1616.         }
  1617. #else
  1618.         ircmd_root_menu();      //terry,0508, revise seq.
  1619. #endif
  1620. #else
  1621.         //terry,2002/5/2 04:09PM
  1622.         //add new dvd play mode
  1623.         //use pbc key to toggle play mode
  1624.         UINT32 cmd;
  1625. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
  1626.         if(action_click)//toggle to on/off
  1627. #endif
  1628.             dvd_menu_play = (++dvd_menu_play) % 2;
  1629.         if(dvd_menu_play)
  1630.         {
  1631.             id = STR_OS_ON;
  1632.             cmd = CMD_FUNC | CMD_FUNC_MENU;
  1633.         }
  1634.         else
  1635.         {
  1636.             id = STR_OS_OFF;
  1637.             cmd = CMD_FUNC | CMD_FUNC_PLAY;
  1638.         }
  1639.         //PrintOsdMsg(STR_OS_MENUPLAY | (id << 8), REGION1, 1, 4);
  1640. #ifdef VCD_SHOW_PBC_NOT_MENUPLAY
  1641.         PrintOsdMsg(STR_OS_PBC | (id << OSDSTR_ID_TOTL_BIT),REGION1,1,4);
  1642. #else
  1643. {
  1644.         OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
  1645.         PrintOsdMsg(STR_OS_MENUPLAY | (id << OSDSTR_ID_TOTL_BIT), REGION1, 1, 4);
  1646. }
  1647. #endif
  1648. #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
  1649.         if(action_click)//toggle to on/off
  1650. #endif
  1651.         {
  1652.             dvd_title = 1;
  1653.             dvd_chapter = 1;
  1654.             ircmd_post_func(cmd);
  1655.         }
  1656. #endif
  1657.     }
  1658. }
  1659. #endif
  1660. #ifdef DEACTIVATE_PSCAN
  1661. extern BYTE    enter_deactivate_pscan;   
  1662. extern BYTE    pscan_count;
  1663. extern BYTE Pscan_on;
  1664. #endif
  1665. void ircmd_root_menu(void)
  1666. {
  1667. #ifdef DEACTIVATE_PSCAN
  1668. if((play_state==VCD_STATE_OPEN)&&(Pscan_on==1))
  1669. {
  1670.    enter_deactivate_pscan=1;
  1671.    pscan_count=0;
  1672. }
  1673. #endif
  1674.  #ifdef SUPPORT_MIDIDISK_TITLE
  1675.         if (bIsPlayMidiTitle)//xlluo for midi title
  1676.         {
  1677. invalid_key();
  1678. return;
  1679.         }
  1680. #endif
  1681.     #if defined(USE_ROOTMENU_TO_JPG_RETURN)
  1682. #if defined(SUPPORT_FILE_SYSTEM_MODE)&&!defined(MENU_RETURN_INONE) // nono 20030807
  1683.     if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
  1684. #elif defined(MENU_RETURN_INONE)//nono 4-8-7 3:37 for eastech
  1685.     if(Is_MP3_STATE()||(play_state == VCD_STATE_STOP))
  1686. #else
  1687.     if(Is_MP3_STATE())
  1688. #endif
  1689.     {
  1690.         invalid_key();  
  1691.         return;
  1692.     }
  1693.     
  1694.     if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE()||Is_OTHER_STATE())  //wsf 0802
  1695.     {
  1696.         ircmd_return();
  1697.         return;    //wsf 0802
  1698.     }
  1699.     if(Is_JPEG_STATE())
  1700.     return;
  1701. #endif//USE_TITLEMENU_TO_JPG_RETURN
  1702. #ifdef SDRAM_16Mb_Mode              //gerry,2004-4-7 15:00
  1703.     if((full_scrn==SETUP)||(full_scrn==PROGRAM))
  1704.     {
  1705.         invalid_key();
  1706.         return;    
  1707.     }
  1708. #endif//SDRAM_16Mb_Mode
  1709.     //printf("1.ROOT MENUn");
  1710.     ircmd_cancel(C_SHOW|C_PLAY);
  1711. #ifdef DVD_AUDIO    // alan, 2002/11/13 02:58