From 3c9d9182ebf8301a772909c3deb8ab3e68e10c0d Mon Sep 17 00:00:00 2001 From: Jukka Heinonen Date: Mon, 4 Nov 2002 22:35:36 +0000 Subject: [PATCH] Ignore VCPI installation checks. Handle XMS query any extended memory function. Add stubs for get/set exception handler vector. --- dlls/winedos/int31.c | 29 ++++++++++++++++++++++++++++- dlls/winedos/int67.c | 15 +++++++++++++++ dlls/winedos/xms.c | 18 ++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/dlls/winedos/int31.c b/dlls/winedos/int31.c index 75fab2a9310..1be16cc969c 100644 --- a/dlls/winedos/int31.c +++ b/dlls/winedos/int31.c @@ -438,7 +438,8 @@ static void StartPM( CONTEXT86 *context ) pm_ctx.SegFs = 0; pm_ctx.SegGs = 0; - TRACE("DOS program is now entering protected mode\n"); + TRACE("DOS program is now entering %d-bit protected mode\n", + DOSVM_IsDos32() ? 32 : 16); wine_call_to_16_regs_short(&pm_ctx, 0); /* in the current state of affairs, we won't ever actually return here... */ @@ -677,6 +678,32 @@ void WINAPI DOSVM_Int31Handler( CONTEXT86 *context ) RESET_CFLAG(context); switch(AX_reg(context)) { + case 0x0008: /* Set selector limit */ + { + DWORD limit = MAKELONG( DX_reg(context), CX_reg(context) ); + TRACE( "set selector limit (0x%04x,0x%08lx)\n", + BX_reg(context), limit ); + SetSelectorLimit16( BX_reg(context), limit ); + } + break; + + case 0x0202: /* Get Processor Exception Handler Vector */ + FIXME( "Get Processor Exception Handler Vector (0x%02x)\n", + BL_reg(context) ); + if (DOSVM_IsDos32()) { + SET_CX( context, 0 ); + context->Edx = 0; + } else { + SET_CX( context, 0 ); + SET_DX( context, 0 ); + } + break; + + case 0x0203: /* Set Processor Exception Handler Vector */ + FIXME( "Set Processor Exception Handler Vector (0x%02x)\n", + BL_reg(context) ); + break; + case 0x0204: /* Get protected mode interrupt vector */ TRACE("get protected mode interrupt handler (0x%02x)\n", BL_reg(context)); diff --git a/dlls/winedos/int67.c b/dlls/winedos/int67.c index d4b51e0b059..c14158e71b3 100644 --- a/dlls/winedos/int67.c +++ b/dlls/winedos/int67.c @@ -436,6 +436,21 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context ) case 0x5b: /* EMS 4.0 - ALTERNATE MAP REGISTER SET */ case 0x5c: /* EMS 4.0 - PREPARE EXPANDED MEMORY HARDWARE FOR WARM BOOT */ case 0x5d: /* EMS 4.0 - ENABLE/DISABLE OS FUNCTION SET FUNCTIONS */ + INT_BARF(context,0x67); + break; + + case 0xde: /* Virtual Control Program Interface (VCPI) */ + if(AL_reg(context) == 0x00) { + /* + * VCPI INSTALLATION CHECK + * (AH_reg() != 0) means VCPI is not present + */ + TRACE("- VCPI installation check\n"); + return; + } else + INT_BARF(context,0x67); + break; + default: INT_BARF(context,0x67); } diff --git a/dlls/winedos/xms.c b/dlls/winedos/xms.c index 74049404052..b9ce65f7158 100644 --- a/dlls/winedos/xms.c +++ b/dlls/winedos/xms.c @@ -104,6 +104,24 @@ void WINAPI XMS_Handler( CONTEXT86 *context ) if (move->Dest.Handle) GlobalUnlock16(move->Dest.Handle); break; } + case 0x88: /* Query Any Free Extended Memory */ + { + MEMORYSTATUS status; + SYSTEM_INFO info; + + TRACE("query any free extended memory\n"); + + GlobalMemoryStatus( &status ); + GetSystemInfo( &info ); + context->Eax = status.dwAvailVirtual >> 10; + context->Edx = status.dwAvailVirtual >> 10; + context->Ecx = (DWORD)info.lpMaximumApplicationAddress; + SET_BL( context, 0 ); /* No errors. */ + + TRACE("returning largest %ldK, total %ldK, highest 0x%lx\n", + context->Eax, context->Edx, context->Ecx); + } + break; default: INT_BARF( context, 0x31 ); SET_AX( context, 0x0000 ); /* failure */