Date: Thu, 23 Oct 1997 21:57:01 -0500 From: Tony Overfield <tony@dell.com> To: hackers@FreeBSD.ORG Subject: fixes for syscons.c and daemon_saver.c Message-ID: <3.0.3.32.19971023215701.006dc4b0@bugs.us.dell.com> In-Reply-To: <199710221007.MAA01578@curry.mchp.siemens.de>
index | next in thread | previous in thread | raw e-mail
While playing with the Dancin' Daemon screen saver, I noticed
three minor problems.
1. On some video cards (S3 Trio64 based ones at least), there
is a continuous, but brief, video glitch that mars the beauty
of the screen saver. It is caused by continuously updating
the border color, which briefly (for several pixel clocks)
sets the pixel data to the border color. This should be a
black glitch, but for some reason, it's producing a short
blue glitch on the Trio64 based cards.
One possible fix (in set_border() (syscons.c)):
Change this:
outb(ATC, 0x11); outb(ATC, color);
inb(crtc_addr + 6); /* reset flip-flop */
outb(ATC, 0x20); /* enable Palette */
to this:
outb(ATC, 0x31); outb(ATC, color);
This keeps valid pixel data from being replaced by the contents
of the overscan register.
Alternate (or additional) fix (in daemon_saver() (daemon_saver.c)):
Change code to call set_border(0) only once, like this:
if (blank) {
if (scrn_blanked == 0)
set_border(0);
if (scrn_blanked++ < 2)
return;
fillw( .... );
/* set_border(0); */
2. Switching video modes from VGA_80x50 to VGA_80x25 (and etc.)
can allow the Daemon and the hostname strings to wander far off
the edge of the screen, crashing the kernel after a short time.
This happens because the dimensions of the screen can change
after the static position variables have been moved outside
the new screen dimensions.
Suggested fix:
Change the code (in daemon_saver() (daemon_saver.c)) to make
inequality boundary crossing checks,
like this:
if (dxpos >= scp->xsize - DAEMON_MAX_WIDTH)
instead of:
if (dxpos == scp->xsize - DAEMON_MAX_WIDTH)
(repeat this 7 more times)
The code should also force the txpos, typos, dxpos, dypos variables
to all be in range, though this change will get them back in range
fairly quickly.
The draw_string(... message ...) stuff doesn't work right when the
message string is longer than the width of the screen, which is
easy to do in VGA_40x25 mode. The fix above doesn't fix this, but
it prevents it from trashing the system.
3. syscons.c does not maintain the border color correctly when
switching virtual terminals.
Suggested fix (in exchange_scr() (syscons.c)):
Add:
set_border(new_scp->border);
-
Tony
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.3.32.19971023215701.006dc4b0>
