📄 escape.h
字号:
#ifndef __ESCAPE_H__
#define __ESCAPE_H__
// Escape code definition - The most recent located at $\Windows CE\Escape.H
//------------------------------------------------------------------------------
#define ESC_VERSION 0x001070
#define ESC_SMIINFO 0x100000
#define ESC_SMIREGS 0x100001
#define ESC_SMIMISC 0x100002
#define ESC_SMICREATEALPHASURFACE 0x100003
#define ESC_SMIENABLESUBPICTURE 0x100004
#define ESC_SMIDISABLESUBPICTURE 0x100005
#define ESC_SMIADJUSTALPHA 0x100006
#define ESC_SMIADJUSTALPHABOUNDARY 0x100007
#ifdef DXVA
#define ESC_DXVA_GETGUIDS 0x100008
#define ESC_DXVA_GETFORMATS 0x100009
#define ESC_DXVA_CREATE 0x10000A
#define ESC_DXVA_GETCOMPBUFFINFO 0x10000B
#define ESC_DXVA_GETINTERNALINFO 0x10000C
#define ESC_DXVA_BEGINFRAME 0x10000D
#define ESC_DXVA_ENDFRAME 0x10000E
#define ESC_DXVA_RENDER 0x10000F
#define ESC_DXVA_QUERYSTATUS 0x100010
#define ESC_DXVA_DESTROY 0x100011
#endif //DXVA
#define ESC_SMISAVEREGISTERS 0x100012
#define ESC_SMIRESTOREREGISTERS 0x100013
#if 0
/* These Escape functions are no longer available - Use ESC_SMIVPEAPI*/
#define ESC_SMIENABLEVIDEOFIELDSWAP 0x100014
#define ESC_SMIDISABLEVIDEOFIELDSWAP 0x100015
#define ESC_SMIENABLECAPTUREBYTESWAP 0x100016
#define ESC_SMIDISABLECAPTUREBYTESWAP 0x100017
#define ESC_SMISETVERTICALVIDEOMODE 0x100018
#define ESC_SMISETHORIZONTALVIDEOMODE 0x100019
/* End of Escape function*/
#endif
#define ESC_SMIZOOM 0x100100
#define ESC_SMIALPHAOVERLAY 0x100101
#define ESC_SMISURFACE 0x100102
#define ESC_SMIPOWERMANAGEMENT 0x100103
#define ESC_SMIPWMAPI 0x100104
#define ESC_SMII2CAPI 0x100105
#define ESC_VGXDMA_GETBUFFER 0x100106
#define ESC_VGXDMA_START 0x100107
#define ESC_SMISSPAPI 0x100108
#define ESC_VGXDMA_WAITIDLE 0x100109
#define ESC_SMIVPEAPI 0x10010A
#ifndef AUTOPC
// This is a special flag for WCEfA system to request surface allocation
// using video memory only.
#define DRIVER_ESCAPE_PROC_REQ_VMEM_ONLY 0x400
#endif
// Data structure for the escape code
struct SMIINFO
{
DWORD nScreenWidth; // Screen width
DWORD nScreenHeight; // Screen height
DWORD nScreenBpp; // Bits Per Pixel
DWORD nScreenStride; // Screen Stride
DWORD nVideoMemorySize; // Video Memory Size
DWORD dwPhysicalModeID; // Mode Id
DWORD nChipID; // Chip ID
DWORD nLAWPhysical; // Video Memory Physical address
DWORD pLAW; // Video Memory Virtual address
DWORD pLFB; // Linear Frame buffer Physical address
DWORD pMMIO; // Drawing Engine Data Virtual address
DWORD pDPR; // Drawing Engine Register Virtual address
DWORD pVPR; // Video Port Register Virtual address
DWORD pSMI; // SMI Driver address
DWORD nLFBPhysical; // Linear Frame buffer Virtual address
DWORD nFlag; // This corresponding to flag 1 below
DWORD nVersion; // Escape Version String
DWORD nSMIVersion; // SMI Driver Version
DWORD pCPR; // Capture Port Register address
DWORD nINTR; // Hardware Interrupt number
DWORD nSMIDate; // Date String
DWORD nREGPhysical; // Video Register Physical Address
DWORD pREG; // Video Register Virtual Address
DWORD iRotate; // Current rotate mode
DWORD nPanelSize; // Panel Height[15:8] and Width[7:0]
DWORD FutureUse[7]; // Please subtract the array counter for future variables
// so that the total size of structure is always
// 32 Dwords or 128 bytes
};
// Lynx Flag
#define SMIINFO_DSTN 0x00000001
#define SMIINFO_DUALAPP 0x00000002
#define SMIINFO_SWCURSOR 0x00000004
#define SMIINFO_AUTOPC 0x00000008
#define SMIINFO_TRUCKPC 0x00000010
#define SMIINFO_P350 0x00000020
#define SMIINFO_P480234 0x00000040
#define SMIINFO_PTOSH400234NT 0x00000080
#define SMIINFO_PSHARP320x240 0x00000100
#define SMIINFO_PHITACHI800x480 0x00000200
#define SMIINFO_TV_FS454 0x00000400
// Cougar3DR Flag
// Compiler flag starts from MSB
// Driver flag starts from LSB
#define SMIINFO3DR_CHIPID 0x730
#define SMIINFO3DR_D3D 0x10000000
#define SMIINFO3DR_ROTATION 0x20000000
#define SMIINFO3DR_NODD 0x40000000
#define SMIINFO3DR_MMEMU 0x80000000
#define SMIINFO3DR_DISPPERF 0x01000000
// VGX Flag
// Compiler flag starts from MSB
// Driver flag starts from LSB
#define SMIINFOVGX_CHIPID 0x501
#define SMIINFOVGX_D3D 0x10000000
#define SMIINFOVGX_ROTATION 0x20000000
#define SMIINFOVGX_NODD 0x40000000
#define SMIINFOVGX_MMEMU 0x80000000
#define SMIINFOVGX_DISPPERF 0x01000000
struct SMIREGSIN
{
DWORD nCmd;
DWORD nReg;
DWORD nWrite;
DWORD nWrite2;
};
struct SMIREGSOUT
{
DWORD nRead;
DWORD nRead2;
};
struct SMIREGS
{
struct SMIREGSIN In;
struct SMIREGSOUT Out;
};
#define SMIREGS_WRITE 0x00000001
#define SMIREGS_READ 0x00000002
#define SMIREGS_WR SMIREGS_WRITE|SMIREGS_READ
#define SMIREGS_WAITVBLANK 0x00000004
#define SMIREGS_GRA 0x00000010
#define SMIREGS_SEQ 0x00000020
#define SMIREGS_CRT 0x00000040
#define SMIREGS_ATR 0x00000080
#define SMIREGS_VPR 0x00000100
#define SMIREGS_DPR 0x00000200
#define SMIREGS_PAL 0x00000400 // Palette
#define SMIREGS_PAM 0x00000800 // Palette Mask
#define SMIREGS_MISC 0x00001000
#define SMIREGS_WFIFO 0x00002000
#define SMIREGS_RFIFO1 0x00004000
#define SMIREGS_RFIFO2 0x00008000
#define SMIREGS_CPR 0x00010000
#define SMIREGS_PLC 0x00020000 // LCD Palette
#define SMIREGS_FPR 0x00040000 // LCD Palette
#define SMIREGS_MMIO 0x00080000 // VGX MMIO Registers
/* SMIALPHAOVERLAY Defines */
#define SMIALPHAOVERLAY_INIT 0x00000001
#define SMIALPHAOVERLAY_GETPALETTE 0x00000002
#define SMIALPHAOVERLAY_SETPALETTE 0x00000004
#define SMIAPLHAOVERLAY_ENABLE 0x00000008
#define SMIAPLHAOVERLAY_DISABLE 0x00000010
#define SMIALPHAOVERLAY_ALPHAVALUE 0x00000020
#define SMIAPLHAOVERLAY_FORMAT_RGB16 0x1
#define SMIALPHAOVERLAY_FORMAT_A_4_4 0x2
#define SMIALPHAOVERLAY_FORMAT_A_4_4_4_4 0x3
/* SMISURFACE Defines */
#define SMISURFACE_CREATE 0x00000001
#define SMISURFACE_DESTROY 0x00000002
//------------------------------------------------------------------------------
// Zoom API Structure
struct SMIZOOM
{
int nPanningX;
int nPanningY;
DWORD dwCxZoom;
DWORD dwCyZoom;
DWORD dwCxPanel;
DWORD dwCyPanel;
};
struct SMISURFACE
{
DWORD dwCommand;
BOOL bNonLocal;
DWORD dwCSNonLocal;
DWORD dwOffset;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwStride;
DWORD dwWindowWidth;
DWORD dwBPP;
LPVOID *pSurf;
};
struct SMIALPHAOVERLAY
{
DWORD dwCommand;
BOOL bUseAlphaValue;
DWORD dwAlphaValue;
BOOL bChromaEnabled;
DWORD dwChromaKeyMask;
DWORD dwChromaKeyValue;
DWORD dwPlaneFormat;
DWORD dwX;
DWORD dwY;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwAlphaColorLUT[16];
DWORD dwSurfaceX;
DWORD dwSurfaceY;
SMISURFACE *pssSurf;
};
/* macros for Voyager GX DMA */
#define VGXDMA_SYS_MEMORY (1L<<27)
#define VGXDMA_VIDEO_MEMORY 0
typedef struct _SMI_VGXDMA {
ULONG VGXDMA_virtualaddress;
ULONG m_sdrambase;
ULONG m_VGXDMA_address;
ULONG m_VGXDMA_size;
ULONG VGXDMA_physical_offset;
ULONG buffer_size;
ULONG SrcOffset; //offset in sys memory
ULONG DstOffset; //offset in video memory
ULONG Length; //size of DMA operation
} SMI_VGXDMA, *PSMI_VGXDMA;
/* VPE Port Type Definition*/
// {A472D5F5-0FD9-4ac1-8E76-78E34A1F9657}
DEFINE_GUID(DDVPTYPE_PHILIPS_SAA7118_8, 0xa472d5f5, 0x0fd9, 0x4ac1, 0x8e, 0x76, 0x78, 0xe3, 0x4a, 0x1f, 0x96, 0x57);
// {F577F5BA-297E-4c51-90D0-91AE72B38BF5}
DEFINE_GUID(DDVPTYPE_PHILIPS_SAA7118_8, 0xf577f5ba, 0x297e, 0x4c51, 0x90, 0xd0, 0x91, 0xae, 0x72, 0xb3, 0x8b, 0xf5);
typedef struct _SMIVPEAPI
{
DWORD dwCommand;
DWORD dwParam;
} SMIVPEAPI;
/* VPE APIs constants definitions */
#define SMIVPEAPI_FIELD_SWAP 0x00000001
#define SMIVPEAPI_BYTE_SWAP 0x00000002
#define SMIVPEAPI_UV_SWAP 0x00000004
#define SMIVPEAPI_CAPTURE_SIZE 0x00000008
#define SMIVPEAPI_FORMAT 0x00000010
#define SMIVPEAPI_CLOCK_POLARITY 0x00000020
#define SMIVPEAPI_HREF_PHASE 0x00000040
#define SMIVPEAPI_VSYNC_PHASE 0x00000080
#define SMIVPEAPI_FIELD_DETECT 0x00000100
#define SMIVPEAPI_2TO1HSHRINK 0x00000200
#define SMIVPEAPI_2TO1VSHRINK 0x00000400
#define SMIVPEAPI_HAVE 0x00000800
#define SMIVPEAPI_VIDEO_VINTERPOLATE 0x00001000
#define SMIVPEAPI_VIDEO_HINTERPOLATE 0x00002000
/* VPE APIs params definitions */
#define SMIVPEAPI_ENABLE 0x00000001
#define SMIVPEAPI_DISABLE 0x00000002
#define SMIVPEAPI_ACTIVE_LOW 0x00000004
#define SMIVPEAPI_ACTIVE_HIGH 0x00000008
#define SMIVPEAPI_FALLING 0x00000010
#define SMIVPEAPI_RISING 0x00000020
#define SMIVPEAPI_8BIT 0x00000040
#define SMIVPEAPI_16BIT 0x00000080
#define SMIVPEAPI_RGB 0x00000100
#define SMIVPEAPI_YUV 0x00000200
#endif //__ESCAPE_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -