ReactOS 0.4.16-dev-297-gc569aee
nt_vdd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VDD_USER_HANDLERS
 
struct  _VDD_IO_HANDLERS
 
struct  _VDD_IO_PORTRANGE
 
struct  _VDD_DMA_INFO
 

Macros

#define _NT_VDD
 
#define VDD_DMA_ADDR   0x01
 
#define VDD_DMA_COUNT   0x02
 
#define VDD_DMA_PAGE   0x04
 
#define VDD_DMA_STATUS   0x08
 
#define VDD_DMA_ALL   (VDD_DMA_ADDR | VDD_DMA_COUNT | VDD_DMA_PAGE | VDD_DMA_STATUS)
 
#define MSW_PE   0x0001
 
#define getMODE()   ((getMSW() & MSW_PE) ? VDM_PM : VDM_V86)
 

Typedefs

typedef VOID(WINAPIPFNVDD_UCREATE) (USHORT DosPDB)
 
typedef VOID(WINAPIPFNVDD_UTERMINATE) (USHORT DosPDB)
 
typedef VOID(WINAPIPFNVDD_UBLOCK) (VOID)
 
typedef VOID(WINAPIPFNVDD_URESUME) (VOID)
 
typedef struct _VDD_USER_HANDLERS VDD_USER_HANDLERS
 
typedef struct _VDD_USER_HANDLERSPVDD_USER_HANDLERS
 
typedef VOID(WINAPIPFNVDD_INB) (WORD iport, PBYTE data)
 
typedef VOID(WINAPIPFNVDD_INW) (WORD iport, PWORD data)
 
typedef VOID(WINAPIPFNVDD_INSB) (WORD iport, PBYTE data, WORD count)
 
typedef VOID(WINAPIPFNVDD_INSW) (WORD iport, PWORD data, WORD count)
 
typedef VOID(WINAPIPFNVDD_OUTB) (WORD iport, BYTE data)
 
typedef VOID(WINAPIPFNVDD_OUTW) (WORD iport, WORD data)
 
typedef VOID(WINAPIPFNVDD_OUTSB) (WORD iport, PBYTE data, WORD count)
 
typedef VOID(WINAPIPFNVDD_OUTSW) (WORD iport, PWORD data, WORD count)
 
typedef struct _VDD_IO_HANDLERS VDD_IO_HANDLERS
 
typedef struct _VDD_IO_HANDLERSPVDD_IO_HANDLERS
 
typedef struct _VDD_IO_PORTRANGE VDD_IO_PORTRANGE
 
typedef struct _VDD_IO_PORTRANGEPVDD_IO_PORTRANGE
 
typedef struct _VDD_DMA_INFO VDD_DMA_INFO
 
typedef struct _VDD_DMA_INFOPVDD_DMA_INFO
 
typedef VOID(WINAPIPVDD_MEMORY_HANDLER) (PVOID FaultAddress, ULONG RWMode)
 

Enumerations

enum  VDM_MODE { VDM_V86 , VDM_PM }
 

Functions

VOID WINAPI VDDSimulate16 (VOID)
 
VOID WINAPI VDDTerminateVDM (VOID)
 
BOOL WINAPI VDDInstallUserHook (_In_ HANDLE hVdd, _In_ PFNVDD_UCREATE Ucr_Handler, _In_ PFNVDD_UTERMINATE Uterm_Handler, _In_ PFNVDD_UBLOCK Ublock_Handler, _In_ PFNVDD_URESUME Uresume_Handler)
 
BOOL WINAPI VDDDeInstallUserHook (_In_ HANDLE hVdd)
 
WORD WINAPI VDDReserveIrqLine (_In_ HANDLE hVdd, _In_ WORD IrqLine)
 
BOOL WINAPI VDDReleaseIrqLine (_In_ HANDLE hVdd, _In_ WORD IrqLine)
 
BOOL WINAPI VDDInstallIOHook (_In_ HANDLE hVdd, _In_ WORD cPortRange, _In_ PVDD_IO_PORTRANGE pPortRange, _In_ PVDD_IO_HANDLERS IoHandlers)
 
VOID WINAPI VDDDeInstallIOHook (_In_ HANDLE hVdd, _In_ WORD cPortRange, _In_ PVDD_IO_PORTRANGE pPortRange)
 
DWORD WINAPI VDDRequestDMA (_In_ HANDLE hVdd, _In_ WORD iChannel, _Inout_ PVOID Buffer, _In_ DWORD length)
 
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)
 
PVOID WINAPI VdmMapFlat (_In_ USHORT Segment, _In_ ULONG Offset, _In_ VDM_MODE Mode)
 
BOOL WINAPI VdmFlushCache (_In_ USHORT Segment, _In_ ULONG Offset, _In_ ULONG Size, _In_ VDM_MODE Mode)
 
BOOL WINAPI VdmUnmapFlat (_In_ USHORT Segment, _In_ ULONG Offset, _In_ PVOID Buffer, _In_ VDM_MODE Mode)
 
BOOL WINAPI VDDInstallMemoryHook (_In_ HANDLE hVdd, _In_ PVOID pStart, _In_ DWORD dwCount, _In_ PVDD_MEMORY_HANDLER MemoryHandler)
 
BOOL WINAPI VDDDeInstallMemoryHook (_In_ HANDLE hVdd, _In_ PVOID pStart, _In_ DWORD dwCount)
 
BOOL WINAPI VDDAllocMem (_In_ HANDLE hVdd, _In_ PVOID Address, _In_ ULONG Size)
 
BOOL WINAPI VDDFreeMem (_In_ HANDLE hVdd, _In_ PVOID Address, _In_ ULONG Size)
 
BOOL WINAPI VDDIncludeMem (_In_ HANDLE hVdd, _In_ PVOID Address, _In_ ULONG Size)
 
BOOL WINAPI VDDExcludeMem (_In_ HANDLE hVdd, _In_ PVOID Address, _In_ ULONG Size)
 

Macro Definition Documentation

◆ _NT_VDD

#define _NT_VDD

Definition at line 25 of file nt_vdd.h.

◆ getMODE

#define getMODE ( )    ((getMSW() & MSW_PE) ? VDM_PM : VDM_V86)

Definition at line 228 of file nt_vdd.h.

◆ MSW_PE

#define MSW_PE   0x0001

Definition at line 225 of file nt_vdd.h.

◆ VDD_DMA_ADDR

#define VDD_DMA_ADDR   0x01

Definition at line 187 of file nt_vdd.h.

◆ VDD_DMA_ALL

Definition at line 191 of file nt_vdd.h.

◆ VDD_DMA_COUNT

#define VDD_DMA_COUNT   0x02

Definition at line 188 of file nt_vdd.h.

◆ VDD_DMA_PAGE

#define VDD_DMA_PAGE   0x04

Definition at line 189 of file nt_vdd.h.

◆ VDD_DMA_STATUS

#define VDD_DMA_STATUS   0x08

Definition at line 190 of file nt_vdd.h.

Typedef Documentation

◆ PFNVDD_INB

typedef VOID(WINAPI * PFNVDD_INB) (WORD iport, PBYTE data)

Definition at line 100 of file nt_vdd.h.

◆ PFNVDD_INSB

typedef VOID(WINAPI * PFNVDD_INSB) (WORD iport, PBYTE data, WORD count)

Definition at line 110 of file nt_vdd.h.

◆ PFNVDD_INSW

typedef VOID(WINAPI * PFNVDD_INSW) (WORD iport, PWORD data, WORD count)

Definition at line 116 of file nt_vdd.h.

◆ PFNVDD_INW

typedef VOID(WINAPI * PFNVDD_INW) (WORD iport, PWORD data)

Definition at line 105 of file nt_vdd.h.

◆ PFNVDD_OUTB

typedef VOID(WINAPI * PFNVDD_OUTB) (WORD iport, BYTE data)

Definition at line 122 of file nt_vdd.h.

◆ PFNVDD_OUTSB

typedef VOID(WINAPI * PFNVDD_OUTSB) (WORD iport, PBYTE data, WORD count)

Definition at line 132 of file nt_vdd.h.

◆ PFNVDD_OUTSW

typedef VOID(WINAPI * PFNVDD_OUTSW) (WORD iport, PWORD data, WORD count)

Definition at line 138 of file nt_vdd.h.

◆ PFNVDD_OUTW

typedef VOID(WINAPI * PFNVDD_OUTW) (WORD iport, WORD data)

Definition at line 127 of file nt_vdd.h.

◆ PFNVDD_UBLOCK

typedef VOID(WINAPI * PFNVDD_UBLOCK) (VOID)

Definition at line 50 of file nt_vdd.h.

◆ PFNVDD_UCREATE

typedef VOID(WINAPI * PFNVDD_UCREATE) (USHORT DosPDB)

Definition at line 44 of file nt_vdd.h.

◆ PFNVDD_URESUME

typedef VOID(WINAPI * PFNVDD_URESUME) (VOID)

Definition at line 53 of file nt_vdd.h.

◆ PFNVDD_UTERMINATE

typedef VOID(WINAPI * PFNVDD_UTERMINATE) (USHORT DosPDB)

Definition at line 47 of file nt_vdd.h.

◆ PVDD_DMA_INFO

◆ PVDD_IO_HANDLERS

◆ PVDD_IO_PORTRANGE

◆ PVDD_MEMORY_HANDLER

typedef VOID(WINAPI * PVDD_MEMORY_HANDLER) (PVOID FaultAddress, ULONG RWMode)

Definition at line 230 of file nt_vdd.h.

◆ PVDD_USER_HANDLERS

◆ VDD_DMA_INFO

◆ VDD_IO_HANDLERS

◆ VDD_IO_PORTRANGE

◆ VDD_USER_HANDLERS

Enumeration Type Documentation

◆ VDM_MODE

Enumerator
VDM_V86 
VDM_PM 

Definition at line 219 of file nt_vdd.h.

219 {
220 VDM_V86,
221 VDM_PM
222} VDM_MODE;
VDM_MODE
Definition: nt_vdd.h:219
@ VDM_PM
Definition: nt_vdd.h:221
@ VDM_V86
Definition: nt_vdd.h:220

Function Documentation

◆ VDDAllocMem()

BOOL WINAPI VDDAllocMem ( _In_ HANDLE  hVdd,
_In_ PVOID  Address,
_In_ ULONG  Size 
)

Referenced by MemoryHandler().

◆ VDDDeInstallIOHook()

VOID WINAPI VDDDeInstallIOHook ( _In_ HANDLE  hVdd,
_In_ WORD  cPortRange,
_In_ PVDD_IO_PORTRANGE  pPortRange 
)

Referenced by RegisterVDD().

◆ VDDDeInstallMemoryHook()

BOOL WINAPI VDDDeInstallMemoryHook ( _In_ HANDLE  hVdd,
_In_ PVOID  pStart,
_In_ DWORD  dwCount 
)

Referenced by RegisterVDD().

◆ VDDDeInstallUserHook()

BOOL WINAPI VDDDeInstallUserHook ( _In_ HANDLE  hVdd)

Referenced by RegisterVDD().

◆ VDDExcludeMem()

BOOL WINAPI VDDExcludeMem ( _In_ HANDLE  hVdd,
_In_ PVOID  Address,
_In_ ULONG  Size 
)

◆ VDDFreeMem()

BOOL WINAPI VDDFreeMem ( _In_ HANDLE  hVdd,
_In_ PVOID  Address,
_In_ ULONG  Size 
)

Referenced by RegisterVDD().

◆ VDDIncludeMem()

BOOL WINAPI VDDIncludeMem ( _In_ HANDLE  hVdd,
_In_ PVOID  Address,
_In_ ULONG  Size 
)

◆ VDDInstallIOHook()

BOOL WINAPI VDDInstallIOHook ( _In_ HANDLE  hVdd,
_In_ WORD  cPortRange,
_In_ PVDD_IO_PORTRANGE  pPortRange,
_In_ PVDD_IO_HANDLERS  IoHandlers 
)

Referenced by RegisterVDD().

◆ VDDInstallMemoryHook()

BOOL WINAPI VDDInstallMemoryHook ( _In_ HANDLE  hVdd,
_In_ PVOID  pStart,
_In_ DWORD  dwCount,
_In_ PVDD_MEMORY_HANDLER  MemoryHandler 
)

Referenced by FindHookableMemory().

◆ VDDInstallUserHook()

BOOL WINAPI VDDInstallUserHook ( _In_ HANDLE  hVdd,
_In_ PFNVDD_UCREATE  Ucr_Handler,
_In_ PFNVDD_UTERMINATE  Uterm_Handler,
_In_ PFNVDD_UBLOCK  Ublock_Handler,
_In_ PFNVDD_URESUME  Uresume_Handler 
)

Referenced by RegisterVDD().

◆ VDDQueryDMA()

BOOL WINAPI VDDQueryDMA ( _In_ HANDLE  hVdd,
_In_ WORD  iChannel,
_In_ PVDD_DMA_INFO  pDmaInfo 
)

◆ VDDReleaseIrqLine()

BOOL WINAPI VDDReleaseIrqLine ( _In_ HANDLE  hVdd,
_In_ WORD  IrqLine 
)

◆ VDDRequestDMA()

DWORD WINAPI VDDRequestDMA ( _In_ HANDLE  hVdd,
_In_ WORD  iChannel,
_Inout_ PVOID  Buffer,
_In_ DWORD  length 
)

◆ VDDReserveIrqLine()

WORD WINAPI VDDReserveIrqLine ( _In_ HANDLE  hVdd,
_In_ WORD  IrqLine 
)

◆ VDDSetDMA()

BOOL WINAPI VDDSetDMA ( _In_ HANDLE  hVdd,
_In_ WORD  iChannel,
_In_ WORD  fDMA,
_In_ PVDD_DMA_INFO  pDmaInfo 
)

◆ VDDSimulate16()

VOID WINAPI VDDSimulate16 ( VOID  )

Definition at line 670 of file emulator.c.

671{
672 CpuSimulate();
673}
VOID CpuSimulate(VOID)
Definition: cpu.c:167

◆ VDDTerminateVDM()

VOID WINAPI VDDTerminateVDM ( VOID  )

Definition at line 677 of file emulator.c.

678{
679 /* Stop the VDM */
681}
VOID EmulatorTerminate(VOID)
Definition: emulator.c:503

Referenced by RegisterVDD().

◆ VdmFlushCache()

BOOL WINAPI VdmFlushCache ( _In_ USHORT  Segment,
_In_ ULONG  Offset,
_In_ ULONG  Size,
_In_ VDM_MODE  Mode 
)

◆ VdmMapFlat()

PVOID WINAPI VdmMapFlat ( _In_ USHORT  Segment,
_In_ ULONG  Offset,
_In_ VDM_MODE  Mode 
)

Referenced by FindHookableMemory().

◆ VdmUnmapFlat()

BOOL WINAPI VdmUnmapFlat ( _In_ USHORT  Segment,
_In_ ULONG  Offset,
_In_ PVOID  Buffer,
_In_ VDM_MODE  Mode 
)

Referenced by FindHookableMemory(), and RegisterVDD().