Skip to content
Snippets Groups Projects
Commit 3c9d9182 authored by Jukka Heinonen's avatar Jukka Heinonen Committed by Alexandre Julliard
Browse files

Ignore VCPI installation checks. Handle XMS query any extended memory

function. Add stubs for get/set exception handler vector.
parent 6a216d0e
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
......@@ -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);
}
......
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment