⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osd.h

📁 车载电子影音系统dvd播放系统原程序代码
💻 H
📖 第 1 页 / 共 3 页
字号:

// [10] define screen saver mode for OSD_ShowBitmap() -- LLY.160
// Let them same as OSD_APPMODE_SCRX
#define OSD_SCR_MODE1           OSD_APPMODE_SCR1
#define OSD_SCR_MODE2           OSD_APPMODE_SCR2
#define OSD_SCR_MODE3           OSD_APPMODE_SCR3

// [11] define the MSG_VERSION's base index for debug, range is 65000 ~ 65534
#define OSD_VERSION_DEBUG_BASE  65000

// [12] define common font table type for _OSD_LoadCommonFontTable() -- LLY.100
#define OSD_COMMON_FONTTABLE    0x0
#define GAME_COMMON_FONTTABLE   0x1

// [13] define stage for fill osd header usage: OSD_FillHeadtoDRAM()  -- LLY.101
#define OSD_FILLHEADER_INITIAL  0
#define OSD_FILLHEADER_RUNTIME  1
#define OSD_FILLHEADER_ENTER_SETUP 2 // Brian1.22

// [14] define status of program mode usage: _bProgramStatus -- LLY.170
#define OSD_PROGRAM_SETMODE     0
#define OSD_PROGRAM_INPUTMODE   1
/////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
//  *****  Some parameter for OSD MSG usage definition Area *****
// [1] parameter for repeat AB
#define REPEAT_A            REPEAT_NONE+ 1
#define REPEAT_AB           REPEAT_NONE+ 2

// [2] f/w 0.42, parameter for MSG_INVALID
// LLY.161-4, remove unnecessary parameter: REACHMARGIN/ UNSUPPORT/ FORBIDDEN
// And, don't combine OSD_ERR_REGION with MSG_INVALID
#define OSD_ERR_NONE          0
#define OSD_ERR_KEY           OSD_ERR_NONE+1
#define OSD_ERR_NUMBER        OSD_ERR_NONE+2
#define OSD_ERR_PARENTAL      OSD_ERR_NONE+3
#define OSD_ERR_DATA          OSD_ERR_NONE+4

//alex1.22a,20040204 combine gototime , search,bookmark
//Combine OSD_Cacnel/Input/Complete_Search , Time
/**********************************************************************/
// [3] f/w 0.42, parameter for GOTOTIME
//#define OSD_CANCEL_TIME     0
//#define OSD_INPUT_TIME      OSD_CANCEL_TIME+1
//#define OSD_COMPLETE_TIME   OSD_CANCEL_TIME+2

// [4] DVD.036, parameter for MSG_SETSEARCH usage
//#define OSD_CANCEL_SEARCH       0
//#define OSD_ENTER_SEARCH        1
//#define OSD_COMPLETE_SEARCH     2
//combine 3 & 4
#define OSD_CANCEL_TIME	    			0
//#define OSD_CANCEL_SEARCH 				OSD_CANCEL_TIME //alex1.22a,20040210 remove double define osd part #13
#define OSD_INPUT_TITLE_CHAPTER   		OSD_CANCEL_TIME+1
#define OSD_INPUT_TIME					OSD_CANCEL_TIME+2 //alex1.22a,20040210 remove double define osd part #14
#define OSD_COMPLETE_TIME               OSD_CANCEL_TIME+3
//#define OSD_COMPLETE_SEARCH   			OSD_CANCEL_TIME+3
//#define OSD_ENTER_SEARCH  				OSD_INPUT_TITLE_CHAPTER          //alex1.22a,20040210 remove double define  osd part #15 
//#define OSD_COMPLETE_SEARCH             OSD_COMPLETE_TIME				 //alex1.22a,20040210 remove double define osd part #16 
/**********************************************************************/

// [7] Parameter for MSG_UPDATE
#define OSD_UPDATE_AUDIO        1

// [8] Parameter for MSG_WAITING
// DVD_099cMicky, dynamic showing loading status
#define OSD_SERVO_STABLE    1

// [9] Parameter for MSG_MENU
#define OSD_MENU_ROOT       1
#define OSD_MENU_TITLE      2

// [10] Parameter for MSG_NEXT & MSG_PREV
#define OSD_NEXT_PREV_TRACK      0
#define OSD_NEXT_PREV_CHAPTER    1
#define OSD_NEXT_PREV_PAGE       2
#define OSD_NEXT_PREV_ALBUM      3

// [11] Parameter for MSG_PROGRAM // wyc.101
#define OSD_VCD_NOT_CLEAR_BACKGROUND    0
#define OSD_DVD_NOT_CLEAR_BACKGROUND    1
#define OSD_VCD_CLEAR_BACKGROUND        2
#define OSD_DVD_CLEAR_BACKGROUND        3

// [12] Parameter for MSG_AUTOUPGRADE  -- LLY.172p
#define AUTOUPGRADE_CHECK       1   // display auto-upgrade "check" page
#define AUTOUPGRADE_ABORT       2   // display auto-upgrade "abort" page
#define AUTOUPGRADE_PREPARE     3   // display auto-upgrade "prepare" page
#define AUTOUPGRADE_CHECKSUM    4   // display auto-upgrade "checksum" page
#define AUTOUPGRADE_WRITING     5   // display auto-upgrade "checksum" page
#define AUTOUPGRADE_FAILED      6   // display auto-upgrade "fail" page //Alex1.24a
// [13] Parameter for all message -- LLY.278
// Initial message while there is no parameter for reference
// Ex. just tell to enter some special mode
#define INITIAL_MSG             0x0
// Clear message, ex PANEL module reference
#define CLEAR_MSG               0xFFFF
/////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
//  ***** OSD header pre-definition relative info. part Area ******
// [1] LLY.100, define max OSD char number within one region by spec.
#define   CHARNUM         22

#define FONT_HEIGHT             16

#ifdef  SPLIT_TOP_BOTTOM_DATA
#define   FONT_TABLE0_START     OSD_DRAM_FONT_TABLE0_START
#define   FONT_TABLE1_START     OSD_DRAM_FONT_TABLE1_START
#define   BMP_DATA0_START       OSD_DRAM_FONT_TABLE0_START
#define   BMP_DATA1_START       OSD_DRAM_FONT_TABLE1_START
#define   BMP_DATA0_START_EX    OSD_DRAM_FONT_TABLE0_START_EX    // Brian.155
#define   BMP_DATA1_START_EX    OSD_DRAM_FONT_TABLE1_START_EX    // Brian.155

// Brian.170, CDDA & MP3 SCR
#define   BMP_SCR0_START       OSD_DRAM_CDDA_SCR0_START
#define   BMP_SCR1_START       OSD_DRAM_CDDA_SCR1_START
#define   BMP_SCR0_START_EX    OSD_DRAM_CDDA_SCR0_START_EX    
#define   BMP_SCR1_START_EX    OSD_DRAM_CDDA_SCR1_START_EX    

#else   // #ifdef  SPLIT_TOP_BOTTOM_DATA
#define   FONT_TABLE_START      OSD_DRAM_FONT_TABLE_START
#define   BMP_DATA_START        OSD_DRAM_FONT_TABLE_START
#define   BMP_DATA_START_EX     OSD_DRAM_FONT_TABLE_START_EX     // Brian.155

// Brian.170, CDDA & MP3 SCR
#define   BMP_SCR_START       OSD_DRAM_CDDA_SCR_START
#define   BMP_SCR_START_EX    OSD_DRAM_CDDA_SCR_START_EX    

#endif  // #ifdef  SPLIT_TOP_BOTTOM_DATA

#define   BMP_TYPE            0
#define   FONT_TYPE           1

#define   RES_2BITS           0
#define   RES_4BITS           1
#define   RES_8BITS           2
#define   RES_RUNLENGTH       3

#define   CHARROW             FONT_HEIGHT
#define   CH_MIXRATIO         15         // 0~15
#define   MIXRATIO            7          // 0~15  -- LLY.170
#define   BMP_MIXRATIO        15

#define   PAL_OLD             0X00000000
/////////////////////////////////////////////////////////////////////////
//  ********  Define "start line" info. Area   *******
// #define "start_line" for every region header
// In NTSC total lines=VDS+240; In PAL, total lines=VDS+288;
// Now, 9 rows ( each row =20 lines ) are programmed
#define   N_VDS               38        // for NTSC TV, start line must larger than this
#define   P_VDS               50        //for PAL TV, start line must larger than this
//cgz
#define   VDS_DIFF            (P_VDS-N_VDS+3)     //the difference of VDS for NTSC/PAL system

/////////////////////////////////////////////////////////////////////
//  ************   OSD header relative info. Area  ************
//Header0
#define   FONT_MODE1          (((DWORD)(FONT_TYPE)) << 31)
#define   CONT                0X00000000        //CONT off
#define   LOAD_PAL            PAL_OLD
#define   PIXEL_RES           (((DWORD)(RES_RUNLENGTH))<<27)
#define   CHAR_NUM            (((DWORD)(CHARNUM))<<20)

// Header1
// LLY.047, re-define "FONT_TABLE_PAGE" in header
#ifdef  SPLIT_TOP_BOTTOM_DATA
#define   FONT_TABLE0_PAGE     (((DWORD)(FONT_TABLE0_START/256))<<20)  //spec. wrong
#define   FONT_TABLE1_PAGE     (((DWORD)(FONT_TABLE1_START/256))<<20)  //spec. wrong
#else   // #ifdef  SPLIT_TOP_BOTTOM_DATA
#define   FONT_TABLE_PAGE     (((DWORD)(FONT_TABLE_START/256))<<20)    //spec. wrong
#endif  // #ifdef  SPLIT_TOP_BOTTOM_DATA
#define   CHAR_TABLE_SIZE     CHARNUM*CHARROW+2

// Header2
#define   PAL_SEL             (((DWORD)(RES_RUNLENGTH))<<30)
#define   OSD_DISP            0X20000000        //OSD display on
#define   MIX_RATIO           (((DWORD)(MIXRATIO))<<25)
//LLY.100, #define   FONT_H2D            (((DWORD)(H2D))<<23)     // LLY.046, FONT_H2D=0 ( Hsize*2 )
//#define   START_PIXEL         (((DWORD)(START_PXL))<<12)
//LLY.100, #define   END_PIXEL           (((DWORD)(END_PXL))<<1)
#define   FONT_MODE2          FONT_TYPE

// Header3
#define   FONT_SHADOW         0x03fc0000        //enable all shadow effect

#define   PAL_INDEX74         (((DWORD)(PAL_IDX74))<<22)

// Header5
#define   CHAR_ROW            (((DWORD)(CHARROW))<<26)
//DVD027, define mix ratio bit for color change control
#define   CHAR_CH_MIX_RATIO   (((DWORD)(MIXRATIO))<<22)

//HEADER 0~5: Un_defined fields will be filled in _OSD_FillHeadtoDRAM()
#define   HEADER0             (FONT_MODE1 | CONT | LOAD_PAL | PIXEL_RES | CHAR_NUM)

// LLY.047, re-define header1 for top/bottom splition case
#ifdef  SPLIT_TOP_BOTTOM_DATA
#define   HEADER1_TOP         (FONT_TABLE0_PAGE | CHAR_TABLE_SIZE)
#define   HEADER1_BOTTOM      (FONT_TABLE1_PAGE | CHAR_TABLE_SIZE)
#else   // #ifdef SPLIT_TOP_BOTTOM_DATA
// LLY.172, let HEADER1_TOP & HEADER1_BOTTOM value are same for top/bottom non-split case
//#define   HEADER1             (FONT_TABLE_PAGE | CHAR_TABLE_SIZE)
#define   HEADER1_TOP         (FONT_TABLE_PAGE | CHAR_TABLE_SIZE)
#define   HEADER1_BOTTOM      (HEADER1_TOP)
#endif  // #ifdef SPLIT_TOP_BOTTOM_DATA

// LLY.100, remove START_PXL/ END_PIXEL/ FONT_H2D part because the value is generated dynamically
//#define   HEADER2             (PAL_SEL|OSD_DISP|MIX_RATIO|FONT_H2D|START_PIXEL|END_PIXEL|FONT_MODE2)
//#define   HEADER2             (PAL_SEL|OSD_DISP|MIX_RATIO|START_PIXEL|FONT_MODE2)
#define   HEADER2             (PAL_SEL|OSD_DISP|MIX_RATIO|FONT_MODE2)

#define   HEADER3             (FONT_SHADOW)

// LLY.100, remove FONT_SIZE0/ FONT_SIZE1 part because the value is generated dynamically
//#define   HEADER4             (FONT_SIZE0 | FONT_SIZE1 | PAL_INDEX74)
#define   HEADER4             (PAL_INDEX74)
//DVD025, add mix ratio setting for color change control
//#define   HEADER5             (CHAR_ROW)
#define   HEADER5             (CHAR_ROW)|(CHAR_CH_MIX_RATIO)
//////////////////////////////////////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// DVD.040, Bitmap mode usage
// Header0
#define   FONT_MODE1_BMP      (((DWORD)(BMP_TYPE)) << 31)
// CONT, LOAD_PAL is same as font mode
// PIXEL_RES is dependent on bitmap resolution
#define   NEXT_OSD_ADD        0x0L // use for only one bitmap

// Header1
#define   NEXT_OSD_SIZE       0x0L // use for only one bitmap

// Header2
// PAL_SEL is dependent on bitmap resolution
// OSD_DISP is same as font mode
#define   MIX_RATIO_BMP        (((DWORD)(BMP_MIXRATIO)) << 25)
// LLY.100, always enable horizontal interpolation, H2D=0
//#define   FONT_H2D_BMP         (((DWORD)(H2D))<<23)   // LLY.046, FONT_H2D=0 ( Hsize*2 )
#define   FONT_H2D_BMP         (((DWORD)(0x0L))<<23)   // LLY.046, FONT_H2D=0 ( Hsize*2 )
// START_PIXEL, END_PIXEL is dependent on usage,
// (END_PIXEL-START_PIXEL)=Bitmap horizontal width
#define   FONT_MODE2_BMP      (BMP_TYPE)

// Header3
// START_LINE, END_LINE is dependent on usage,
// (END_LINE-START_LINE+1)=Bitmap vertical width

// Header0~3
#define   HEADER0_BMP         (FONT_MODE1_BMP | CONT | LOAD_PAL | NEXT_OSD_ADD)
#define   HEADER1_BMP         (NEXT_OSD_SIZE)
#define   HEADER2_BMP         (OSD_DISP | MIX_RATIO_BMP | FONT_H2D_BMP | FONT_MODE2_BMP)
#define   HEADER3_BMP         0x0L
/////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////
//  ****** OSD MSG definition Area ******
// Sorting messages by their display position
// LLY.172p, enlarge the range for each group message

// [0] Special MSG for ignore all message of always display message
#define MSG_NULL            0x0
#define MSG_ALL             0xFF

// [1] UPPER CORNER MSG
// *** Upper Messages, if CENTRAL_OSD mode, it means UPPER1 message
// LLY.049-1, can't use index 0x0 for MSG_XXX,
// bcause 0x0=NULL means no message display now
#define UPPER_MSG_BASE      (MSG_OSD_BASE+1)   // 0x1
#define MSG_OPEN            (UPPER_MSG_BASE+ 0)
#define MSG_WAITING         (UPPER_MSG_BASE+ 1)
#define MSG_INVALID         (UPPER_MSG_BASE+ 2)
#define MSG_ABSTIME         (UPPER_MSG_BASE+ 3)
#define MSG_RELTIME         (UPPER_MSG_BASE+ 4)
#define MSG_REMAIN_ABSTIME  (UPPER_MSG_BASE+ 5)
#define MSG_REMAIN_RELTIME  (UPPER_MSG_BASE+ 6)
#define MSG_NEXT            (UPPER_MSG_BASE+ 7)
#define MSG_PREV            (UPPER_MSG_BASE+ 8)
#define MSG_ENDLIST         (UPPER_MSG_BASE+ 9)
#define MSG_RETURN          (UPPER_MSG_BASE+ 10)
#define MSG_PLAYING         (UPPER_MSG_BASE+ 11)
#define MSG_STOP            (UPPER_MSG_BASE+ 12)
#define MSG_SCANFORWARD     (UPPER_MSG_BASE+ 13)
#define MSG_SCANBACKWARD    (UPPER_MSG_BASE+ 14)
#define MSG_SLOW            (UPPER_MSG_BASE+ 15)
#define MSG_PAUSE           (UPPER_MSG_BASE+ 16)
#define MSG_FAST            (UPPER_MSG_BASE+ 17)
#define MSG_STEP            (UPPER_MSG_BASE+ 18)
#define MSG_FREEZE          (UPPER_MSG_BASE+ 19)
#define MSG_DISCPOSITION    (UPPER_MSG_BASE+ 20)
#define MSG_CHANGEDISCPOS   (UPPER_MSG_BASE+ 21)
#define MSG_CHECKLOADER     (UPPER_MSG_BASE+ 22)     // *** MULTI_DISC;
#define MSG_KEY10           (UPPER_MSG_BASE+ 23)     //right, center message
#define MSG_TRACK           (UPPER_MSG_BASE+ 24)
#define MSG_NUMBER          (UPPER_MSG_BASE+ 25)
#define MSG_REPEAT          (UPPER_MSG_BASE+ 26)
#define MSG_REPEATAB        (UPPER_MSG_BASE+ 27)
#define MSG_RANDOM          (UPPER_MSG_BASE+ 28)
#define MSG_DIGEST          (UPPER_MSG_BASE+ 29)
#define MSG_PBC             (UPPER_MSG_BASE+ 30)
#define MSG_TVMODE          (UPPER_MSG_BASE+ 31)
#define MSG_SETGOTOTIME     (UPPER_MSG_BASE+ 32)
#define MSG_GOTOTIME        (UPPER_MSG_BASE+ 33)
#define MSG_RESUME          (UPPER_MSG_BASE+ 34)
#define MSG_DISCTYPE        (UPPER_MSG_BASE+ 35)
#define MSG_MENU            (UPPER_MSG_BASE+ 36) // LLY.099c
#define MSG_VOCAL           (UPPER_MSG_BASE+ 37)
#define MSG_AUTOVOCAL       (UPPER_MSG_BASE+ 38)
#define MSG_VOICECANCEL     (UPPER_MSG_BASE+ 39)
#define MSG_KARAOKE         (UPPER_MSG_BASE+ 40)
#define MSG_ZOOM            (UPPER_MSG_BASE+ 41)
#define MSG_ZOOMMOVE        (UPPER_MSG_BASE+ 42)
#define MSG_VERSION         (UPPER_MSG_BASE+ 43)
#define MSG_ERR_PICTURE     (UPPER_MSG_BASE+ 44)
#define MSG_TITLE           (UPPER_MSG_BASE+ 45)
#define MSG_CHAPTER         (UPPER_MSG_BASE+ 46)
#define MSG_SELECTIONLIST   (UPPER_MSG_BASE+ 47)
#define MSG_INTRO           (UPPER_MSG_BASE+ 48)
// LLY.170a, remove this message, because it has combined with MSG_ABNORMAL_DISC
//#define MSG_ENCRYPT         (UPPER_MSG_BASE+ 49)
// LLY2.79-2, add message for full screen video
#define MSG_FULLSCREEN      (UPPER_MSG_BASE+ 49)

//CoCo1.26, add new message for Display mode.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -