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

📄 winav.h

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

#define TIMER_TH                        35
#define TIMER_TL                        51

#define COUNT_10_SEC                    588
#define COUNT_5_SEC                     294
#define COUNT_4_SEC                     235
#define COUNT_3_SEC                     176
#define COUNT_2_SEC                     118
#define COUNT_1_SEC                     59
#define COUNT_HALF_SEC                  29
#define COUNT_500_MSEC                  29
#define COUNT_400_MSEC                  24
#define COUNT_300_MSEC                  18
#define COUNT_250_MSEC                  15
#define COUNT_200_MSEC                  12
#define COUNT_150_MSEC                  9
#define COUNT_100_MSEC                  6
#define COUNT_50_MSEC                   3

#define COUNT_PER_SEC                COUNT_1_SEC
#endif  // if CPU_SPEED

// ########################################################
// each timer coming is 15 milliseconds ( in 40 M Hz )
// (50625* 12/ 40.5) us= 15 m sec
// TH1=(65536-50625)= 14911/256= 58;
// TH0=(65536-50625)= 14911%256= 63;
// ########################################################

#if CPU_SPEED == CPU_40M

#define TIMER_TH                        58      // ** SVCD-TCH; THX
#define TIMER_TL                        63      // ** SVCD-TCH; TLX

#define COUNT_10_SEC                    667L
#define COUNT_5_SEC                     333L
#define COUNT_4_SEC                     267L
#define COUNT_3_SEC                     200L
#define COUNT_2_SEC                     133L
#define COUNT_1_SEC                     67L
#define COUNT_HALF_SEC                  33L
#define COUNT_500_MSEC                  33
#define COUNT_400_MSEC                  26
#define COUNT_300_MSEC                  20
#define COUNT_250_MSEC                  16
#define COUNT_200_MSEC                  13
#define COUNT_150_MSEC                  10
#define COUNT_100_MSEC                  6
#define COUNT_50_MSEC                   3

#define COUNT_PER_SEC                   COUNT_1_SEC
// the count for scanning keypad
///#define COUNT_PER_SCAN                  COUNT_100_MSEC

#endif  // if CPU_SPEED

// ########################################################
// each timer coming is 25 milliseconds ( in 27 M Hz )
// (56250* 12/ 27.0) us= 25 m sec
// TH1=(65536-56250)= 9286/ 256= 36;
// TH0=(65536-56250)= 9286% 256= 70;

// (37480* 12/ 27.0) us= 16.66 m sec
// TH1=(65536-37480)= 28056/ 256= 109;
// TH0=(65536-37480)= 28056% 256= 152;
// ########################################################

#if CPU_SPEED    == CPU_27M
#define TIMER_TH                        109     // ** SVCD-TCH; THX
#define TIMER_TL                        152     // ** SVCD-TCH; TLX

#define COUNT_10_SEC                    600L
#define COUNT_5_SEC                     300L
#define COUNT_4_SEC                     240L
#define COUNT_3_SEC                     180L
#define COUNT_2_SEC                     120L
#define COUNT_1_SEC                     60L
#define COUNT_500_MSEC                  30
#define COUNT_400_MSEC                  24
#define COUNT_300_MSEC                  18
#define COUNT_250_MSEC                  15
#define COUNT_200_MSEC                  12
#define COUNT_150_MSEC                  9
#define COUNT_100_MSEC                  6
#define COUNT_50_MSEC                   3

#define COUNT_PER_SEC                   COUNT_1_SEC
#define COUNT_HALF_SEC                  COUNT_500_MSEC
#endif  // if CPU_SPEED

// ########################################################
// each timer coming is 10 milliseconds ( in 49.5 M Hz )
// (41250* 12/ 49.5) us= 10 m sec
// TH1=(65536-41250)= 24286/256= 94;
// TH0=(65536-41250)= 24286%256= 222;
// ########################################################

#if CPU_SPEED == CPU_49M

#define TIMER_TH                        94
#define TIMER_TL                        222

#define COUNT_10_SEC                    1000L
#define COUNT_5_SEC                     500L
#define COUNT_4_SEC                     400L
#define COUNT_3_SEC                     300L
#define COUNT_2_SEC                     200L
#define COUNT_1_SEC                     100L
#define COUNT_HALF_SEC                  50L
#define COUNT_500_MSEC                  50
#define COUNT_400_MSEC                  40
#define COUNT_300_MSEC                  30
#define COUNT_250_MSEC                  25
#define COUNT_200_MSEC                  20
#define COUNT_150_MSEC                  15
#define COUNT_100_MSEC                  10
#define COUNT_50_MSEC                   5

#define COUNT_PER_SEC                COUNT_1_SEC

#endif  // if CPU_SPEED

#endif  //#ifdef  SYSTEM_8051

// Micky2.80p, remove PARISC related
#if (CPU==CPU_X86)
//DVD_046-1
#define COUNT_10_SEC                    190L
#define COUNT_5_SEC                     95L
#define COUNT_4_SEC                     76L
#define COUNT_3_SEC                     57L
#define COUNT_2_SEC                     38L
#define COUNT_1_SEC                     19L
#define COUNT_500_MSEC                  9
#define COUNT_400_MSEC                  8
#define COUNT_300_MSEC                  6
#define COUNT_250_MSEC                  5
#define COUNT_200_MSEC                  4
#define COUNT_150_MSEC                  3
#define COUNT_100_MSEC                  2
#define COUNT_50_MSEC                   1

#define COUNT_PER_SEC                   COUNT_1_SEC
#define COUNT_HALF_SEC                  COUNT_500_MSEC
#endif  //#if (CPU==CPU_X86)
// ########################################################

///////////////////////////////////////////////////////////
// ****** Programmer/Developer's Zone ******
// !!!!!! Can be modified by Programmer only !!!!!!
///////////////////////////////////////////////////////////
// DVD_102pMicky, add define for integrate TVMODE
#define MPEG_VIDEO_MODE_PAL     0
#define MPEG_VIDEO_MODE_NTSC    1

// ***** Audio Frequency Define Range ***** // LLY.101
#define AUDIO_FREQ_BASE         0
#define AUDIO_FREQ_16K          (AUDIO_FREQ_BASE+ 0)
#define AUDIO_FREQ_32K          (AUDIO_FREQ_BASE+ 1)
#define AUDIO_FREQ_64K          (AUDIO_FREQ_BASE+ 2)
#define AUDIO_FREQ_24K          (AUDIO_FREQ_BASE+ 3)
#define AUDIO_FREQ_48K          (AUDIO_FREQ_BASE+ 4)
#define AUDIO_FREQ_96K          (AUDIO_FREQ_BASE+ 5)
#define AUDIO_FREQ_22K          (AUDIO_FREQ_BASE+ 6)
#define AUDIO_FREQ_44K          (AUDIO_FREQ_BASE+ 7)
#define AUDIO_FREQ_88K          (AUDIO_FREQ_BASE+ 8)
#define AUDIO_FREQ_END          AUDIO_FREQ_88K
#define AUDIO_FREQ_NO           (AUDIO_FREQ_END-AUDIO_FREQ_BASE+1)


// ***** Message and Error Range **************************

#define MSG_INPUT_BASE      0x00
#define MSG_PANEL_BASE      0x80
#define MSG_OSD_BASE        0x00

#define ERR_NOERR           TRUE
#define ERR_ERROR           FALSE
#define ERR_KERNEL          0x10
#define ERR_UTL             0x40
#define ERR_CDINFO          0x60
#define ERR_SERVO           0x80
#define ERR_OSD             0xA0
#define ERR_PANEL           0xC0

#define INPB(dest)                  ((BYTE) dest)
#define OUTB(dest, val)             { dest = (BYTE) val ; }

///////////////////////////////////////////////////////////
// ******************************
// ***** Simple types & common helper macros **************
// ******************************
// OSD&PANEL macro
#define OSD_OUTPUT_MACRO(mbMessage, mwParam, mbSec)\
{\
    OSD_Output(mbMessage, mwParam, mbSec);\
    PANEL_Output(mbMessage, mwParam);\
}
#define OSD_TRIGGER_MACRO(mwTime)\
{\
    OSD_Trigger(mwTime);\
    PANEL_Trigger(mwTime);\
}
#define OSD_INITIAL_MACRO()\
{\
    OSD_Initial();\
    PANEL_Initial();\
}

// LLY.172r added, do the neceeary thing while exit application
extern  void _ExitApp(void);
#ifndef SYSTEM_8051
#define EXIT_APP_MACRO()\
{\
    _ExitApp();\
}
#endif  // #ifndef SYSTEM_8051

//  #define     TEST
//:Enable test functions, for cdinfo.c/cdinfo2.c information only

// valid range of successive key
//loger the Key10+ display time
// 1) when input number is not confirmed after a period of time
//    the input number will be cleared
// 2) When 10+ is input a period of time, and no final digit is input
//    will clear the input value or auto input 0 as final digit(by define)
#define COUNT_NUMBER_GAP             COUNT_5_SEC

// ** TCH0.99D; define the global show time for OSD display
#define MSG_SHOWTIME_NORMAL          1
#define MSG_SHOWTIME_LONG            3

// define the count for retry reading TOC
#ifdef  INPUT_PATH_ATAPIIF
#define RETRY_READ_TOC  1
#else
#define RETRY_READ_TOC  20
#endif

//***********************************

// LLY.051, define it, means F/W will display LOGO while playing MP3 title
 #define     SUPPORT_MP3_WITH_LOGO

// define it, means [ISR] Module will do IFD counting and the mechanism will start All Rcovery Activility
// define RELEASE_SETTING will define ERROR_CONCEAL also.
//#define     ERROR_CONCEAL

// DVD_099cMicky, define it, OSD will display only for IR pressed key
#define SHOW_IR_KEY_OSD_ONLY

// define it, means System will follow SCMS control for DVD and non-DVD.
// Default is enable in "SER_ATA.C".
//#define     SUPPORT_SCMS

// ** TCH1.72; define it, OSD will display each IR-Key value (Hex).
// Even the Key is invalid....
//#define   _SHOW_IR_MAP

// DVD_276Micky, define it, will reduce the share Pool size
// used for serial debug combo only.
// currently reserve 384 bytes.
// some worst case DVD title may have problems??
/// #define _RESERVE_SRAM   // cc.h, dvdinfo.c will reference it.

// Micky2.81, define it, will check overflow by ISR
// else, will polling the A/V remainder.
// for mini-DVD
#define CHECK_OVERFLOW_IN_ISR //LJY2.30-2 open this for 16M solution

/////////////////////////////////////////////////////
// *****  Serial Debug Relative Zone *****
////////////////////////////////////////////////////
#ifdef SERIAL_DEBUG
// [1] Reserve SRAM
#ifndef _RESERVE_SRAM
#define _RESERVE_SRAM
#endif //#ifndef _RESERVE_SRAM

// [3] Micky2.80p, define _printf only when serial debug.
#define printf _printf

// [4] Always don't support volume adjustment button -- LLY2.80
//     Because, serial-debug and voluem adjustment button all share Timer2
#undef ENABLE_PANEL_VOLUME_ADJUSTMENT_BUTTON
#endif //#ifdef SERIAL_DEBUG

// ******************************
// STRICT zone for control spec.
// ******************************

// define it, means System will follow CSS control for DVD media.
// Default is disable.
//#define     STRICT_CSS
#ifdef    STRICT_CSS
#define     SUPPORT_SCMS
#endif    //STRICT_CSS

// define it, means System will follow DVD Video Navigator control.
// Default is enable.
#define     STRICT_UOP

//////////////////////////////////////////////////////////////////

#ifdef ROM_256K

#define NO_DIGEST
//#define NO_VCD20
#define NO_LOGO
//#define DSP_NO_RELOAD       // Don't load extra IEC_ERAM.inc
#define NO_SCREEN_SAVER     // Don't load screen-saver
#define NO_SETUP
//#define NO_MP3
//#define NO_PANEL
#define NO_MULTIPLE_OSD     // LLY.047, don't support mulit-OSD language

// #define NO_OSD
// #define NO_DVD

#endif      //#ifdef ROM_256K

#ifdef  NO_DVD
#define SIMP_DVD
#endif  // NO_DVD

// ** TCH0.391; Remove the definition "PRINTFSTR" to [DVDINFO]

#ifdef    RELEASE_SETTING

// Brian1.07, Disable VGA Video Output when Release mode  
#define NO_VGA_OUTPUT

// define it, means enable PANEL_KeyScan in [ISR]
// else disable it as avoid the mistake if don't connect PANEL when testing
#define ENABLE_PANEL_KEYSCAN

// ** TCH1.01-1;
///#define W99132_IR

//DVD_037RECOVER
// define it, means enable the IFD count checking
// LLY2.79-2, always enable ERROR_CONCEAL mechanism while support serial-debug or not
// Becasue, CoCo says that it's only code size issue to disable "Error Concealment" !!
//

⌨️ 快捷键说明

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