Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE362A8FB@probe-2.acclaim-euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Mouse handling under vesa... yet again Date: Wed, 10 Mar 1999 11:19:47 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com jsc AT lds DOT co DOT uk writes: > Sorry, this must be quite annoying, but all the literature I've read > on how to write a workaround to make the mouse work under a vesa mode > is either written in gobbledigook (ie nonsensensical!) or just plain > doesn't make sense. If anyone can explain this in some variety of > English, I would be really grateful. The easy solution would be to use Allegro, which takes care of all this for you: just call install_mouse() and then read the data. If you want to do it all yourself, I'm afraid there is no easy answer, because it is a complicated problem. There are easy methods, but they don't work properly. I'm going to assume that you already have a reference listing the int 0x33 mouse driver functions (if not see Ralph Brown's interrupt list), and that you have some familiarity with calling BIOS functions from djgpp (basically you just need to declare a __dpmi_regs structure, fill in the register values for the function you want to call, and then pass this structure to __dpmi_int()). Ok, you've basically got two choices for getting smooth mouse input in SVGA. One way is to use int 0x33 driver functions to make the cursor range be eight times larger than normal, make it move eight times faster than normal, and then divide the resulting coordinates by eight, to get pixel-precision motion data. This is fairly easy and works ok with everything except Logitech drivers, but it will make your cursor move far too slowly on a Logitech mouse due to their failure to implement the speed adjustment call. The best way I know to do it is just to read mickey motion data from the int 0x33 driver (int 0x33, ax=11), and use this to reconstruct the motion for yourself. This method works fine with all normal mice, but it is a pain to implement. Also, it won't do the right thing with other types of devices like touch screens and tablets, so if you are concerned about supporting every possible machine out there, you really need to implement a couple of different methods and let the user choose between them. Sorry if this sounds too complex for you, but that's just what you have to do... Shawn Hargreaves.