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

DVD

开发平台:

C/C++

  1. #ifdef SUPPORT_FUNCTION_MENU
  2. #include "setup_def.h"
  3. #endif 
  4. #if (defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))//Modifed by ChenZhao on 2004-9-22 11:33  
  5. void InitVideoSetupGUI(void);
  6. int IsVideoSetupExit_NextVideoSetup();
  7. int IsPlayVideo(void)
  8. {
  9. return (old_play_state!=play_state)&&(!Is_MP3_STATE()
  10. &&((CDVCD10==cd_type_loaded)
  11. ||(CDVCD20==cd_type_loaded)
  12. ||(CDSVCD==cd_type_loaded)
  13. ||(CDDVD==cd_type_loaded)
  14. ||(CDJPEG==cd_type_loaded)
  15. ||is_mp4()
  16. ||Is_JPEG_STATE()
  17. ));
  18. }
  19. #endif//(defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))
  20. /*
  21. * Wangfeng,2004-2-17 11:24
  22. */
  23. static inline void show_normal_after_setup(void)
  24. {
  25.     if(old_play_state==VCD_STATE_NORMAL)
  26.         RegionOnOff[REGION1][2]=STR_OS_PLAY;
  27.     rem_osd_id = RegionOnOff[REGION1][2];
  28. }
  29. /*
  30. * Terry,2004/1/30 04:28PM
  31. */
  32. #ifdef SUPPORT_USB
  33. BYTE usb_card_setup_flag;//lijd 2004-9-29 11:23
  34. #endif
  35. void run_pause_setting(void)
  36. {
  37.     #ifdef SUPPORT_USB
  38.          usb_card_setup_flag=1;
  39.     #endif
  40.     if(still_timer)
  41.     {
  42.         old_play_state=VCD_STATE_PAUSE;
  43.     }else if( (play_state==VCD_STATE_PAUSE)||(!cd_type_loaded)||(play_state==VCD_STATE_STOP) )
  44.     {
  45.         old_play_state=play_state;
  46.     }else
  47.     {
  48.     #ifdef MP3_STOP_IN_GUI_START//zhaoyanhua add 03-10-14 11:39 keep inital state for MP3
  49.         if ((Is_MP3_STATE()) && (play_state == VCD_STATE_MP3_FILELIST))
  50.             old_play_state = VCD_STATE_MP3_FILELIST;
  51.         else
  52.     #elif defined(MP4_GUI_FF_INVALID)
  53.         if ((Is_OTHER_STATE()) && (play_state == VCD_STATE_MP3_FILELIST))  //wsf  2004-9-15 20:18
  54.             old_play_state = VCD_STATE_MP3_FILELIST;
  55.         else
  56.     #endif
  57.         old_play_state=VCD_STATE_NORMAL;
  58.         if((cd_type_loaded!=CDROM)||Is_MP3_STATE())
  59.             run_pause(0);
  60. #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021014
  61.       #ifdef MP4_GUI_FF_INVALID
  62.         if(play_state == VCD_STATE_NORMAL)   //wsf 2004-9-15 20:22
  63.       #endif
  64.            {
  65.         if (Is_OTHER_STATE())
  66.             run_pause(0);
  67.             }
  68. #endif
  69.     }
  70.     if( (RegionOnOff[REGION1][2]==STR_OS_PAUSE)||(RegionOnOff[REGION1][2]==STR_OS_STEP) )//nono 2-7-17 17:22
  71.         rem_osd_id = RegionOnOff[REGION1][2];//show "PAUSE" & "STEP"...after "setup" 2-7-15 21:44
  72. }
  73. #ifdef  AUTO_ADJUST_TV_TYPE
  74. extern BYTE  Adjust_TV_type ;
  75. #endif
  76. #ifdef SETUP_PROGRAM_IN_PLACE_UNDER_16M
  77. void OSDSetPause()      // 2005/01/14 yltseng
  78. {
  79.     #if !defined(SETUP_PLAY_CTRL)&&!defined(SETUP_DONT_PAUSE)       //wangfeng,2003-08-30 10:28        
  80.         #if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)  //xyy 2003-10-13 9:42
  81.     if(play_state != VCD_STATE_POWER)
  82.         #endif
  83.         #ifdef  JPEG_PAUSE_WHEN_SETUP       // fengjl add 3-11-30 15:47
  84.     if((Is_JPEG_SlideMode())&&(play_state == VCD_STATE_NORMAL))
  85.     {  
  86.         run_pause(0); 
  87.        // if(Is_JPEG_SlideMode())
  88.             old_play_state = VCD_STATE_NORMAL; 
  89.     }
  90.     else
  91.         #endif //end JPEG_PAUSE_WHEN_SETUP 
  92.     run_pause_setting();
  93.     #endif        
  94. }
  95. #ifdef NEW_STYLE_SETUP
  96. static inline UINT32 SetupSettingForNewStyleSetup()
  97. {   // 2004/11/26 yltseng
  98. //NOTE:
  99. //In NEW_STYLE_SETUP && SDRAM_16Mb_Mode
  100. //      prog_state = 0 : original state
  101. //                   4 : to excute STOP
  102. //                   2 : excute setup
  103. //                   5 : At level 1,use "SELECT" to enter level 2 /3 
  104. //                   6 : when SETUP interrupt PROGRAM or PROGRAM interrupt SETUP use this flag
  105. //                       not excute ircmd_resume().
  106. // zhaoyanhua note 2003-8-7 9:50               
  107.     #ifdef SDRAM_16Mb_Mode  //zhaoyanhua add 2003-8-7 9:48                
  108.     if (play_state!=VCD_STATE_STOP)
  109.     {
  110.         if (prog_state==0)
  111.         {
  112.             old_t_disp=t_disp;
  113.             old_play_state=play_state;
  114.             if( (play_state==VCD_STATE_STOP)||
  115.                 (system_state==SYSTEM_NODISC)
  116.                 ||Is_JPEG_STATE()
  117.         #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 2003-8-7 13:55
  118.                 ||Is_OTHER_STATE()
  119.         #endif
  120.                 ||(system_state==SYSTEM_OPEN) )
  121.             {
  122.                 prog_state = 5;
  123.                 ShowTitle();
  124.             }else if( (pe_run==1)||(still_timer) )//terry 20030805
  125.             {//terry,2003/8/4 10:27PM                   
  126.             prog_state=4;
  127.                 printf("setup menu,run stop cmdn");
  128.             old_t_disp=t_disp;
  129.             ircmd_stop();
  130.             return FALSE;
  131.             }else
  132.             {//terry,2003/8/4 10:27PM
  133.                 invalid_key();
  134.                 return FALSE;
  135.             }
  136.         }
  137.     
  138.     }
  139.     else
  140.     {
  141.         if (prog_state == 0)
  142.         {   
  143.             prog_state = 5; //already STOP ,only show setup_logo.zhaoyanhua 2003-8-7 13:51
  144.             ShowTitle();
  145.             old_t_disp=t_disp;
  146.             old_play_state = VCD_STATE_STOP;
  147.         }
  148.         t_disp=0;
  149.         DispFadeOut();
  150.         //I masked it , but don't know if it will cause error.
  151.         //zhaoyanhua note 2003-8-26 20:05
  152.         regs0->osd_base_addr=OSD_BASE_USE_ADDR;//P_BIDIR_LUMA;
  153.     }
  154.     #else //Not SDRAM_16Mb_Mode     
  155.     if (setup_state==0)
  156.     {  
  157.             old_t_disp=t_disp;
  158.             old_play_state=play_state;
  159.     
  160.             if( (play_state==VCD_STATE_STOP)||
  161.                 (system_state==SYSTEM_NODISC)
  162.                 ||Is_JPEG_STATE()
  163.         #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 2003-8-7 13:55
  164.                 ||Is_OTHER_STATE()
  165.         #endif
  166.                 ||(system_state==SYSTEM_OPEN) )
  167.             {
  168.                 setup_state=3;
  169.                 ShowTitle();
  170.     }
  171.     else if( (pe_run==1)||(still_timer) )//terry 20030805
  172.             {//terry,2003/8/4 10:27PM                   
  173.                 setup_state=1;
  174.                 printf("setup menu,run stop cmdn");
  175.                 old_t_disp=t_disp;
  176.                 ircmd_stop();
  177.                 return FALSE;
  178.             }else
  179.             {//terry,2003/8/4 10:27PM
  180.                 invalid_key();
  181.                 return FALSE;
  182.             }
  183.       }
  184.     #endif //SDRAM_16Mb_Mode
  185.     
  186.     return TRUE;
  187. }
  188. #else
  189. UINT8   g_uiOSDStatus = OSD_FULL_SCREEN_STATUS_NONE;
  190. static inline UINT32 SetupSettingForNormal()
  191. {   // 2005/01/14 yltseng
  192.     #ifdef SDRAM_16Mb_Mode
  193.     if( g_uiOSDStatus == OSD_FULL_SCREEN_STATUS_NONE )
  194.     {
  195.         if( AVD_state != STATE_IDLE )
  196.         {
  197.             g_uiOSDStatus = OSD_FULL_SCREEN_STATUS_SETUP | OSD_FULL_SCREEN_STATUS_WAIT_ATAPI_CMD_FINISH;
  198.             return FALSE;
  199.         }
  200.         else if( pFsJpeg->gifsState == FS_STATE_JPEG )
  201.         {
  202.             OSDSetPause();
  203.         }
  204.     }
  205.     
  206.     g_uiOSDStatus   = OSD_FULL_SCREEN_STATUS_SETUP | OSD_FULL_SCREEN_STATUS_ACTIVE;
  207.     full_scrn       = SETUP;
  208.     osd_disable();
  209.         
  210.     extern void SrvStopReceiveData(void);
  211.     SrvStopReceiveData();
  212.     regs0->osd_base_addr = A_SERVO_YA;
  213.     
  214.     #else
  215.     OSDSetPause();
  216.     #endif//SDRAM_16Mb_Mode 
  217.     return TRUE;   
  218. }
  219. #endif
  220. void ircmd_setup(void)
  221. {
  222.      #ifdef  AUTO_ADJUST_TV_TYPE    
  223.         Adjust_TV_type=0;      
  224.      #endif
  225.      
  226. #ifdef CONTINUOUS_NUM_KEY_SELECT
  227.     if(ir_num_timer)
  228.       return;
  229. #endif
  230.     
  231.     #ifdef SUPPORT_MIDI_MENU_SEL
  232. #if 1//ndef QISHENG_DEBUG_04_10_09 //axelchen modified for cancel ircmd_setup in playback MIDI 2004/10/22 
  233.         if(gIsMidiSelMenu)  return;
  234. #else
  235.          if (gIsMidiSelMenu)
  236.         {
  237. //            if (((bMidiPlayerBoolean)&&(midiState == MIDI_STATE_PAYLOAD)))
  238. //                Midi_pause_flag =1;
  239.             run_pause(0);
  240.         }    
  241. #endif
  242.     #endif
  243. #ifdef IRCMD_DBG
  244.     printf("=================ircmd_setup==================n");
  245. #endif
  246. #ifdef NEW_STYLE_SETUP
  247.     if ( Is_JPEG_SlideMode()
  248.     #ifdef SUPPORT_FILE_SYSTEM_MODE
  249.     ||(IsOtherStatePlayMode()) 
  250.     #endif
  251.     ) 
  252.     {
  253.         invalid_key();
  254.         return;
  255.     }
  256. #endif    
  257. #if !defined(SPHE1000)
  258.     if ( (cd_type_loaded==CDROM) && (Mp3ReadFinish==0) ) { //Jeff 20020614
  259. #else
  260. if((cd_type_loaded==CDROM)&&(Mp3ReadFinish==0) && (system_state!=SYSTEM_FILESTREAM)&&(system_state!=SYSTEM_TS)) { //MIKEY 2004.06.25 for setup
  261. #endif
  262.         invalid_key();
  263.         return;
  264.     }
  265.     #ifdef KARAOKE_MENU
  266.     //modefied by wangfeng 2003-10-31 11:30
  267.     if((full_scrn&SETUP)&&(KARAOKE_MENU_FLAG==0) || (full_scrn&CUSTM)) //////////////////////////jhuang
  268.     #else
  269.     if((full_scrn&SETUP) || (full_scrn&CUSTM)) //////////////////////////jhuang
  270.     #endif 
  271. {//aa begin
  272. #if (defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))//Modifed by ChenZhao on 2004-9-22 11:33  
  273. if(IsVideoSetupExit_NextVideoSetup())
  274. #endif
  275.     {
  276.         ExitSetupPage(1);
  277.          #ifdef SUPPORT_USB//lijd 20041008
  278.          usb_card_setup_flag=0;
  279.          #endif
  280. #if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)  //xyy 2003-10-13 9:42
  281.         if(play_state == VCD_STATE_POWER)
  282.             disfreq();
  283. #endif
  284.         
  285. #if defined(SDRAM_16Mb_Mode)||defined(NEW_STYLE_SETUP)
  286.         if ( 0)//( cd_type_loaded == CDDA ) && (old_t_disp) )
  287.         {
  288.             t_disp=old_t_disp;
  289.             DispPolling(3);
  290.         }
  291. #endif
  292.         
  293. #ifdef DOUBLE_LOGO
  294.         if(play_state==VCD_STATE_STOP||system_state==SYSTEM_NODISC||system_state==SYSTEM_OPEN)
  295.             ShowTitle();
  296. #endif
  297.     }
  298. }//aa end
  299.     #ifdef KARAOKE_MENU
  300.     //wangfeng 2003-10-31 11:30 
  301.     else if((full_scrn&SETUP)&&(KARAOKE_MENU_FLAG==1))
  302.         return;
  303.     #endif
  304.     else
  305.     {//enter setup menu
  306. #ifdef AUDIO_SHOW_SAVER //kono  1007 2001
  307.         if( bDisableGUI) return;
  308. #endif
  309.     #ifdef SUPPORT_FUNCTION_MENU
  310.     if(full_scrn&SETUP_PLUS)
  311.       ExitSetupPage(0);
  312.     #endif
  313.  
  314. // 2004/11/26 yltseng
  315. #ifdef NEW_STYLE_SETUP
  316.         if( !SetupSettingForNewStyleSetup() )
  317.             return;
  318. #else//Not NEW_STYLE_SETUP
  319.         if( !SetupSettingForNormal() )
  320.             return;
  321. #endif //end NEW_STYLE_SETUP
  322. #if (defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))//Modifed by ChenZhao on 2004-9-22 11:33  
  323. if(IsPlayVideo())
  324. InitVideoSetupGUI();
  325. else
  326. init_setup();
  327. #else//(defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))
  328.         init_setup();
  329. #endif//(defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))
  330.         //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:13
  331.         SetFullscrnCmdFuncPtr( setup_func_up, setup_func_down,  setup_func_left,
  332.                                setup_func_right, setup_func_select);
  333. #ifdef NEW_UART_COMMAND
  334.         timeout_vfd=0;
  335.         nCurrentVolMode=VOL_MODE_MAIN;
  336. #endif
  337.     }
  338.     show_normal_after_setup();//wangfeng 2004-2-17 11:27
  339. }
  340. #else   // SETUP_PROGRAM_IN_PLACE_UNDER_16M
  341. #ifdef DEACTIVATE_PSCAN
  342. extern BYTE video_out_type;
  343. extern BYTE Pscan_on;
  344. #endif
  345. void ircmd_setup(void)
  346. {
  347. #ifdef DEACTIVATE_PSCAN
  348.   if(video_out_type==4)
  349.    {
  350.    Pscan_on=1;
  351.    }
  352.  #endif
  353.   #ifdef  JPEG_PLAY_NOT_SETUP
  354.     if( (pFsJpeg->gbfsSlide != 0)||Is_JPEG_PLAY_STATE())
  355. {
  356.  invalid_key();
  357.  return;
  358.      }    
  359.   #endif
  360.      #ifdef  AUTO_ADJUST_TV_TYPE    
  361.         Adjust_TV_type=0;      
  362.      #endif
  363.      
  364. #ifdef CONTINUOUS_NUM_KEY_SELECT
  365.     if(ir_num_timer)
  366.       return;
  367. #endif
  368.     
  369.     #ifdef SUPPORT_MIDI_MENU_SEL
  370. #if 1//ndef QISHENG_DEBUG_04_10_09 //axelchen modified for cancel ircmd_setup in playback MIDI 2004/10/22 
  371.         if(gIsMidiSelMenu)  return;
  372. #else
  373.          if (gIsMidiSelMenu)
  374.         {
  375. //            if (((bMidiPlayerBoolean)&&(midiState == MIDI_STATE_PAYLOAD)))
  376. //                Midi_pause_flag =1;
  377.             run_pause(0);
  378.         }    
  379. #endif
  380.     #endif
  381. #ifdef IRCMD_DBG
  382.     printf("=================ircmd_setup==================n");
  383. #endif
  384. #ifdef NEW_STYLE_SETUP
  385.     if ( Is_JPEG_SlideMode()
  386.     #ifdef SUPPORT_FILE_SYSTEM_MODE
  387.     ||(IsOtherStatePlayMode()) 
  388.     #endif
  389.     ) 
  390.     {
  391.         invalid_key();
  392.         return;
  393.     }
  394. #endif    
  395. #if !defined(SPHE1000)
  396.     if ( (cd_type_loaded==CDROM) && (Mp3ReadFinish==0) ) { //Jeff 20020614
  397. #else
  398. if((cd_type_loaded==CDROM)&&(Mp3ReadFinish==0) && (system_state!=SYSTEM_FILESTREAM)&&(system_state!=SYSTEM_TS)) { //MIKEY 2004.06.25 for setup
  399. #endif
  400.         invalid_key();
  401.         return;
  402.     }
  403.     #ifdef DVB_MENU_SETUP_STYLE //Maoyong 2004-12-21 21:14
  404.     pfnDvbGoto = ircmd_null;
  405.     #endif
  406.     #ifdef KARAOKE_MENU
  407.     //modefied by wangfeng 2003-10-31 11:30
  408.     if((full_scrn&SETUP)&&(KARAOKE_MENU_FLAG==0) || (full_scrn&CUSTM)) //////////////////////////jhuang
  409.     #else
  410.     if((full_scrn&SETUP) || (full_scrn&CUSTM) 
  411.     #ifdef DVB_MENU_SETUP_STYLE    //Maoyong 2004-12-21 9:36
  412.     || (full_scrn & DVB_MENU)
  413.     #endif
  414.     ) //////////////////////////jhuang
  415.     #endif 
  416. {//aa begin
  417. #if (defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))//Modifed by ChenZhao on 2004-9-22 11:33  
  418. if(IsVideoSetupExit_NextVideoSetup())
  419. #endif
  420.     {
  421.         ExitSetupPage(1);
  422.         #ifdef DVB_MENU_SETUP_STYLE    //Maoyong for Setup key make DVB MENU disappear and normal return from sub menu
  423.         set_dvb_vpp(SCREEN_TYPE_FULL);
  424.         #endif
  425.          #ifdef SUPPORT_USB//lijd 20041008
  426.          usb_card_setup_flag=0;
  427.          #endif
  428. #if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)  //xyy 2003-10-13 9:42
  429.         if(play_state == VCD_STATE_POWER)
  430.             disfreq();
  431. #endif
  432.         
  433. #if defined(SDRAM_16Mb_Mode)||defined(NEW_STYLE_SETUP)
  434.         if ( 0)//( cd_type_loaded == CDDA ) && (old_t_disp) )
  435.         {
  436.             t_disp=old_t_disp;
  437.             DispPolling(3);
  438.         }
  439. #endif
  440.         
  441. #ifdef DOUBLE_LOGO
  442.         if(play_state==VCD_STATE_STOP||system_state==SYSTEM_NODISC||system_state==SYSTEM_OPEN)
  443.             ShowTitle();
  444. #endif
  445.     }
  446. }//aa end
  447.     #ifdef KARAOKE_MENU
  448.     //wangfeng 2003-10-31 11:30 
  449.     else if((full_scrn&SETUP)&&(KARAOKE_MENU_FLAG==1))
  450.         return;
  451.     #endif
  452.     else
  453.     {//enter setup menu
  454. #ifdef AUDIO_SHOW_SAVER //kono  1007 2001
  455.         if( bDisableGUI) return;
  456. #endif
  457.     #ifdef SUPPORT_FUNCTION_MENU
  458.     if(full_scrn&SETUP_PLUS)
  459.       ExitSetupPage(0);
  460.     #endif
  461.  
  462. //NOTE:
  463. //In NEW_STYLE_SETUP && SDRAM_16Mb_Mode
  464. //      prog_state = 0 : original state
  465. //                   4 : to excute STOP
  466. //                   2 : excute setup
  467. //                   5 : At level 1,use "SELECT" to enter level 2 /3 
  468. //                   6 : when SETUP interrupt PROGRAM or PROGRAM interrupt SETUP use this flag
  469. //                       not excute ircmd_resume().
  470. // zhaoyanhua note 2003-8-7 9:50               
  471. #ifdef NEW_STYLE_SETUP
  472.     #ifdef SDRAM_16Mb_Mode  //zhaoyanhua add 2003-8-7 9:48                
  473.     
  474.         if (play_state!=VCD_STATE_STOP)
  475.         {
  476.             if (prog_state==0)
  477.             {
  478.                 old_t_disp=t_disp;
  479.                 old_play_state=play_state;
  480.                 if( (play_state==VCD_STATE_STOP)||
  481.                     (system_state==SYSTEM_NODISC)
  482.                     ||Is_JPEG_STATE()
  483.         #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 2003-8-7 13:55
  484.                     ||Is_OTHER_STATE()
  485.         #endif
  486.                     ||(system_state==SYSTEM_OPEN) )
  487.                 {
  488.                     prog_state = 5;
  489.                     ShowTitle();
  490.                 }else if( (pe_run==1)||(still_timer) )//terry 20030805
  491.                 {//terry,2003/8/4 10:27PM                   
  492.                 prog_state=4;
  493.                     printf("setup menu,run stop cmdn");
  494.                 old_t_disp=t_disp;
  495.                 ircmd_stop();
  496.                 return;
  497.                 }else
  498.                 {//terry,2003/8/4 10:27PM
  499.                     invalid_key();
  500.                     return;
  501.                 }
  502.           }
  503.         
  504.             }
  505.    else
  506.    {
  507.         if (prog_state == 0)
  508.         {   
  509.             prog_state = 5; //already STOP ,only show setup_logo.zhaoyanhua 2003-8-7 13:51
  510.             ShowTitle();
  511.             old_t_disp=t_disp;
  512.             old_play_state = VCD_STATE_STOP;
  513.         }
  514.         t_disp=0;
  515.         DispFadeOut();
  516.         //I masked it , but don't know if it will cause error.
  517.         //zhaoyanhua note 2003-8-26 20:05
  518.         regs0->osd_base_addr=OSD_BASE_USE_ADDR;//P_BIDIR_LUMA;
  519.     
  520.     }
  521.    
  522.     
  523.     #else //Not SDRAM_16Mb_Mode     
  524.           if (setup_state==0)
  525.           {  
  526.                 old_t_disp=t_disp;
  527.                 old_play_state=play_state;
  528.         
  529.                 if( (play_state==VCD_STATE_STOP)||
  530.                     (system_state==SYSTEM_NODISC)
  531.                     ||Is_JPEG_STATE()
  532.         #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 2003-8-7 13:55
  533.                     ||Is_OTHER_STATE()
  534.         #endif
  535.                     ||(system_state==SYSTEM_OPEN) )
  536.                 {
  537.                     setup_state=3;
  538.                     ShowTitle();
  539.         }
  540.         else if( (pe_run==1)||(still_timer) )//terry 20030805
  541.                 {//terry,2003/8/4 10:27PM                   
  542.                     setup_state=1;
  543.                     printf("setup menu,run stop cmdn");
  544.                     old_t_disp=t_disp;
  545.                     ircmd_stop();
  546.                     return;
  547.                 }else
  548.                 {//terry,2003/8/4 10:27PM
  549.                     invalid_key();
  550.                     return;
  551.                 }
  552.           }
  553.     #endif //SDRAM_16Mb_Mode
  554. #else//Not NEW_STYLE_SETUP
  555.         
  556.     #ifdef SDRAM_16Mb_Mode
  557.         if( ( cd_type_loaded == CDDVD ) || ( system_state != SYSTEM_STOP ) )   // 2004/09/30 yltseng, play jpeg, toggle setup fastly
  558.         {
  559.             if ( play_state!=VCD_STATE_STOP && play_state!=VCD_STATE_IDLE && play_state!=VCD_STATE_OPEN )
  560.             {
  561.                 if (prog_state==0)
  562.                 {
  563.                     prog_state=4;
  564.                     old_t_disp=t_disp;
  565.     
  566.                     ircmd_stop();
  567.                 }
  568.                 else
  569.                     invalid_key();
  570.                     
  571.                 return;
  572.             }
  573.         }
  574. /*        
  575.         if ( play_state!=VCD_STATE_STOP && play_state!=VCD_STATE_IDLE && play_state!=VCD_STATE_OPEN )
  576.         {
  577.             if (prog_state==0)
  578.             {
  579.                 prog_state=4;
  580.                 old_t_disp=t_disp;
  581.                 ircmd_stop();
  582.                 return;
  583.             }
  584.         }else if( (cd_type_loaded!=CDDVD)&&(system_state==SYSTEM_BROWSE) )        
  585.         {//terry,play jpeg, toggle setup fastly 2004/2/9 03:51PM
  586.            invalid_key();
  587.            return;
  588.         }
  589. */        
  590.         t_disp=0;
  591.         DispFadeOut();
  592.         regs0->osd_base_addr=OSD_BASE_USE_ADDR;//P_BIDIR_LUMA;
  593.     #else    
  594.         #if !defined(SETUP_PLAY_CTRL)&&!defined(SETUP_DONT_PAUSE)       //wangfeng,2003-08-30 10:28        
  595.             #if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)  //xyy 2003-10-13 9:42
  596.         if(play_state != VCD_STATE_POWER)
  597.             #endif
  598.             #ifdef  JPEG_PAUSE_WHEN_SETUP       // fengjl add 3-11-30 15:47
  599.         if((Is_JPEG_SlideMode())&&(play_state == VCD_STATE_NORMAL))
  600.         {  
  601.             run_pause(0); 
  602.            // if(Is_JPEG_SlideMode())
  603.                 old_play_state = VCD_STATE_NORMAL; 
  604.         }
  605.         else
  606.             #endif //end JPEG_PAUSE_WHEN_SETUP 
  607.             #ifndef DVB_OSD_MENU_VER3   // 2004/12/27 yltseng modify layout
  608.             run_pause_setting();
  609.             #else
  610.         {
  611.             if(system_state != SYSTEM_TS)
  612.                 run_pause_setting();
  613.         }
  614.             #endif
  615.         #endif        
  616.     #endif//SDRAM_16Mb_Mode
  617. #endif //end NEW_STYLE_SETUP
  618.         // force loading setup module
  619.         //LoadModual(MODUAL_AP2);
  620. #if (defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))//Modifed by ChenZhao on 2004-9-22 11:33  
  621. if(IsPlayVideo())
  622. InitVideoSetupGUI();
  623. else
  624. init_setup();
  625. #else//(defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))
  626.         init_setup();
  627. #endif//(defined(SOFT_MENU)&&defined(VIDEOSETUPGUI))
  628.         //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:13
  629.         SetFullscrnCmdFuncPtr( setup_func_up, setup_func_down,  setup_func_left,
  630.                                setup_func_right, setup_func_select);
  631. #ifdef NEW_UART_COMMAND
  632.         timeout_vfd=0;
  633.         nCurrentVolMode=VOL_MODE_MAIN;
  634. #endif
  635.     }
  636.     show_normal_after_setup();//wangfeng 2004-2-17 11:27
  637. }
  638. #endif  // SETUP_PROGRAM_IN_PLACE_UNDER_16M
  639. #ifdef SUPPORT_FUNCTION_MENU
  640. void ircmd_setup_plus(void)
  641. {
  642.   if(full_scrn&SETUP_PLUS)
  643.   {
  644.     #ifdef DEBUG_FUNCTION_MENU
  645.     printf("exit setup plusn");
  646.     #endif
  647.     setup_menu_plus_timer = 0;
  648.     
  649.     ExitSetupPage(0);
  650.   }
  651.   else
  652.   {
  653.     #ifdef DEBUG_FUNCTION_MENU
  654.     printf("enter setup plusn");
  655.     #endif
  656.     setup_menu_plus_timer = MENU_PLUS_SHOW_TIME;
  657.     init_setup_plus();
  658.         
  659.          //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 11:38
  660.         SetFullscrnCmdFuncPtr( setup_func_up, setup_func_down,  setup_func_left,
  661.                                setup_func_right, setup_func_select);
  662.   }
  663. }
  664. #endif //end #ifdef SUPPORT_FUNCTION_MENU