www.pudn.com > 6027_HD65.rar > emu_api.h


/**********************************************************************/ 
/***************    MTK CONFIDENTIAL & COPYRIGHTED     ****************/ 
/***************                                       ****************/ 
/***************  $Modtime:: 04/04/26 9:13p    $       ****************/ 
/***************  $Revision:: 2                $       ****************/ 
/***************                                       ****************/ 
/***************   Description : System emulation      ****************/ 
/***************                 Include File          ****************/ 
/***************                                       ****************/ 
/***************       Company : MediaTek Inc.         ****************/ 
/***************    Programmer :                       ****************/ 
/**********************************************************************/ 
 
#ifndef _EMU_API_H_ 
#define _EMU_API_H_ 
 
// ********************************************************************* 
// Redefine reserved word 
// ********************************************************************* 
#define code 
#define data 
#define idata 
#define bdata 
#define xdata 
#define pdata 
 
#define small 
#define compact 
#define large 
 
#define _testbit_(x) (x) 
 
// ********************************************************************* 
// define macro in typedef.h 
// ********************************************************************* 
typedef unsigned char     BOOL; 
typedef unsigned char     BIT; 
typedef unsigned char     BYTE; 
typedef unsigned short    WORD; 
typedef unsigned long     DWRD; 
typedef signed char       CHAR; 
typedef signed int        INT; 
typedef signed long       LONG; 
typedef float             FLOAT; 
typedef double            DOUBLE; 
typedef long double       LDOUBLE; 
#define TRUE 1 
#define FALSE 0 
 
#include "..\..\config.h" 
#ifdef MT1379 
  #include "..\..\mt1379.h" 
#else 
  #include "..\..\mt1369.h" 
#endif 
#include "..\..\macro.h" 
 
#include "..\..\common\shareinf.h" 
#include "..\..\common\sv_const.h" 
#include "..\..\common\dsp\dspconst.h" 
#include "..\..\common\osdcmd.h" 
#include OSD_COLOR_CUST_FILE 
#include "..\..\osd8032.h" 
#include "..\..\common\uop.h" 
#include WB_PUB_CUST_FILE 
 
#include "shareusr.h" 
#include "uopmap.h" 
#include "play_com.h" 
#include "play_ini.h" 
#include "play_dvd.h" 
#include "play_vcd.h" 
#include "play_iso.h" 
#include "play_pcd.h" 
#include "play_cda.h" 
#include "keyproc.h" 
#include "selmenu.h" 
#include "message.h" 
#include "osdshow.h" 
#include "vfdshow.h" 
#include "adsp.h" 
#include "aud_ctrl.h" 
#include "vid_ctrl.h" 
#include "sys_ctrl.h" 
#include "setup.h" 
 
#include "vfd.h" 
#include VFD_DATA_H 
 
#include "..\..\keydef.h" 
 
// ********************************************************************* 
// define macro in vardef.h 
// ********************************************************************* 
#if defined(_C_MAIN_) 
BYTE XBYTE[0x10000]; 
BOOL        _fgIRKeyValid; 
BYTE xdata  _bIRStatus; 
BYTE xdata  _bIRBitCnt; 
BYTE xdata  _bIRKeyBuf; 
#ifdef IR_CHECK_DATA_CODE_INV 
BYTE xdata  _bIRKeyBufInv; 
#endif 
BYTE xdata  _bPlayPostKey; 
BYTE xdata  _bIRKey; 
BYTE xdata  _bIRKey0; 
#else 
extern BYTE XBYTE [0x10000]; 
extern BOOL        _fgIRKeyValid; 
extern BYTE xdata  _bIRStatus; 
extern BYTE xdata  _bIRBitCnt; 
extern BYTE xdata  _bIRKeyBuf; 
#ifdef IR_CHECK_DATA_CODE_INV 
extern BYTE xdata  _bIRKeyBufInv; 
#endif 
extern BYTE xdata  _bPlayPostKey; 
extern BYTE xdata  _bIRKey; 
extern BYTE xdata  _bIRKey0; 
#endif 
 
// ********************************************************************* 
// define macro in macro.h 
// ********************************************************************* 
#undef WriteBIM 
extern void WriteBIM(BYTE bReg, BYTE bVal); 
 
#undef bReadBIM 
extern BYTE bReadBIM(BYTE bReg); 
 
extern BYTE ReadDRAM1369(DWRD dwHiByte, DWRD dwLoByte); 
extern void WriteDRAM1369(DWRD dwHiByte, DWRD dwLoByte, BYTE bVal); 
extern BYTE *_pbShareMem; 
 
// Set Little Endian 
#undef bHiByte 
#undef bLoByte 
#define bHiByte(arg)      (*((BYTE *)&arg + 1)) 
#define bLoByte(arg)      (*(BYTE *)&arg) 
 
#undef wHiWord 
#undef wLoWord 
#define wHiWord(arg)      (arg >> 16) 
#define wLoWord(arg)      (arg & 0x0000ffff) 
 
#if 0 
#define vWriteDspSharedBInfo(wAddr, bVal) 
#define vWriteDspSharedWInfo(wAddr, wVal) 
#define vWriteDspSharedDInfo(wAddr, dwVal) 
#define vNotifyDspSharedInfo(dwId) 
#define vNotifySharedInfo(wItem1, wItem2, wItem3) 
#endif 
 
#endif /* _EMU_API_H_ */