Commit 9eb1d2c7 authored by Alexandre Julliard's avatar Alexandre Julliard

Moved I/O port handling to dlls/winedos.

parent 10aacbf3
......@@ -337,7 +337,10 @@ static BOOL INSTR_EmulateLDS( CONTEXT86 *context, BYTE *instr, int long_op,
*/
static DWORD INSTR_inport( WORD port, int size, CONTEXT86 *context )
{
DWORD res = IO_inport( port, size );
DWORD res = ~0U;
if (Dosvm.inport || DPMI_LoadDosSystem()) res = Dosvm.inport( port, size );
if (TRACE_ON(io))
{
switch(size)
......@@ -367,7 +370,8 @@ static DWORD INSTR_inport( WORD port, int size, CONTEXT86 *context )
*/
static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT86 *context )
{
IO_outport( port, size, val );
if (Dosvm.outport || DPMI_LoadDosSystem()) Dosvm.outport( port, size, val );
if (TRACE_ON(io))
{
switch(size)
......
......@@ -31,8 +31,6 @@ C_SRCS = \
$(TOPOBJDIR)/msdos/dosmem.c \
$(TOPOBJDIR)/msdos/dpmi.c \
$(TOPOBJDIR)/msdos/int21.c \
$(TOPOBJDIR)/msdos/ioports.c \
$(TOPOBJDIR)/msdos/ppdev.c \
$(TOPOBJDIR)/relay32/builtin32.c \
$(TOPOBJDIR)/relay32/relay386.c \
$(TOPOBJDIR)/relay32/snoop.c \
......
......@@ -46,6 +46,7 @@ C_SRCS = \
interrupts.c \
ioports.c \
module.c \
ppdev.c \
relay.c \
soundblaster.c \
timer.c \
......
......@@ -271,6 +271,11 @@ void DOSVM_BuildCallFrame( CONTEXT86 *, DOSRELAY, LPVOID );
extern void SB_ioport_out( WORD port, BYTE val );
extern BYTE SB_ioport_in( WORD port );
/* ppdev.c */
extern BOOL IO_pp_outp(int port, DWORD* res);
extern int IO_pp_inp(int port, DWORD* res);
extern char IO_pp_init(void);
/* timer.c */
extern void WINAPI DOSVM_Int08Handler(CONTEXT86*);
......
......@@ -28,8 +28,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(int);
/*
* FIXME: Move timer ioport handling here and remove
* Dosvm.GetTimer/Dosvm.SetTimer.
* FIXME: Use QueryPerformanceCounter for
* more precise GetTimer implementation.
* FIXME: Use QueryPerformanceCounter (or GetTimer implementation)
......@@ -96,7 +94,7 @@ static void WINAPI TIMER_DoSetTimer( ULONG_PTR arg )
/***********************************************************************
* GetTimer (WINEDOS.@)
* DOSVM_GetTimer
*/
UINT WINAPI DOSVM_GetTimer( void )
{
......@@ -117,7 +115,7 @@ UINT WINAPI DOSVM_GetTimer( void )
/***********************************************************************
* SetTimer (WINEDOS.@)
* DOSVM_SetTimer
*/
void WINAPI DOSVM_SetTimer( UINT ticks )
{
......
......@@ -4,7 +4,5 @@
@ stdcall CallBuiltinHandler(ptr long) DOSVM_CallBuiltinHandler
# I/O functions
@ stdcall SetTimer(long) DOSVM_SetTimer
@ stdcall GetTimer() DOSVM_GetTimer
@ stdcall inport(long long ptr) DOSVM_inport
@ stdcall inport(long long) DOSVM_inport
@ stdcall outport(long long long) DOSVM_outport
......@@ -31,10 +31,8 @@ typedef struct {
void (WINAPI *CallBuiltinHandler)( CONTEXT86 *context, BYTE intnum );
/* I/O functions */
void (WINAPI *SetTimer)( unsigned ticks );
unsigned (WINAPI *GetTimer)( void );
BOOL (WINAPI *inport)( int port, int size, DWORD *res );
BOOL (WINAPI *outport)( int port, int size, DWORD val );
DWORD (WINAPI *inport)( int port, int size );
void (WINAPI *outport)( int port, int size, DWORD val );
} DOSVM_TABLE;
extern DOSVM_TABLE Dosvm;
......
......@@ -107,18 +107,9 @@ extern UINT DOSMEM_MapLinearToDos(LPVOID); /* linear Wine to DOS */
/* memory/instr.c */
extern DWORD INSTR_EmulateInstruction( EXCEPTION_RECORD *rec, CONTEXT86 *context );
/* msdos/ioports.c */
extern DWORD IO_inport( int port, int count );
extern void IO_outport( int port, int count, DWORD value );
/* msdos/dpmi.c */
extern BOOL DPMI_LoadDosSystem(void);
/* misc/ppdev.c */
extern BOOL IO_pp_outp(int port, DWORD* res);
extern int IO_pp_inp(int port, DWORD* res);
extern char IO_pp_init(void);
#define PTR_REAL_TO_LIN(seg,off) \
((void*)(((unsigned int)(seg) << 4) + LOWORD(off)))
......
......@@ -48,8 +48,6 @@ BOOL DPMI_LoadDosSystem(void)
}
#define GET_ADDR(func) Dosvm.func = (void *)GetProcAddress(DosModule, #func);
GET_ADDR(SetTimer);
GET_ADDR(GetTimer);
GET_ADDR(inport);
GET_ADDR(outport);
GET_ADDR(EmulateInterruptPM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment