Commit a098c82a authored by Alexandre Julliard's avatar Alexandre Julliard

Moved vxd support to winedos.

parent 575dbfa7
...@@ -429,7 +429,7 @@ joystick.drv$(DLLEXT): winmm/joystick/joystick.drv$(DLLEXT) ...@@ -429,7 +429,7 @@ joystick.drv$(DLLEXT): winmm/joystick/joystick.drv$(DLLEXT)
kernel32.dll$(DLLEXT) comm.dll$(DLLEXT) krnl386.exe$(DLLEXT) \ kernel32.dll$(DLLEXT) comm.dll$(DLLEXT) krnl386.exe$(DLLEXT) \
stress.dll$(DLLEXT) system.dll$(DLLEXT) toolhelp.dll$(DLLEXT) \ stress.dll$(DLLEXT) system.dll$(DLLEXT) toolhelp.dll$(DLLEXT) \
win87em.dll$(DLLEXT) windebug.dll$(DLLEXT) wprocs.dll$(DLLEXT): kernel/kernel32.dll$(DLLEXT) win87em.dll$(DLLEXT) windebug.dll$(DLLEXT): kernel/kernel32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) kernel/kernel32.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) kernel/kernel32.dll$(DLLEXT) $@
lz32.dll$(DLLEXT) lzexpand.dll$(DLLEXT): lzexpand/lz32.dll$(DLLEXT) lz32.dll$(DLLEXT) lzexpand.dll$(DLLEXT): lzexpand/lz32.dll$(DLLEXT)
...@@ -606,7 +606,7 @@ winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT) ...@@ -606,7 +606,7 @@ winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT)
wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT) wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/wineaudioio/wineaudioio.drv$(DLLEXT) $@ $(RM) $@ && $(LN_S) winmm/wineaudioio/wineaudioio.drv$(DLLEXT) $@
winedos.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT) winedos.dll$(DLLEXT) wprocs.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT)
$(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@
winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT) winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT)
......
...@@ -11,4 +11,3 @@ toolhelp.spec.c ...@@ -11,4 +11,3 @@ toolhelp.spec.c
version16.res version16.res
win87em.spec.c win87em.spec.c
windebug.spec.c windebug.spec.c
wprocs.spec.c
...@@ -5,7 +5,7 @@ SRCDIR = @srcdir@ ...@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = kernel32.dll MODULE = kernel32.dll
IMPORTS = ntdll IMPORTS = ntdll
ALTNAMES = krnl386.exe comm.dll stress.dll system.dll toolhelp.dll windebug.dll win87em.dll wprocs.dll ALTNAMES = krnl386.exe comm.dll stress.dll system.dll toolhelp.dll windebug.dll win87em.dll
LDIMPORTS = ntdll.dll LDIMPORTS = ntdll.dll
EXTRALIBS = $(LIBUNICODE) EXTRALIBS = $(LIBUNICODE)
DLLMAIN = MAIN_KernelInit DLLMAIN = MAIN_KernelInit
...@@ -17,8 +17,7 @@ SPEC_SRCS16 = \ ...@@ -17,8 +17,7 @@ SPEC_SRCS16 = \
system.spec \ system.spec \
toolhelp.spec \ toolhelp.spec \
win87em.spec \ win87em.spec \
windebug.spec \ windebug.spec
wprocs.spec
C_SRCS = \ C_SRCS = \
$(TOPOBJDIR)/ole/ole2nls.c \ $(TOPOBJDIR)/ole/ole2nls.c \
......
...@@ -46,7 +46,6 @@ C_SRCS = \ ...@@ -46,7 +46,6 @@ C_SRCS = \
$(TOPOBJDIR)/msdos/int21.c \ $(TOPOBJDIR)/msdos/int21.c \
$(TOPOBJDIR)/msdos/ioports.c \ $(TOPOBJDIR)/msdos/ioports.c \
$(TOPOBJDIR)/msdos/ppdev.c \ $(TOPOBJDIR)/msdos/ppdev.c \
$(TOPOBJDIR)/msdos/vxd.c \
$(TOPOBJDIR)/relay32/builtin32.c \ $(TOPOBJDIR)/relay32/builtin32.c \
$(TOPOBJDIR)/relay32/relay386.c \ $(TOPOBJDIR)/relay32/relay386.c \
$(TOPOBJDIR)/relay32/snoop.c \ $(TOPOBJDIR)/relay32/snoop.c \
......
...@@ -3,3 +3,4 @@ winedos.dll.dbg.c ...@@ -3,3 +3,4 @@ winedos.dll.dbg.c
winedos.spec.c winedos.spec.c
winedos.spec.def winedos.spec.def
winedos16.spec.c winedos16.spec.c
wprocs.spec.c
...@@ -4,11 +4,14 @@ SRCDIR = @srcdir@ ...@@ -4,11 +4,14 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = winedos.dll MODULE = winedos.dll
IMPORTS = user32 advapi32 kernel32 ntdll IMPORTS = user32 advapi32 kernel32 ntdll
ALTNAMES = wprocs.dll
EXTRALIBS = $(LIBUNICODE) EXTRALIBS = $(LIBUNICODE)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
SPEC_SRCS16 = wprocs.spec
C_SRCS = \ C_SRCS = \
devices.c \ devices.c \
dma.c \ dma.c \
...@@ -46,6 +49,7 @@ C_SRCS = \ ...@@ -46,6 +49,7 @@ C_SRCS = \
relay.c \ relay.c \
soundblaster.c \ soundblaster.c \
vga.c \ vga.c \
vxd.c \
xms.c xms.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
......
...@@ -395,14 +395,29 @@ void WINAPI VXD_Timer( CONTEXT86 *context ) ...@@ -395,14 +395,29 @@ void WINAPI VXD_Timer( CONTEXT86 *context )
} }
} }
/***********************************************************************
* timer_thread
*/
static DWORD CALLBACK timer_thread( void *arg )
{
DWORD *system_time = arg;
for (;;)
{
*system_time = GetTickCount();
Sleep( 55 );
}
}
/*********************************************************************** /***********************************************************************
* VXD_TimerAPI (WPROCS.1490) * VXD_TimerAPI (WPROCS.1490)
*/ */
static DWORD System_Time = 0;
static WORD System_Time_Selector = 0;
static void System_Time_Tick( WORD timer ) { System_Time += 55; }
void WINAPI VXD_TimerAPI ( CONTEXT86 *context ) void WINAPI VXD_TimerAPI ( CONTEXT86 *context )
{ {
static WORD System_Time_Selector;
unsigned service = AX_reg(context); unsigned service = AX_reg(context);
TRACE("[%04x] TimerAPI\n", (UINT16)service); TRACE("[%04x] TimerAPI\n", (UINT16)service);
...@@ -417,10 +432,10 @@ void WINAPI VXD_TimerAPI ( CONTEXT86 *context ) ...@@ -417,10 +432,10 @@ void WINAPI VXD_TimerAPI ( CONTEXT86 *context )
case 0x0009: /* get system time selector */ case 0x0009: /* get system time selector */
if ( !System_Time_Selector ) if ( !System_Time_Selector )
{ {
System_Time_Selector = SELECTOR_AllocBlock( &System_Time, sizeof(DWORD), WINE_LDT_FLAGS_DATA ); HANDLE16 handle = GlobalAlloc16( GMEM_FIXED, sizeof(DWORD) );
CreateSystemTimer( 55, System_Time_Tick ); System_Time_Selector = handle | 7;
CloseHandle( CreateThread( NULL, 0, timer_thread, GlobalLock16(handle), 0, NULL ) );
} }
SET_AX( context, System_Time_Selector ); SET_AX( context, System_Time_Selector );
RESET_CFLAG(context); RESET_CFLAG(context);
break; break;
......
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