36#define READ_ADDR(CtrlIndex, ChanIndex, Data) \
39 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrAddress + \
40 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)); \
41 DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \
44#define READ_CNT(CtrlIndex, ChanIndex, Data) \
47 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrElemCnt + \
48 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)); \
49 DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \
54 BYTE ReadValue = 0xFF;
144#define WRITE_ADDR(CtrlIndex, ChanIndex, Data) \
146 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseAddress + \
147 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \
148 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrAddress + \
149 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \
150 DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \
153#define WRITE_CNT(CtrlIndex, ChanIndex, Data) \
155 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseElemCnt + \
156 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \
157 *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrElemCnt + \
158 (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \
159 DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \
353 DPRINT1(
"DmaPageWritePort(Port = 0x%04X, Data = 0x%02X)\n",
Port,
Data);
417 if ((pDcp->
Command & 0x04) || (pDcp->
Mask & (1 << Channel)))
420 OpMode = (RegMode & 0xC0) >> 6;
422 Autoinit = RegMode & 0x10;
423 TrMode = (RegMode & 0x0C) >> 2;
430 DPRINT1(
"Request Mode - Not Implemented\n");
437 DPRINT1(
"Block Mode - Not Implemented\n");
441 DPRINT1(
"Cascade Mode should not be used by regular apps\n");
449 DPRINT1(
"DMA Transfer Type Illegal\n");
470 DPRINT1(
"Verification DMA operation\n");
477 DPRINT1(
"Perform Write transfer of %d elements (%d bytes) at 0x%x %s with count %x\n",
498 DPRINT1(
"Perform Read transfer of %d elements (%d bytes) at 0x%x %s with count %x\n",
530 pDcp->
Status |= 1 << Channel;
531 pDcp->
Status &= ~(1 << (Channel + 4));
542 pDcp->
Mask |= (1 << Channel);
654 pDmaInfo->status = pDcp->
Status;
656 pDmaInfo->mask = pDcp->
Mask;
692 pDcp->
Status = pDmaInfo->status;
#define ERROR_INVALID_ADDRESS
#define DMA_CONTROLLER_CHANNELS
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define UNREFERENCED_PARAMETER(P)
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
DMA_CHANNEL DmaChannel[DMA_CONTROLLER_CHANNELS]
FAST486_STATE EmulatorContext
static BYTE WINAPI DmaReadPort(USHORT Port)
#define READ_ADDR(CtrlIndex, ChanIndex, Data)
BOOL WINAPI VDDQueryDMA(IN HANDLE hVdd, IN WORD iChannel, IN PVDD_DMA_INFO pDmaInfo)
BOOL WINAPI VDDSetDMA(IN HANDLE hVdd, IN WORD iChannel, IN WORD fDMA, IN PVDD_DMA_INFO pDmaInfo)
DWORD DmaRequest(IN WORD iChannel, IN OUT PVOID Buffer, IN DWORD length)
#define WRITE_CNT(CtrlIndex, ChanIndex, Data)
static BYTE WINAPI DmaPageReadPort(USHORT Port)
static DMA_CONTROLLER DmaControllers[DMA_CONTROLLERS]
static VOID WINAPI DmaWritePort(USHORT Port, BYTE Data)
DWORD WINAPI VDDRequestDMA(IN HANDLE hVdd, IN WORD iChannel, IN OUT PVOID Buffer, IN DWORD length)
static DMA_PAGE_REGISTER DmaPageRegisters[DMA_CONTROLLERS *DMA_CONTROLLER_CHANNELS]
static VOID WINAPI DmaPageWritePort(USHORT Port, BYTE Data)
#define READ_CNT(CtrlIndex, ChanIndex, Data)
#define WRITE_ADDR(CtrlIndex, ChanIndex, Data)
VOID RegisterIoPort(USHORT Port, EMULATOR_INB_PROC InHandler, EMULATOR_OUTB_PROC OutHandler)
VOID FASTCALL EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
VOID FASTCALL EmulatorWriteMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size