Article View: comp.os.msdos.programmer
Article #7486Re: Programming in a mouse interface
From: Gregory Allen Reid
Date: Thu, 07 Jan 1993 03:46
Date: Thu, 07 Jan 1993 03:46
41 lines
2611 bytes
2611 bytes
joe@proto.com (Joe Huffman) writes: >pdh@netcom.com (Phil Howard ) writes: >>I notice the int 33h functions mostly deal with a row and column, and I >>assume this refers to the existing video mode. Can the mouse drivers >>handle all the video modes at least through to 1280x1024 in terms of >>knowing correctly the number of columns and rows? Or do you HAVE to use >>functions 7 and 8 to tell the driver? >Use subfunction 12 and draw the mouse cursor yourself. I don't know of >any mouse drivers that know of all the various super VGA modes. I have done just what Joe Huffman suggests. I have written my own graphics library and interfaced with the mouse and drawn my own mouse pointer. I used functions 7 and 8 to tell the mouse driver how many rows and columns a certain SVGA mode has and used other functions to check where the mouse pointer is located. This ALMOST works. The problem is that the X coordinate of the mouse pointer is always an integral multiple of 8. I don't know whether this is specific to my mouse and mouse driver (I have a Gateway 486-33 with Microsoft mouse and driver) or whether this happens with all mice. My guess is that when the mouse driver detects a graphics mode change it doesn't recognize, it assumes the characteristics of text mode. In text mode, all coordinates are multiplied by eight, resulting in a 640x200 coordinate space (rather than 80x25). Has anyone encountered this problem before? I have thought of a workaround that should work. I could use functions 7 and 8 to set the resolution to eight times what it really is and divide by eight when I read the coordinates. This is obviously a kludge and might fail if another mouse/driver works differently. I would appreciate an explanation and/or a fix for this behavior from someone who has mastered this problem. Thanks! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= = Greg Reid (gar@catt.ncsu.edu) = = SnailMail: 2947 Parkhurst Drive, Winston-Salem, NC 27103 = = Home Phone: (919)766-9962 Work Phone: (919)983-5132 =
Technical Details
Message-ID:
<1993Jan7.034602.24428@ncsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!cs.utexas.edu!rutgers!concert!rock!taco!garfield.catt.ncsu.edu!garShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!cs.utexas.edu!rutgers!concert!rock!taco!garfield.catt.ncsu.edu!gar From: gar@garfield.catt.ncsu.edu (Gregory Allen Reid) Newsgroups: comp.os.msdos.programmer Subject: Re: Programming in a mouse interface Message-ID: <1993Jan7.034602.24428@ncsu.edu> Date: 7 Jan 93 03:46:02 GMT Sender: news@ncsu.edu (USENET News System) Organization: Computer and Technologies Theme Program, NCSU, Raleigh Lines: 41