ReactOS 0.4.16-dev-303-g11d5cb8
dma.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/hardware/dma.h
5 * PURPOSE: ISA DMA - Direct Memory Access Controller emulation -
6 * i8237A compatible with 74LS612 Memory Mapper extension
7 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10#ifndef _DMA_H_
11#define _DMA_H_
12
13/* DEFINES ********************************************************************/
14
15#define DMA_CONTROLLERS 2
16#define DMA_CONTROLLER_CHANNELS 4 // Each DMA controller has 4 channels
17
18typedef struct _DMA_CHANNEL
19{
26
27typedef struct _DMA_CONTROLLER
28{
30
33
35
40
41 BOOLEAN FlipFlop; // 0: LSB ; 1: MSB
42
44
45/* 74LS612 Memory Mapper extension */
46typedef struct _DMA_PAGE_REGISTER
47{
50
51// The 74LS612 contains 16 bytes, each of them being a page register.
52// They are accessible via ports 0x80 through 0x8F.
53
54/* FUNCTIONS ******************************************************************/
55
56DWORD DmaRequest(IN WORD iChannel,
59
61
62#endif /* _DMA_H_ */
unsigned char BOOLEAN
Definition: bufpool.h:45
DWORD DmaRequest(IN WORD iChannel, IN OUT PVOID Buffer, IN DWORD length)
Definition: dma.c:386
VOID DmaInitialize(VOID)
Definition: dma.c:549
struct _DMA_PAGE_REGISTER DMA_PAGE_REGISTER
#define DMA_CONTROLLER_CHANNELS
Definition: dma.h:16
struct _DMA_CHANNEL * PDMA_CHANNEL
struct _DMA_PAGE_REGISTER * PDMA_PAGE_REGISTER
struct _DMA_CONTROLLER DMA_CONTROLLER
struct _DMA_CONTROLLER * PDMA_CONTROLLER
struct _DMA_CHANNEL DMA_CHANNEL
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
WORD CurrElemCnt
Definition: dma.h:23
WORD BaseElemCnt
Definition: dma.h:21
BYTE Mode
Definition: dma.h:24
WORD BaseAddress
Definition: dma.h:20
WORD CurrAddress
Definition: dma.h:22
BYTE Command
Definition: dma.h:36
DMA_CHANNEL DmaChannel[DMA_CONTROLLER_CHANNELS]
Definition: dma.h:29
BYTE Request
Definition: dma.h:37
BYTE TempReg
Definition: dma.h:34
BYTE Mask
Definition: dma.h:38
BOOLEAN FlipFlop
Definition: dma.h:41
WORD TempElemCnt
Definition: dma.h:32
BYTE Status
Definition: dma.h:39
WORD TempAddress
Definition: dma.h:31
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
unsigned char BYTE
Definition: xxhash.c:193