mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[FAST486][NTVDM]
Arch, I/O port numbers should always be stored in USHORT variables! svn path=/trunk/; revision=64917
This commit is contained in:
parent
03b386d0e0
commit
f991665f09
10 changed files with 60 additions and 60 deletions
|
@ -190,7 +190,7 @@ VOID
|
|||
(NTAPI *FAST486_IO_READ_PROC)
|
||||
(
|
||||
PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize
|
||||
|
@ -201,7 +201,7 @@ VOID
|
|||
(NTAPI *FAST486_IO_WRITE_PROC)
|
||||
(
|
||||
PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize
|
||||
|
|
|
@ -149,7 +149,7 @@ Fast486MemWriteCallback(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG
|
|||
|
||||
static VOID
|
||||
NTAPI
|
||||
Fast486IoReadCallback(PFAST486_STATE State, ULONG Port, PVOID Buffer, ULONG DataCount, UCHAR DataSize)
|
||||
Fast486IoReadCallback(PFAST486_STATE State, USHORT Port, PVOID Buffer, ULONG DataCount, UCHAR DataSize)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(State);
|
||||
UNREFERENCED_PARAMETER(Port);
|
||||
|
@ -160,7 +160,7 @@ Fast486IoReadCallback(PFAST486_STATE State, ULONG Port, PVOID Buffer, ULONG Data
|
|||
|
||||
static VOID
|
||||
NTAPI
|
||||
Fast486IoWriteCallback(PFAST486_STATE State, ULONG Port, PVOID Buffer, ULONG DataCount, UCHAR DataSize)
|
||||
Fast486IoWriteCallback(PFAST486_STATE State, USHORT Port, PVOID Buffer, ULONG DataCount, UCHAR DataSize)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(State);
|
||||
UNREFERENCED_PARAMETER(Port);
|
||||
|
|
|
@ -273,12 +273,12 @@ static VOID WINAPI EmulatorDebugBreakBop(LPWORD Stack)
|
|||
DebugBreak();
|
||||
}
|
||||
|
||||
static BYTE WINAPI Port61hRead(ULONG Port)
|
||||
static BYTE WINAPI Port61hRead(USHORT Port)
|
||||
{
|
||||
return Port61hState;
|
||||
}
|
||||
|
||||
static VOID WINAPI Port61hWrite(ULONG Port, BYTE Data)
|
||||
static VOID WINAPI Port61hWrite(USHORT Port, BYTE Data)
|
||||
{
|
||||
// BOOLEAN SpeakerStateChange = FALSE;
|
||||
BYTE OldPort61hState = Port61hState;
|
||||
|
|
|
@ -342,13 +342,13 @@ VOID CmosWriteData(BYTE Value)
|
|||
SelectedRegister = CMOS_REG_STATUS_D;
|
||||
}
|
||||
|
||||
BYTE WINAPI CmosReadPort(ULONG Port)
|
||||
BYTE WINAPI CmosReadPort(USHORT Port)
|
||||
{
|
||||
ASSERT(Port == CMOS_DATA_PORT);
|
||||
return CmosReadData();
|
||||
}
|
||||
|
||||
VOID WINAPI CmosWritePort(ULONG Port, BYTE Data)
|
||||
VOID WINAPI CmosWritePort(USHORT Port, BYTE Data)
|
||||
{
|
||||
if (Port == CMOS_ADDRESS_PORT)
|
||||
CmosWriteAddress(Data);
|
||||
|
|
|
@ -154,7 +154,7 @@ static VOID PicWriteData(BYTE Port, BYTE Value)
|
|||
Pic->Initialization = FALSE;
|
||||
}
|
||||
|
||||
static BYTE WINAPI PicReadPort(ULONG Port)
|
||||
static BYTE WINAPI PicReadPort(USHORT Port)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ static BYTE WINAPI PicReadPort(ULONG Port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static VOID WINAPI PicWritePort(ULONG Port, BYTE Data)
|
||||
static VOID WINAPI PicWritePort(USHORT Port, BYTE Data)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ static VOID PS2SendCommand(PPS2_PORT Port, BYTE Command)
|
|||
if (Port->DeviceCommand) Port->DeviceCommand(Port->Param, Command);
|
||||
}
|
||||
|
||||
static BYTE WINAPI PS2ReadPort(ULONG Port)
|
||||
static BYTE WINAPI PS2ReadPort(USHORT Port)
|
||||
{
|
||||
if (Port == PS2_CONTROL_PORT)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ static BYTE WINAPI PS2ReadPort(ULONG Port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static VOID WINAPI PS2WritePort(ULONG Port, BYTE Data)
|
||||
static VOID WINAPI PS2WritePort(USHORT Port, BYTE Data)
|
||||
{
|
||||
if (Port == PS2_CONTROL_PORT)
|
||||
{
|
||||
|
|
|
@ -275,7 +275,7 @@ static VOID PitWriteData(BYTE Channel, BYTE Value)
|
|||
}
|
||||
}
|
||||
|
||||
static BYTE WINAPI PitReadPort(ULONG Port)
|
||||
static BYTE WINAPI PitReadPort(USHORT Port)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ static BYTE WINAPI PitReadPort(ULONG Port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static VOID WINAPI PitWritePort(ULONG Port, BYTE Data)
|
||||
static VOID WINAPI PitWritePort(USHORT Port, BYTE Data)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
|
|
|
@ -1462,7 +1462,7 @@ static VOID VgaUpdateTextCursor(VOID)
|
|||
CursorMoved = FALSE;
|
||||
}
|
||||
|
||||
static BYTE WINAPI VgaReadPort(ULONG Port)
|
||||
static BYTE WINAPI VgaReadPort(USHORT Port)
|
||||
{
|
||||
DPRINT("VgaReadPort: Port 0x%X\n", Port);
|
||||
|
||||
|
@ -1554,7 +1554,7 @@ static BYTE WINAPI VgaReadPort(ULONG Port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static VOID WINAPI VgaWritePort(ULONG Port, BYTE Data)
|
||||
static VOID WINAPI VgaWritePort(USHORT Port, BYTE Data)
|
||||
{
|
||||
DPRINT("VgaWritePort: Port 0x%X, Data 0x%02X\n", Port, Data);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ EMULATOR_IOPORT_HANDLERS IoPortProc[EMULATOR_MAX_IOPORTS_NUM] = {{NULL}};
|
|||
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||
|
||||
UCHAR
|
||||
IOReadB(ULONG Port)
|
||||
IOReadB(USHORT Port)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
IoPortProc[Port].IoHandlers.InB)
|
||||
|
@ -82,7 +82,7 @@ IOReadB(ULONG Port)
|
|||
}
|
||||
|
||||
VOID
|
||||
IOReadStrB(ULONG Port,
|
||||
IOReadStrB(USHORT Port,
|
||||
PUCHAR Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ IOReadStrB(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteB(ULONG Port,
|
||||
IOWriteB(USHORT Port,
|
||||
UCHAR Buffer)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
|
@ -127,7 +127,7 @@ IOWriteB(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteStrB(ULONG Port,
|
||||
IOWriteStrB(USHORT Port,
|
||||
PUCHAR Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ IOWriteStrB(ULONG Port,
|
|||
}
|
||||
|
||||
USHORT
|
||||
IOReadW(ULONG Port)
|
||||
IOReadW(USHORT Port)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
IoPortProc[Port].IoHandlers.InW)
|
||||
|
@ -177,7 +177,7 @@ IOReadW(ULONG Port)
|
|||
}
|
||||
|
||||
VOID
|
||||
IOReadStrW(ULONG Port,
|
||||
IOReadStrW(USHORT Port,
|
||||
PUSHORT Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -200,7 +200,7 @@ IOReadStrW(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteW(ULONG Port,
|
||||
IOWriteW(USHORT Port,
|
||||
USHORT Buffer)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
|
@ -223,7 +223,7 @@ IOWriteW(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteStrW(ULONG Port,
|
||||
IOWriteStrW(USHORT Port,
|
||||
PUSHORT Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ IOWriteStrW(ULONG Port,
|
|||
}
|
||||
|
||||
ULONG
|
||||
IOReadD(ULONG Port)
|
||||
IOReadD(USHORT Port)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
IoPortProc[Port].IoHandlers.InD)
|
||||
|
@ -265,7 +265,7 @@ IOReadD(ULONG Port)
|
|||
}
|
||||
|
||||
VOID
|
||||
IOReadStrD(ULONG Port,
|
||||
IOReadStrD(USHORT Port,
|
||||
PULONG Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -281,7 +281,7 @@ IOReadStrD(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteD(ULONG Port,
|
||||
IOWriteD(USHORT Port,
|
||||
ULONG Buffer)
|
||||
{
|
||||
if (IoPortProc[Port].hVdd == INVALID_HANDLE_VALUE &&
|
||||
|
@ -298,7 +298,7 @@ IOWriteD(ULONG Port,
|
|||
}
|
||||
|
||||
VOID
|
||||
IOWriteStrD(ULONG Port,
|
||||
IOWriteStrD(USHORT Port,
|
||||
PULONG Buffer,
|
||||
ULONG Count)
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ IOWriteStrD(ULONG Port,
|
|||
}
|
||||
|
||||
|
||||
VOID RegisterIoPort(ULONG Port,
|
||||
VOID RegisterIoPort(USHORT Port,
|
||||
EMULATOR_INB_PROC InHandler,
|
||||
EMULATOR_OUTB_PROC OutHandler)
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ VOID RegisterIoPort(ULONG Port,
|
|||
IoPortProc[Port].hVdd = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
VOID UnregisterIoPort(ULONG Port)
|
||||
VOID UnregisterIoPort(USHORT Port)
|
||||
{
|
||||
/*
|
||||
* Put automagically all the fields to zero:
|
||||
|
@ -344,7 +344,7 @@ VOID UnregisterIoPort(ULONG Port)
|
|||
|
||||
VOID WINAPI
|
||||
EmulatorReadIo(PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize)
|
||||
|
@ -419,7 +419,7 @@ EmulatorReadIo(PFAST486_STATE State,
|
|||
|
||||
VOID WINAPI
|
||||
EmulatorWriteIo(PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize)
|
||||
|
|
|
@ -16,79 +16,79 @@
|
|||
|
||||
/* 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 UCHAR (WINAPI *EMULATOR_INB_PROC)(USHORT Port);
|
||||
typedef USHORT (WINAPI *EMULATOR_INW_PROC)(USHORT Port);
|
||||
typedef ULONG (WINAPI *EMULATOR_IND_PROC)(USHORT 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_INSB_PROC)(USHORT Port, PUCHAR Buffer, ULONG Count);
|
||||
typedef VOID (WINAPI *EMULATOR_INSW_PROC)(USHORT Port, PUSHORT Buffer, ULONG Count);
|
||||
typedef VOID (WINAPI *EMULATOR_INSD_PROC)(USHORT 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_OUTB_PROC)(USHORT Port, UCHAR Data);
|
||||
typedef VOID (WINAPI *EMULATOR_OUTW_PROC)(USHORT Port, USHORT Data);
|
||||
typedef VOID (WINAPI *EMULATOR_OUTD_PROC)(USHORT 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);
|
||||
typedef VOID (WINAPI *EMULATOR_OUTSB_PROC)(USHORT Port, PUCHAR Buffer, ULONG Count);
|
||||
typedef VOID (WINAPI *EMULATOR_OUTSW_PROC)(USHORT Port, PUSHORT Buffer, ULONG Count);
|
||||
typedef VOID (WINAPI *EMULATOR_OUTSD_PROC)(USHORT Port, PULONG Buffer, ULONG Count);
|
||||
|
||||
|
||||
UCHAR
|
||||
IOReadB(ULONG Port);
|
||||
IOReadB(USHORT Port);
|
||||
VOID
|
||||
IOReadStrB(ULONG Port,
|
||||
IOReadStrB(USHORT Port,
|
||||
PUCHAR Buffer,
|
||||
ULONG Count);
|
||||
|
||||
VOID
|
||||
IOWriteB(ULONG Port,
|
||||
IOWriteB(USHORT Port,
|
||||
UCHAR Buffer);
|
||||
VOID
|
||||
IOWriteStrB(ULONG Port,
|
||||
IOWriteStrB(USHORT Port,
|
||||
PUCHAR Buffer,
|
||||
ULONG Count);
|
||||
|
||||
USHORT
|
||||
IOReadW(ULONG Port);
|
||||
IOReadW(USHORT Port);
|
||||
VOID
|
||||
IOReadStrW(ULONG Port,
|
||||
IOReadStrW(USHORT Port,
|
||||
PUSHORT Buffer,
|
||||
ULONG Count);
|
||||
|
||||
VOID
|
||||
IOWriteW(ULONG Port,
|
||||
IOWriteW(USHORT Port,
|
||||
USHORT Buffer);
|
||||
VOID
|
||||
IOWriteStrW(ULONG Port,
|
||||
IOWriteStrW(USHORT Port,
|
||||
PUSHORT Buffer,
|
||||
ULONG Count);
|
||||
|
||||
ULONG
|
||||
IOReadD(ULONG Port);
|
||||
IOReadD(USHORT Port);
|
||||
VOID
|
||||
IOReadStrD(ULONG Port,
|
||||
IOReadStrD(USHORT Port,
|
||||
PULONG Buffer,
|
||||
ULONG Count);
|
||||
|
||||
VOID
|
||||
IOWriteD(ULONG Port,
|
||||
IOWriteD(USHORT Port,
|
||||
ULONG Buffer);
|
||||
VOID
|
||||
IOWriteStrD(ULONG Port,
|
||||
IOWriteStrD(USHORT Port,
|
||||
PULONG Buffer,
|
||||
ULONG Count);
|
||||
|
||||
|
||||
VOID RegisterIoPort(ULONG Port,
|
||||
VOID RegisterIoPort(USHORT Port,
|
||||
EMULATOR_INB_PROC InHandler,
|
||||
EMULATOR_OUTB_PROC OutHandler);
|
||||
|
||||
VOID UnregisterIoPort(ULONG Port);
|
||||
VOID UnregisterIoPort(USHORT Port);
|
||||
|
||||
VOID WINAPI EmulatorReadIo
|
||||
(
|
||||
PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize
|
||||
|
@ -97,7 +97,7 @@ VOID WINAPI EmulatorReadIo
|
|||
VOID WINAPI EmulatorWriteIo
|
||||
(
|
||||
PFAST486_STATE State,
|
||||
ULONG Port,
|
||||
USHORT Port,
|
||||
PVOID Buffer,
|
||||
ULONG DataCount,
|
||||
UCHAR DataSize
|
||||
|
|
Loading…
Reference in a new issue