From 8fa4a2d43a3180bbae71b1d7e20de2c3690dea9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Tue, 3 Mar 2009 18:30:41 +0000 Subject: [PATCH] clear direction flag when entering ps2 irq routine (needed when irq happens if direction flag is set and the user subroutine assumes DF to be clear), thanks to ripsaw for figuring this out Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3313 --- src/cpu/callback.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index cda77a75..fd88711f 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: callback.cpp,v 1.39 2009-01-18 13:57:45 c2woody Exp $ */ +/* $Id: callback.cpp,v 1.40 2009-03-03 18:30:41 c2woody Exp $ */ #include #include @@ -268,11 +268,12 @@ Bitu CALLBACK_SetupExtra(Bitu callback, Bitu type, PhysPt physAddress, bool use_ phys_writeb(physAddress+0x00,(Bit8u)0x1e); // push ds phys_writeb(physAddress+0x01,(Bit8u)0x06); // push es phys_writew(physAddress+0x02,(Bit16u)0x6066); // pushad - phys_writeb(physAddress+0x04,(Bit8u)0xfb); // sti - phys_writeb(physAddress+0x05,(Bit8u)0xFE); //GRP 4 - phys_writeb(physAddress+0x06,(Bit8u)0x38); //Extra Callback instruction - phys_writew(physAddress+0x07,callback); //The immediate word - return 0x09; + phys_writeb(physAddress+0x04,(Bit8u)0xfc); // cld + phys_writeb(physAddress+0x05,(Bit8u)0xfb); // sti + phys_writeb(physAddress+0x06,(Bit8u)0xFE); //GRP 4 + phys_writeb(physAddress+0x07,(Bit8u)0x38); //Extra Callback instruction + phys_writew(physAddress+0x08,callback); //The immediate word + return 0x0a; case CB_IRQ12_RET: // ps2 mouse int74 return if (use_cb) { phys_writeb(physAddress+0x00,(Bit8u)0xFE); //GRP 4