global.h
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:16k
源码类别:
DVD
开发平台:
C/C++
- //=============================================================================
- // FILE
- // global.h
- // Creat by potatooo
- // Maintain by terry , 2002
- // History
- // 2003.3.20 terry spilt global.h to
- // a.define struct
- // b.global define
- // c.kernel global var.
- // d.navigation global var.
- // e.io var.
- // f.Aviq system designer
- //
- //==============================================================================
- #ifndef __GLOBAL_H
- #define __GLOBAL_H
- #include "bufloc.h"
- #include "config.h"
- #include "user_init.h"
- #include "types.h"
- #include "regmap.h"
- #include "func.h"
- #include "gb_def.h"
- #include "gb_struct.h"
- #include "gb_knl.h"
- #include "gb_nav.h"
- #include "gb_io.h"
- #include "gb_aviq.h"
- /*
- * System global var.
- */
- //=============================================================== system state
- #ifdef IR_TOOL
- int watch_ir_value;
- int watch_ir_id_value;
- UINT16 IRAddr;
- #endif
- EXTERN BYTE pe_run;
- EXTERN BYTE system_state;
- EXTERN ifunc browser;
- EXTERN BYTE play_state;
- EXTERN BYTE old_play_state;
- EXTERN UINT16 sys_cmd;
- EXTERN BYTE source_end;
- EXTERN BYTE program_end;
- EXTERN BYTE show_logo;
- EXTERN BYTE bInitPlayTrk;
- EXTERN UINT8 no_disk_cnt;
- EXTERN int monflg;
- //================================================================ function pointer
- //
- // srv_kernel : top level server
- // do_cd : cd-format parser
- // do_system : system-level parser
- // do_video : video elementary parser
- // do_audio : audio parser
- // do_sup : ogt/sup parser
- //
- EXTERN ifunc srv_kernel;
- EXTERN ifunc do_cd;
- EXTERN ifunc do_system;
- EXTERN ifunc do_system_init;
- EXTERN ifunc do_video;
- EXTERN ifunc do_video_init;
- EXTERN ifunc do_audio;
- #ifdef AVI_INTERNAL_SUP
- EXTERN ifunc do_avi_sup;
- #endif
- /*
- * Application global var.
- */
- //================================================================ SDRAM 16Mb
- #ifdef SDRAM_16Mb_Mode
- EXTERN BYTE prog_state;
- #endif
- #ifdef NEW_STYLE_SETUP
- EXTERN BYTE setup_state;
- #endif
- //================================================================ IDE
- #ifdef USE_HDD
- EXTERN char hd_play;
- #endif
- EXTERN BYTE read_error_flag;
- EXTERN BYTE dev_status_flag;
- #ifdef BAD_DISC_AUTO_STOP //terry,2003/8/31 12:00AM
- EXTERN BYTE bad_disc_auto_stop;
- #endif
- //#ifdef SUPPORT_SPG_GAME//nono add 20041228 //axel mark 20041230
- EXTERN int spg_game_pad;
- //#endif
- //================================================================ USB Reader
- //================================================================ Graph
- EXTERN UINT16 line_offset;
- #ifdef SPHE1000
- EXTERN BYTE media_type;
- #endif
- //================================================================ Card Reader
- #if defined(SUPPORT_CARD_STORAGE)||defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)
- #ifndef SPHE1000
- EXTERN BYTE media_type;
- #endif
- EXTERN BYTE card_plug_state;
- EXTERN BYTE storage_type; //1:exist 0:Not exist
- //Bit0:USB Bit1:CF Bit2:SD_MMC Bit3:MS Bit4:SMC
- EXTERN BYTE detect_type; //liweihua 2004-6-7 16:52
- //use to set flag for all pluged media types
- #endif
- //================================================================ resume
- //#ifdef POWER_RESUME //maoyong marked 2004.02.20 22:12
- EXTERN UINT16 resume_fsnav_trk; // for receiving resume data
- EXTERN UINT16 resume_fsnav_dir;
- EXTERN UINT16 same_disc_flag;
- EXTERN UINT32 same_disc_vob11_pos; //store "VTS_01_1.VOB" positon
- //#endif
- #if defined(IR_PLAY_RESUME) && defined(POWER_RESUME)
- EXTERN BYTE power_resumeflag;
- #endif
- EXTERN BYTE resumeTRK;
- EXTERN UINT32 resumeMSF;
- //================================================================ UI
- EXTERN INT8 counter_down;
- EXTERN BYTE shuffle_track;
- EXTERN BYTE shuffle_flag;
- EXTERN INT8 video_slow;
- EXTERN INT16 adv_search_time, play_dir;
- EXTERN BYTE rep_run_this_menu;
- EXTERN int nOldFst; //Maoyong 2004.05.25 move from lbaif.c
- #if ALL==BIT16MODE
- EXTERN UINT16 full_scrn;
- #else
- EXTERN BYTE full_scrn;
- #endif
- EXTERN BYTE bIntro;
- #ifdef NEXT_FORWARD_IN_A_KEY
- EXTERN BYTE bIrSkipState;
- EXTERN BYTE bIrSkipCnt;
- #endif
- #ifdef ANGLE_GOTO_IN_A_KEY // add by Tom eastech
- EXTERN BYTE bIrSkipState1;
- EXTERN BYTE bIrSkipCnt1;
- #endif
- //================================================================ Repeat
- EXTERN BYTE rep_mode;
- EXTERN BYTE rep_ab_mode;
- EXTERN BYTE rep_track;
- EXTERN UINT32 repStart;
- EXTERN UINT32 repEnd;
- //================================================================ Display
- EXTERN BYTE remain;
- EXTERN INT16 t_disp;
- EXTERN INT16 old_t_disp;
- EXTERN INT16 disp_mode;
- EXTERN INT16 index_x;
- EXTERN BYTE index_y;
- EXTERN BYTE show_time_hh;
- EXTERN BYTE show_time_mm;
- EXTERN BYTE show_time_ss;
- EXTERN UINT32 disc_time;
- EXTERN UINT32 disc_st_time;
- EXTERN int disp_time;
- EXTERN int old_disp_time;
- EXTERN int fore_disp_time;
- EXTERN UINT32 dNx_pg_tm;
- EXTERN UINT32 dPg_tm;
- EXTERN INT16 dvd_chapter;
- EXTERN INT16 dvd_title;
- #ifdef JUST_SHOW_CD_TYPE //Maoyong 2004.02.25
- EXTERN int track_play_diff_time;
- #endif
- //================================================================ time search
- EXTERN BYTE goto_active;
- EXTERN UINT32 goto_time;
- EXTERN BYTE goto_hour;
- EXTERN BYTE goto_min;
- EXTERN BYTE goto_sec;
- //================================================================ book
- #ifdef SUPPORT_BOOK
- EXTERN BYTE book[BOOK_MAX_ITEM][BOOK_MAX_RECORD];//vcd: track //dvd: title,chapter
- EXTERN UINT32 book_tm[BOOK_MAX_ITEM];
- #endif
- //================================================================ setup
- t_USER_SET UserSet;
- //================================================================ program
- EXTERN BYTE digit_cnt;
- EXTERN BYTE prog_cnt;
- EXTERN BYTE mark_cnt;
- EXTERN BYTE prog_index;
- EXTERN UINT16 prog[SHOW_PROG_NO+1][2];
- #ifdef NEWSTYLE_WINDOW
- //================================================================ new stytle window func
- EXTERN BYTE info_index;
- EXTERN BYTE HL_index;
- //EXTERN BYTE bBrowse_state;
- #ifdef MODIFY_OSD_SHOW_NEW_STYLE_WINDOW//zhaoyanhua add 2003-12-18 16:51
- EXTERN BYTE show_window_info;
- #endif
- //maoyong add OR condition for NINTAUS HDCD/CD division VFD display 2004.02.23
- #if defined (DISP_TIME_NOT_CHANGE_WINDOW_PROGESS) || defined(JUST_SHOW_CD_TYPE)//zhaoyanhua add 2004-2-5 13:58
- EXTERN int track_play_time;//time track has played.
- #endif//DISP_TIME_NOT_CHANGE_WINDOW_PROGESS
- //================================================================ Zoom in/out
- #endif
- //================================================================ Zoom in/out
- EXTERN UINT8 vpp_zoom;
- EXTERN UINT8 vpp_zoom_max;
- EXTERN UINT8 vpp_zoom_offset_mode;
- EXTERN INT16 vpp_zoom_x;
- EXTERN INT16 vpp_zoom_y;
- //================================================================ 3d sound
- #ifdef SUPPORT_3DSOUND
- EXTERN BYTE bEqEnergyMax[13]; //jackie
- EXTERN UINT32 unEqMaxRef; //jackie
- #endif
- EXTERN BYTE bEqDisplay; //jackie
- //================================================================ IR
- EXTERN UINT8 old_key;
- EXTERN UINT8 action_click;
- EXTERN int ir_select_number;
- EXTERN int mp3_user_select;
- EXTERN INT8 now_num_ns;
- EXTERN UINT8 keep_cmd_code;
- EXTERN INT16 ir_10p;
- EXTERN UINT32 (*ircmd_callback_check)(UINT32);
- //================================================================ Audio
- EXTERN UINT8 audio_chan_num;
- EXTERN BYTE user_mute;
- EXTERN BYTE audio_only;
- EXTERN BYTE audio_volume;
- #ifdef CNTR_5SPK_VOLUME
- //EXTERN BYTE volume_5SPK[6];
- //EXTERN BYTE idVolume_5SPK[6];
- EXTERN BYTE volume_5SPK[7];
- EXTERN BYTE idVolume_5SPK[7];
- EXTERN BYTE volume_Switch;
- #endif
- EXTERN BYTE audio_effect;
- EXTERN BYTE audio_channel;
- EXTERN INT8 audio_key;
- EXTERN INT8 echo_level;
- EXTERN INT8 echo_decay;
- EXTERN INT8 mic_volume;
- EXTERN INT8 ac3_dynarange;
- EXTERN INT8 mic_on;
- EXTERN UINT32 coding_mode_now;
- EXTERN UINT16 smp_rate_now;
- EXTERN UINT16 smp_rate_down;
- EXTERN UINT16 frequency_mask;
- EXTERN UINT8 frequency_multiple;
- EXTERN BYTE isSPDIFBitstream;
- EXTERN UINT16 buf_barrier_size;
- EXTERN UINT16 mpeg_audio;
- EXTERN UINT16 Mp3_kbitrate;
- #if defined( REMAIN_TIME ) || defined( SUPPORT_PRECALCULATE_VIDEOBITRATE_FOR_FILE_MODE ) // 2004/08/11 yltseng
- EXTERN UINT16 Mp3_kbitrate_PreCalc;
- #endif
- EXTERN int dspWatchDog;
- EXTERN BYTE *bpcm_ya_ptr;
- EXTERN BYTE auto_download_audio_chn;
- //================================================================ CD
- EXTERN BYTE bDiscType;
- EXTERN BYTE cd_state;
- EXTERN BYTE cd_subtype;
- EXTERN BYTE cd_type;
- EXTERN BYTE cd_type_loaded;
- EXTERN BYTE mp3_cd_end_trk;
- EXTERN BYTE cd_trk_now;
- EXTERN int disp_trk_now;
- EXTERN BYTE cd_trk_lo;
- EXTERN BYTE cd_trk_lo_now;
- EXTERN BYTE cd_trk_hi;
- //EXTERN BYTE bad_disc_seq_play;//terry,2003/8/29 02:32AM//4-6-14 12:22
- #ifdef MICO_DVD
- EXTERN BYTE power_off_state; //chen0627
- EXTERN BYTE bCharTemp01[12]; //chen0627
- #endif
- //=============================================================== cd layer parser
- EXTERN INT16 cd_len; /* cd-payload length */
- //================================================================ Video output
- EXTERN UINT8 p_scan;
- EXTERN UINT8 tv_out_id;
- EXTERN UINT8 tv_format;
- EXTERN UINT8 output_aspect; // defined in aspect.h
- EXTERN UINT8 mode_aspect;
- #ifdef IR_KEY_SET_VIDEO_MODE
- EXTERN BYTE video_mode_val;
- #endif
- //================================================================ Timer
- EXTERN UINT16 timeout_playback;
- EXTERN UINT16 rtc_10ms;
- EXTERN UINT16 rtc_100ms;
- EXTERN UINT16 rtc_500ms;
- #ifdef DVB1000_NON_OS
- EXTERN UINT16 rtc_1s; //eric add 2004-12-27 10:43
- #endif
- #ifdef OSDISP
- EXTERN UINT16 rtc_1s; //wjzhang 2004/09/25 for osd display&vfd display
- #endif
- #ifdef TURN_OFF_POWER_RESUME //wangap 2004/4/21
- EXTERN UINT16 rtc_60s;
- #endif
- EXTERN UINT16 stc_polling;
- EXTERN UINT16 timestamp_key;
- EXTERN UINT16 timestamp_cderr;
- //================================================================ CD FIFO control
- EXTERN UINT32 p_msf;
- EXTERN UINT32 s_msf;
- EXTERN UINT32 e_msf;
- EXTERN INT32 s_len;
- EXTERN UINT32 st_msf;
- EXTERN UINT16 dvddsp_vx;
- //================================================================ rom ptr
- EXTERN BYTE *romimage_ptr;
- //================================================================ OSD
- #include "osd_drv.h"
- EXTERN BYTE osd_font_mode;
- EXTERN BYTE PatternMode;
- EXTERN BYTE ir_osd_post_show;
- EXTERN BYTE sw_region_len;
- EXTERN BYTE RegionValStr[MAX_REGION][14];
- EXTERN BYTE RegionStr[MAX_REGION][MAX_SW_REGION][MAX_SW_R_LEN+1];
- EXTERN BYTE RegionOnOff[MAX_REGION][4];
- //================================================================ global line buffer var
- EXTERN_MEM BYTE linebuf[100];
- #ifdef OSD_BMP_DISPLAY
- EXTERN_MEM BYTE linebuf_oriCh[100];
- EXTERN UINT8 disp_region;
- EXTERN UINT8 temp_region;
- UINT32 *temp_region_top_buf;
- UINT32 *temp_region_bottom_buf;
- #endif
- #ifdef DOUBLE_TITLE//susu 2003-8-26 13:54
- EXTERN_MEM BYTE linebuf_0[100];
- EXTERN_MEM BYTE linebuf_1[100];
- #endif
- #ifdef SUPPORT_ANGLE_MARK //liweihua add 20031118
- EXTERN BYTE angleflag;
- #endif
- //================================================================ JPEG
- EXTERN UINT32 jpg_slide_time;
- #ifdef NO_BLACK_for_PIC_CD
- UINT8 pic_cd_first_play;
- #endif
- //================================================================ karaoke
- #ifdef KARAOKE_MENU
- EXTERN BYTE KARAOKE_MENU_FLAG;
- #endif
- #if defined(GBM_PORTABLE_DVD)||defined(SUNPLUS_8202P_DEMOBOARD) //rbhung for GBM Portable DVD
- #ifdef HOLD_KEY_DETECT
- EXTERN BYTE hold_state;
- #endif
- EXTERN UINT32 lowbat_timer;
- EXTERN UINT32 powerdown_timer;
- #endif
- #ifdef EASTWIN
- EXTERN UINT32 lowbat_timer;
- EXTERN UINT32 powerdown_timer;
- EXTERN UINT32 blink_timer;
- EXTERN BYTE POWER_FLAG;
- EXTERN UINT32 power_led_flash_timer;
- EXTERN UINT32 power_on_mute_timer;
- #endif
- #ifdef VGA_CTRL_FORMAT//wangfeng 2003-12-18 16:12
- EXTERN BYTE temp_format;
- #endif
- #ifdef TONIC_DVD
- EXTERN BYTE KeyLockStatus;
- #endif
- //=================================================================standby timer
- #ifdef SHOW_STANDBY_TIMER//suqiaoli add
- EXTERN UINT32 standby_time;
- EXTERN UINT32 counter_10ms;
- EXTERN BYTE standby_hour;
- EXTERN BYTE standby_min;
- EXTERN BYTE standby_sec;
- EXTERN BYTE show_standby_hour;
- EXTERN BYTE show_standby_min;
- EXTERN BYTE show_standby_sec;
- EXTERN BYTE flag_standby_timer;
- #endif
- #ifdef AD_TCL
- EXTERN BYTE jpg_ps;
- EXTERN BYTE spk_dm_on;
- EXTERN BYTE spk_sb_on;
- EXTERN BYTE menu_id;
- #endif
- //==================Han Yang PDVD setup menu plus use
- #ifdef SUPPORT_FUNCTION_MENU
- EXTERN BYTE setup_menu_plus_timer;
- #endif //end #ifdef SUPPORT_FUNCTION_MENU
- #ifdef SUPPORT_DISPLAY_MENU
- EXTERN BYTE in_display_function;
- EXTERN BYTE goto_edit_state;
- #endif
- #ifdef ARGUS_PORTABLE_DVD
- #ifdef SUPPORT_SPI
- EXTERN BYTE pdvd_mode; //Portable DVD MODE,define in spi.h
- EXTERN BYTE scommand; //the special commands send to MCU
- EXTERN BYTE check_sum;
- EXTERN BYTE pdvd_timer;
- #endif
- #endif
- #ifdef ADD_DVI311_SETUP
- EXTERN BYTE dvi311_mode;
- EXTERN BYTE dvi311_format;
- EXTERN BYTE dvi311_tv_mode;
- EXTERN BYTE Power_off_311;
- #endif
- #ifdef BRIGHTNESS_COLOR_KEY
- EXTERN BYTE BriCol_timer;
- EXTERN BYTE BriCol_state;
- EXTERN BYTE brightness_value;
- EXTERN BYTE color_value;
- #endif
- //==============================================
- //for QSI source switch //added by JS //20040726
- #ifdef SUPPORT_QSI_SOURCE_SWITCH
- EXTERN UINT8 source_type_now;
- EXTERN UINT8 source_type_old;
- EXTERN UINT8 source_switch_flag;
- #endif
- //==============================================
- // for periher device
- #define DVD_LOADER_EXIST (1<<0)
- EXTERN BYTE bDev;
- //===============================================
- #ifdef QSI_SHOW_ERR_RATE
- EXTERN UINT8 QSI_PIPO_TEST;
- EXTERN UINT8 QSI_PIPO_FLAG;
- EXTERN UINT32 QSI_PIPO_MSF;
- #endif
- #ifdef SUPPORT_INSIDE_GAME
- EXTERN UINT8 play_inside_game;
- #endif
- //===============================================
- #ifdef SUPPORT_CD_TEXT //lizhx add 2004/09/06
- EXTERN int flicker_flag;
- #endif
- #ifdef SUPPORT_USB//lijd 20041008
- EXTERN BYTE usb_card_setup_flag;
- EXTERN BYTE usb_card_pause_flag;
- EXTERN BYTE usb_plug_out_flag;
- #endif
- //================================================
- // for support SWD related
- #ifdef SUPPORT_PLAY_SWD
- EXTERN BYTE START_POLLING_SWD;
- #endif
- #ifdef SUPPORT_PS2
- EXTERN int mouse_pos_x;
- EXTERN int mouse_pos_y;
- EXTERN BYTE mouse_btn_status;
- EXTERN BYTE START_POLLING_PS2;
- EXTERN BYTE PS2_INIT_DONE;
- #endif
- #ifdef SUPPORT_16BIT_OSD
- EXTERN BYTE OSD_buffer_16bit;
- #endif
- //================================================
- // media flags, especially used for file playback
- EXTERN UINT32 file_media_flag;
- EXTERN UINT32 file_media_support;
- #ifdef CONTINUOUS_NUM_KEY_SELECT
- EXTERN BYTE ir_num1;
- EXTERN BYTE ir_num2;
- EXTERN BYTE ir_num3;
- EXTERN BYTE ir_num4;
- EXTERN BYTE ir_num_timer;
- EXTERN BYTE ir_num_state;
- #endif
- #ifdef SOLVE_VBR_SVCD_FOR_STARLITE
- EXTERN BYTE SVCD_Bad_Disc;
- #endif
- #ifdef SHOW_SPECIAL_DISC_TYPE
- EXTERN BYTE read_disc_state;
- #endif
- #ifdef HDMI//Modifed by chenzhao on 2004-11-26 9:43
- EXTERN UINT16 NewRTC;
- #endif
- #ifdef HDCP_CUSTOM//Modifed by chenzhao on 2004-12-1 11:36
- EXTERN BYTE hdcp_mode;
- #endif
- EXTERN BYTE user_mute; //WSLEE for switching audio channel and mute mode 2005-01-14
- #endif/*__GLOBAL_H*/