Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2000 15:00:02 -0800 (PST)
From:      Kelly Yancey <kbyanc@posi.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/15996: patch to add sysctl variable to control SC_MOUSE_CHAR at run-time
Message-ID:  <200001082300.PAA81382@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/15996; it has been noted by GNATS.

From: Kelly Yancey <kbyanc@posi.net>
To: Alexey Zelkin <phantom@cris.net>
Cc: yokota@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/15996: patch to add sysctl variable to control SC_MOUSE_CHAR
 at run-time
Date: Sat, 8 Jan 2000 17:51:40 -0500 (EST)

 On Sat, 8 Jan 2000, Alexey Zelkin wrote:
 
 > hi,
 > 
 > On Sat, Jan 08, 2000 at 12:37:11PM -0500, kbyanc@posi.net wrote:
 >  
 > > >Number:         15996
 > > >Category:       kern
 > > >Synopsis:       patch adds hw.syscons.sc_mouse_char sysctl variable
 > 
 > Why not change its value by default to reasonable value (0x03) instead of
 > current default value ?
 > 
 > -- 
 > /* Alexey Zelkin                       && phantom@cris.net    */
 > /* Tavric National University          && phantom@crimea.edu  */
 > /* http://www.ccssu.crimea.ua/~phantom && phantom@FreeBSD.org */
 > 
 
   Actually, I need to correct a couple of notes in my PR. First, I
 misnumbered the character cell bits, where I say 0th bit, I mean the 1st
 bit (ie bit 0 is the 1st bit). The is important because I said it got
 copied to the 9th bit (which is correct). The other correction is that VGA
 adapters don't copy the 1st bit anyway, they copy the 8th bit. That said,
 here is the answer to your question:
 
   The 80-column VGA text modes are actually 720 pixels wide; each
 character cell is 9 pixels wide. However, the interface for specifying
 character fonts is a bitmask that conveniently uses one byte (8 bits) per
 row of the character cell to indicate which pixels should be on or off.
 Where does the 9th bit come from? Well...
 
   On all VGA adapters I've seen they do not do the 9th bit copying trick I
 described in the PR for any characters outside the range of 0xc0 - 0cdf
 range. This range was chosen because it coincided with the line-drawing
 characters in the original IBM fonts. They needed to copy the 8th bit to 
 the 9th to extend the lines so they met between cells.
   If you use characters outside of this range, the hardware won't copy
 the 8th bit to the 9th bit of the character cell. So you'll see an
 annoying vertical line through the mouse cursor as it moves across
 character cells (that line being the 9th character bit which is always
 off). Presumably, the reason 0xd0 was chosen as the default for
 SC_MOUSE_CHAR was to take advantage of the 9th-bit copy trick to make the
 cursor look whole (actually, you'll see a bump in the mouse, which
 coincides with the 8th bit of the first character cell that it is spanning
 being copied and draw twice, but this is preferable to the blank lines).
 
   So, to finally answer your question: because it'll look bad. :)
 
   You really want the mouse cursor characters to be taken out of this
 range to make it look good. The only problem was that some locales defined
 used characters in this range which presents a problem. So, people who
 were affected in this way need a way to get the pointer out of their
 alphabet. For the rest of us, we'de rather the pointer "look good" :).
 
   Kelly
 
 --
 Kelly Yancey  -  kbyanc@posi.net  -  Richmond, VA
 Analyst / E-business Development, Bell Industries  http://www.bellind.com/
 Maintainer, BSD Driver Database       http://www.posi.net/freebsd/drivers/
 Coordinator, Team FreeBSD        http://www.posi.net/freebsd/Team-FreeBSD/
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001082300.PAA81382>