ace3@quads.uchicago.edu (anibal antonio acero) (12/29/90)
I recently acquired the cmouse2.arc file, and recompiled the programs under Turbo C 2.0. Everything works fine, as far as I can tell, in 25-line text mode. My first question is, how do I support the mouse in the 50 line VGA text mode? cmouse2 doesn't seem to realize that the number of lines on the screen has changed, and the mouse cursor is restricted to the upper 25 lines. My second question: how does Norton generate a graphic arrow for the mouse cursor in text mode. It doesn't seem to be one of the ASCII graphics char- acters; does he alter the font? The Norton Utilities also support the mouse in 50 line mode, although the mouse cursor is a more normal "box". Thanks. tony acero acero@quads.uchicago.edu
6600m00n@ucsbuxa.ucsb.edu (Steelworker) (01/02/91)
In article <1990Dec29.060553.717@midway.uchicago.edu> ace3@quads.uchicago.edu (anibal antonio acero) writes:
...
My second question: how does Norton generate a graphic arrow for the mouse
cursor in text mode. It doesn't seem to be one of the ASCII graphics char-
acters; does he alter the font? The Norton Utilities also support the mouse
in 50 line mode, although the mouse cursor is a more normal "box".
Thanks.
tony acero
acero@quads.uchicago.edu
I am pretty certain that norton alters some of the fonts to get the
mouse to work. The reason I am certain ( other than that I can't think
of any other way do do it) is that a few of the charecters do not
get altered correctly when the mouse is near. E.g the 'm' charecter
has an extra set of pixels on the right leg when the mouse is next
to it.
Rob
a563@mindlink.UUCP (Dave Kirsch) (01/04/91)
> jdb@reef.cis.ufl.edu writes: > > Msg-ID: <26151@uflorida.cis.ufl.EDU> > Posted: 4 Jan 91 00:42:02 GMT > > Org. : UF CIS Dept. > Person: Brian K. W. Hook > > I doubt that Nortno changes the font since the arrow would move in character > cell movements (ie. very jerky and blocky). I am quite baffled by both > Norton's ability and Microsoft's (Word 5.5 and Works) ability to generate > the arrow AND run in a text mode capable of using FAST screen writes for > popup windows. > > Brian Actually, they both _do_ change the font. It's quite simple, actually. The arrow pointer is not just one character, but _four_. By redefining the characters on the fly, and shifting the pointer by bits based on the cell location and using 2 characters width instead of one, it works fine. I was somewhat curious on how Norton did it, and wrote some of my own code to make the arrow appear in text mode. There are some problems though, since the arrow is now 4 characters (2 by 2), color attributes get in the way. Norton (any myself) solved this by always using the _same_ foreground color for everything on the screen (as an example, white) and just using different background colors. If your interested, I can probably clean up my code a bit and send you a copy. Simple mouse routines that interface with the mouse driver using function 12. My routines draw the mouse cursor, it doesn't use the mouse driver to draw it. The routines are compatible with Turbo C 2.0 and higher, or MSC 6.0 and higher. -- -- /// Dave 'Zoid' Kirsch UUCP: {uunet,ubc-cs}!van-bc!rsoft!mindlink!a563 Voice: (604) 585-8844 a563@mindlink.UUCP Zoid@cc.sfu.ca Vancouver, British Columbia "In-no-sense? Nonsense!" - The Art Of Noise.
jdb@reef.cis.ufl.edu (Brian K. W. Hook) (01/04/91)
I doubt that Nortno changes the font since the arrow would move in character cell movements (ie. very jerky and blocky). I am quite baffled by both Norton's ability and Microsoft's (Word 5.5 and Works) ability to generate the arrow AND run in a text mode capable of using FAST screen writes for popup windows. Brian
risto@tuura.UUCP (Risto Lankinen) (01/04/91)
jdb@reef.cis.ufl.edu (Brian K. W. Hook) writes: >I doubt that Nortno changes the font since the arrow would move in character ^^^^^^^ >cell movements (ie. very jerky and blocky). Hi! Well, I don't doubt: Suppose the screen mode being used has character cells of M*N pixels. Then, imagine a cursor shape in high resolution, of max. (M+1)*(N+1) pixels. Now, you can overlay this cursor shape upon a grid of character cells so, that a maximum number of four character cells will be touched. Next, there must be 4 character codes (252..255, for example), font of which are reprogrammed to be the cursor shape (properly shifted for 'pixel-sharp' resolution), except for the points, where the cursor is transparent - those points are taken from the font of the character cells overlaid by the cursor. Finally, the four characters on the screen are (saved and) replaced by the freshly constructed 'graphical characters', which the user perceives as an hi-res cursor appearing to that point. There's of course more involved, namely deleting the old image, while adjusting for when the new and old image overlap one another, but with clever programming (and with four more character codes to spend) the movement can be made smooth and flicker-free. By the way, the color attribute of a character cell cannot be touched. This can be seen with the Norton by moving the cursor across an area, where the characters have different colors. The cursor changes color, too, revealing the border of the character cells. There's also little roughness with some displays using 9 bit wide characters, while the cursor shape is apparently defined with only 8(+1 = M+1 max.) pixels. Then, every 9th vertical line of pixels is a copy of its adjacent. Terveisin: Risto Lankinen -- Risto Lankinen / product specialist *************************************** Nokia Data Systems, Technology Dept * 2 2 * THIS SPACE INTENTIONALLY LEFT BLANK * 2 -1 is PRIME! Now working on 2 +1 * replies: risto@yj.data.nokia.fi ***************************************
yow@magic.Berkeley.EDU (Billy Yow 283-4009) (01/08/91)
A side note to the discussion of the arrow cursor in text modes. The Video-7 VGA boards support a hardware base mouse cursor. If the mouse cursor is setup in a graphics mode and then the mode is switched to text the cursor will remain as an arrow. This only works on Video 7 boards. Bill Yow The yow@magic.Berkeley.EDU is not a true address.