reactos/subsystems/ntvdm/io.h
Hermès Bélusca-Maïto da6f99a13c [NTVDM]
- Implement and export VDDInstallIOHook and VDDDeInstallIOHook; rework EmulatorRead/WriteIo to take into account for different port handlers' sizes (byte, word, dword). Still WIP and may be subject to renamings... RegisterIoPort needs to be converted.
- Stubplement and export getIntelRegistersPointer.
- Export c_get/setXX functions which are aliases to get/setXX functions, for MIPS NTVDM compatibility.

svn path=/branches/ntvdm/; revision=61358
2013-12-23 18:17:29 +00:00

63 lines
1.9 KiB
C

/*
* COPYRIGHT: GPL - See COPYING in the top level directory
* PROJECT: ReactOS Virtual DOS Machine
* FILE: io.c
* PURPOSE: I/O Port Handlers
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
#ifndef _IO_H_
#define _IO_H_
/* DEFINES ********************************************************************/
#define EMULATOR_MAX_IOPORTS_NUM 0x10000
/* FUNCTIONS ******************************************************************/
typedef UCHAR (WINAPI *EMULATOR_INB_PROC)(ULONG Port);
typedef USHORT (WINAPI *EMULATOR_INW_PROC)(ULONG Port);
typedef ULONG (WINAPI *EMULATOR_IND_PROC)(ULONG Port);
typedef VOID (WINAPI *EMULATOR_INSB_PROC)(ULONG Port, PUCHAR Buffer, ULONG Count);
typedef VOID (WINAPI *EMULATOR_INSW_PROC)(ULONG Port, PUSHORT Buffer, ULONG Count);
typedef VOID (WINAPI *EMULATOR_INSD_PROC)(ULONG Port, PULONG Buffer, ULONG Count);
typedef VOID (WINAPI *EMULATOR_OUTB_PROC)(ULONG Port, UCHAR Data);
typedef VOID (WINAPI *EMULATOR_OUTW_PROC)(ULONG Port, USHORT Data);
typedef VOID (WINAPI *EMULATOR_OUTD_PROC)(ULONG Port, ULONG Data);
typedef VOID (WINAPI *EMULATOR_OUTSB_PROC)(ULONG Port, PUCHAR Buffer, ULONG Count);
typedef VOID (WINAPI *EMULATOR_OUTSW_PROC)(ULONG Port, PUSHORT Buffer, ULONG Count);
typedef VOID (WINAPI *EMULATOR_OUTSD_PROC)(ULONG Port, PULONG Buffer, ULONG Count);
VOID RegisterIoPort(ULONG Port,
EMULATOR_INB_PROC InHandler,
EMULATOR_OUTB_PROC OutHandler);
VOID UnregisterIoPort(ULONG Port);
VOID WINAPI EmulatorReadIo
(
PFAST486_STATE State,
ULONG Port,
PVOID Buffer,
ULONG DataCount,
UCHAR DataSize
);
VOID WINAPI EmulatorWriteIo
(
PFAST486_STATE State,
ULONG Port,
PVOID Buffer,
ULONG DataCount,
UCHAR DataSize
);
#endif // _IO_H_
/* EOF */