mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 12:45:16 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
Rewrite the VGA emulation. Nah, it's a joke! - Store VGA registers setup in VGA_REGISTERS structure. - Improve BiosSetVideoMode and introduce a VgaSetRegisters function for setting VGA regs. - Initialize Bda->CrtBasePort: it is used to determine the address of some I/O ports which depend on whether we are in color or monochrome mode. - Add UnregisterIoPort in io.c (and fix some DPRINTs) (needed for VGA). - When setting the misc. VGA register, check whether we're going to monochrome emulation, and reset some port addresses in that case. svn path=/branches/ntvdm/; revision=61246
49 lines
1.2 KiB
C
49 lines
1.2 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 BYTE (WINAPI *EMULATOR_IN_PROC)(ULONG Port);
|
|
typedef VOID (WINAPI *EMULATOR_OUT_PROC)(ULONG Port, BYTE Data);
|
|
|
|
VOID WINAPI RegisterIoPort(ULONG Port,
|
|
EMULATOR_IN_PROC InHandler,
|
|
EMULATOR_OUT_PROC OutHandler);
|
|
|
|
VOID WINAPI 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 */
|