📄 gxdma.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
#ifndef _GXDMA_H_
#define _GXDMA_H_
// required gxdma functions
void DmaDRAMtoVRAM(DWORD dwLeft, DWORD dwTop, DWORD dwWidth, DWORD dwHeight);
void DmaVRAMtoDRAM(DWORD dwLeft, DWORD dwTop, DWORD dwWidth, DWORD dwHeight);
BOOL IsDMAReady(BOOL fForceWait);
#define SHARED_MEM_MIN_SIZE 2*1024*1024 //2 MegaBytes
#define GAPI_DRAM_VIRTUAL_SIZE 0x00040000
const DWORD DISP_CX_SCREEN = 240;
const DWORD DISP_CY_SCREEN = 320;
const DWORD DISP_CX_STRIDE = sizeof(WORD);
const DWORD DISP_CY_STRIDE = 480;
const DWORD DISP_CX_SCREEN_TPC = 176;
const DWORD DISP_CY_SCREEN_TPC = 220;
const DWORD DISP_CX_STRIDE_TPC = sizeof(WORD);
const DWORD DISP_CY_STRIDE_TPC = 352;
#define DRIVER_DPI_KEY TEXT("Drivers\\Display\\GPE")
#define DRIVER_DPI_VALUE TEXT("LogicalPixelsX")
#define HIGH_DPI_VALUE 192
#define HIGH_DPI_VALUE_TPC 131
#define NORMAL_DPI_VALUE 96
#ifndef GETRAWFRAMEBUFFER
#define GETRAWFRAMEBUFFER 0x00020001
typedef struct _RawFrameBufferInfo
{
WORD wFormat;
WORD wBPP;
VOID *pFramePointer;
int cxStride;
int cyStride;
int cxPixels;
int cyPixels;
} RawFrameBufferInfo;
#define FORMAT_565 1
#define FORMAT_555 2
#define FORMAT_OTHER 3
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -