From 9a4a06ff30e20e4b75ac03f3e333382d608c2cf3 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Mon, 21 Oct 2002 21:59:33 +0000 Subject: [PATCH] Added faked support for set event wait flag int 15 call. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@390 --- src/ints/bios.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index aa8ac9d5..a02c2454 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -22,7 +22,7 @@ #include "callback.h" #include "inout.h" #include "mem.h" - +#include "timer.h" static Bitu call_int1a,call_int11,call_int8,call_int17,call_int12,call_int15,call_int1c; @@ -136,6 +136,12 @@ static Bitu INT17_Handler(void) { return CBRET_NONE; }; +static void WaitFlagEvent(void) { + PhysPt where=Real2Phys(mem_readd(BIOS_WAIT_FLAG_POINTER)); + mem_writeb(where,mem_readb(where)|0x80); + mem_writeb(BIOS_WAIT_FLAG_ACTIVE,0); +} + static Bitu INT15_Handler(void) { switch (reg_ah) { case 0x06: @@ -149,6 +155,12 @@ static Bitu INT15_Handler(void) { /* Carry should be set but let's just set it just in case */ CALLBACK_SCF(true); break; + case 0x83: /* BIOS - SET EVENT WAIT INTERVAL */ + mem_writed(BIOS_WAIT_FLAG_POINTER,RealMake(SegValue(es),reg_bx)); + mem_writed(BIOS_WAIT_FLAG_COUNT,reg_cx<<16|reg_dx); + mem_writeb(BIOS_WAIT_FLAG_ACTIVE,1); + TIMER_RegisterDelayHandler(&WaitFlagEvent,reg_cx<<16|reg_dx); + break; case 0x84: /* BIOS - JOYSTICK SUPPORT (XT after 11/8/82,AT,XT286,PS) */ //Does anyone even use this? LOG_WARN("INT15:84:Bios Joystick functionality not done"); @@ -181,6 +193,8 @@ static Bitu INT15_Handler(void) { break; default: LOG_WARN("INT15:Unknown call %2X",reg_ah); + reg_ah=0x86; + CALLBACK_SCF(false); } return CBRET_NONE; };