> Check out the content of vga.c (in 
> dlls/winedos), you have most of the code you need.
> However, int33 mouse hide/show should cooperate with
> the vga layer.

OK, here's a first draft at a patch. Created with
reference to my old copies of Ralph Brown's Interrupt
List.

Cheers,
Chris


        
        
                
___________________________________________________________ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com
Index: dlls/winedos/int33.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int33.c,v
retrieving revision 1.15
diff -u -u -r1.15 int33.c
--- dlls/winedos/int33.c	27 Oct 2003 22:06:27 -0000	1.15
+++ dlls/winedos/int33.c	4 Sep 2004 22:57:44 -0000
@@ -67,6 +67,33 @@
 
 
 /**********************************************************************
+ *          INT33_ShowMouse
+ *
+ * Handler for:
+ * - subfunction 0x01 (show mouse)
+ * - subfunction 0x02 (hide mouse)
+ */
+static BOOL INT33_ShowMouseCursor( BOOL show )
+{
+    HANDLE hCon = VGA_AlphaConsole();
+    BOOL ret = FALSE;
+
+    if (hCon != INVALID_HANDLE_VALUE)
+    {
+        CONSOLE_CURSOR_INFO cci;
+
+        if (GetConsoleCursorInfo(hCon, &cci))
+        {
+            cci.bVisible = show;
+            ret = SetConsoleCursorInfo(hCon, &cci);
+        }
+    }
+
+    return ret;
+}
+
+
+/**********************************************************************
  *	    DOSVM_Int33Handler (WINEDOS16.151)
  *
  * Handler for int 33h (MS MOUSE).
@@ -81,11 +108,13 @@
         break;
 
     case 0x0001:
-        FIXME("Show mouse cursor\n");
+        TRACE("Show mouse cursor\n");
+        INT33_ShowMouseCursor(TRUE);
         break;
 
     case 0x0002:
-        FIXME("Hide mouse cursor\n");
+        TRACE("Hide mouse cursor\n");
+        INT33_ShowMouseCursor(FALSE);
         break;
 
     case 0x0003:
@@ -97,7 +126,13 @@
         break;
 
     case 0x0004:
-        FIXME("Position mouse cursor\n");
+        TRACE("Position mouse cursor\n");
+        if (INT33_ShowMouseCursor(FALSE))
+        {
+            mouse_info.x = CX_reg(context);
+            mouse_info.y = DX_reg(context);
+            INT33_ShowMouseCursor(TRUE);
+        }
         break;
 
     case 0x0005:
@@ -168,7 +203,54 @@
         break;
 
     case 0x0010:
+        /*
+         * IN:
+         * CX,DX = X, Y coords of upper left corner
+         * SI,DI = X, Y coords of lower right corner
+         */
         FIXME("Define screen region for update\n");
+        break;
+
+    case 0x0014:
+        TRACE("Exchange Interrupt Subroutines\n");
+        {
+            WORD oldMask = mouse_info.callmask;
+            FARPROC16 oldHandler = mouse_info.callback;
+
+            mouse_info.callmask = CX_reg(context);
+            mouse_info.callback = (FARPROC16)MAKESEGPTR(context->SegEs,
+                                                        DX_reg(context));
+
+            SET_CX(context, oldMask);
+            SET_DX(context, OFFSETOF(oldHandler));
+            context->SegEs = SELECTOROF(oldHandler);
+        }
+        break;
+
+    case 0x0015:
+        /*
+         * OUT:
+         * BX = Number of bytes needed to store driver state
+         */
+        FIXME("Return Driver Storage Requirements\n");
+        break;
+
+    case 0x0016:
+        /*
+         * IN:
+         * BX = Size of buffer to hold saved state
+         * ES:DX = Address of buffer to hold saved state
+         */
+        FIXME("Save Driver State\n");
+        break;
+
+    case 0x0017:
+        /*
+         * IN:
+         * BX = Size of buffer holding saved state
+         * ES:DX = Address of buffer holding saved state
+         */
+        FIXME("Restore Driver State\n");
         break;
 
     case 0x0021:
Index: dlls/winedos/vga.h
===================================================================
RCS file: /home/wine/wine/dlls/winedos/vga.h,v
retrieving revision 1.14
diff -u -u -r1.14 vga.h
--- dlls/winedos/vga.h	5 Sep 2003 23:08:28 -0000	1.14
+++ dlls/winedos/vga.h	4 Sep 2004 22:58:35 -0000
@@ -42,6 +42,7 @@
 int  VGA_GetWindowStart();
 
 /* text mode */
+HANDLE VGA_AlphaConsole(void);
 void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
 void VGA_SetAlphaMode(unsigned Xres,unsigned Yres);
 BOOL VGA_GetAlphaMode(unsigned*Xres,unsigned*Yres);

Reply via email to