Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!payne From: payne@batcomputer.tn.cornell.edu (Andrew Payne) Newsgroups: comp.sys.ibm.pc Subject: Re: Problems with herc.bgi and logic tech mouse Keywords: Turbo pascal 5.0, hercules bgi driver, LogiTech mouse driver Message-ID: <7333@batcomputer.tn.cornell.edu> Date: 6 Feb 89 02:15:19 GMT References: <8539@orstcs.CS.ORST.EDU> Reply-To: payne@tcgould.tn.cornell.edu (Andrew Payne) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 34 In article <8539@orstcs.CS.ORST.EDU> sagen@nucthy.physics.orst.edu (Milt Sagen) writes: >I wrote a program to use the mouse following the articles published in Turbo >Technix, which in general works fine with ega and vga monitors, but when the >graphics driver is the Hercules bgi driver the minimum difference between >two positions of the mouse returned to my program is 8. That is if the >first position of the mouse is x,y and the next position is (or at least >should be) one pixel to right (left, up, down, etc.) the value returned is >x+8,y. >Its as if the lower three bits are always returned as 0's. Yes, I ran into this exact problem.. Seems that the mouse driver (be it Logitech or Microsoft) is too dumb to recognize that you are in a graphic mode (Hercules). It thinks that you are in a text mode and snaps everthing to a multiple of 8. The best solution I've found so far is to fool the driver into thinking its in some kind of graphics mode. If you set the location 0x040:0x049 (in the BIOS segment), which contains the current screen mode, to a 6, the mouse driver thinks its in a 640x200 CGA mode. Set this value before you reset the mouse driver, and restore it afterwards to keep things neat. Then set the mouse limits to the size of the Hercules screen (720x348??) and you should be all set! You still don't get a cursor though, have to write that yourself. In my mouse code, I detect if you are in the Hercules mode (from the detectgraph() results in Turbo C) and perform the above steps if so. That way my code should run on Hercules as well as non-Hercules systems. If you still get stuck, drop me a note, -- = = = = = = = = = = = = = = = = = = = = = = = = = = = Andrew C. Payne, N8KEI UUCP: ...!cornell!batcomputer!payne INTERNET: payne@tcgould.tn.cornell.edu PHONE: +1 607 253 2776 USMAIL: 5428 Cls '26-UHall 5 Ithaca, NY 14853