From 53758386373d9060280117412525be5ecb750a2b Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 13 Apr 2003 18:34:21 +0000 Subject: [PATCH] Changes for new flags Always add a 0x67 handler incase ems is not loaded. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@917 --- src/cpu/callback.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index ce79268f..fcdd049a 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -52,8 +52,8 @@ Bitu CALLBACK_Allocate(void) { void CALLBACK_Idle(void) { /* this makes the cpu execute instructions to handle irq's and then come back */ - bool oldintf=flags.intf; - flags.intf=true; + Bitu oldIF=GETFLAG(IF); + SETFLAGBIT(IF,true); Bit16u oldcs=SegValue(cs); Bit32u oldeip=reg_eip; SegSet16(cs,CB_SEG); @@ -61,7 +61,7 @@ void CALLBACK_Idle(void) { DOSBOX_RunMachine(); reg_eip=oldeip; SegSet16(cs,oldcs); - flags.intf=oldintf; + SETFLAGBIT(IF,oldIF); if (CPU_CycleLeft<300) CPU_CycleLeft=1; else CPU_CycleLeft-=300; } @@ -174,6 +174,8 @@ void CALLBACK_Init(Section* sec) { for (i=0;i<0x40;i++) { real_writed(0,i*4,CALLBACK_RealPointer(call_default)); } + real_writed(0,0x67*4,CALLBACK_RealPointer(call_default)); + }