--- /dev/null
+/* FCE Ultra - NES/Famicom Emulator\r
+ *\r
+ * Copyright notice for this file:\r
+ * Copyright (C) 2002 Ben Parnell\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+ */\r
+\r
+#include <dpmi.h>\r
+#include <string.h>\r
+\r
+#include "dos.h"\r
+\r
+int InitMouse(void)\r
+{\r
+ __dpmi_regs regs;\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0;\r
+ __dpmi_int(0x33,®s);\r
+ if(regs.x.ax!=0xFFFF)\r
+ return(0);\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0x7;\r
+ regs.x.cx=0; // Min X\r
+ regs.x.dx=260; // Max X\r
+ __dpmi_int(0x33,®s);\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0x8;\r
+ regs.x.cx=0; // Min Y\r
+ regs.x.dx=260; // Max Y\r
+ __dpmi_int(0x33,®s);\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0xF;\r
+ regs.x.cx=8; // Mickey X\r
+ regs.x.dx=8; // Mickey Y\r
+ __dpmi_int(0x33,®s);\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0x2;\r
+ __dpmi_int(0x33,®s);\r
+\r
+ return(1);\r
+}\r
+\r
+uint32 GetMouseData(uint32 *x, uint32 *y)\r
+{\r
+ __dpmi_regs regs;\r
+\r
+ memset(®s,0,sizeof(regs));\r
+ regs.x.ax=0x3;\r
+ __dpmi_int(0x33,®s);\r
+\r
+ *x=regs.x.cx;\r
+ *y=regs.x.dx;\r
+ return(regs.x.bx&3);\r
+}\r
+\r
+void KillMouse(void)\r
+{\r
+\r
+}\r