Newsgroups: comp.os.minix
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!simtel!news3.noc.netcom.net!noc.netcom.net!news.sprintlink.net!newsfeed.internetmci.com!EU.net!sun4nl!cs.vu.nl!kjb
From: kjb@cs.vu.nl (Kees J Bot)
Subject: Re: Snow checking
Nntp-Posting-Host: hornet.cs.vu.nl
References: <49l4hg$ftg@csbh.mhv.net>
Sender: news@cs.vu.nl
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Fri, 1 Dec 1995 10:07:24 GMT
Message-ID: <DIwK4C.Kv8.0.-s@cs.vu.nl>
Lines: 48

mgraffam@mhv.net writes:

>I just installed Minix 1.7 on my 286 (which has an OLD CGA card) which
>gets 'snowy' when programs write directly to video memory.. the snow
>isnt that bad, so I can live with it until (if) I put a better card
>on the old thing. Anyway.. I was wondering if there is a snow-checking
>console.. or some other way to fix the problem. (arent software 
>solutions to hardware bugs fun? :)

Strange coincidence, I just rewrote the console driver last week.  One
of the bugs I noticed was that the variable 'snow' is never set.  If it
is set then it will tell the video memory routines to only touch video
memory during the vertical retrace of the electron beam.

If you add the following line somewhere in kernel/console.c::scr_init()

	snow = color && !ega;

then snow handling will be reenabled.  I have been toying with 'snow=1'
on a VGA screen to see if it would remove the occasional flashing of the
screen when it is scrolled up, but screen updates became so slow that I
decided to remove snow checking altogether.  It hasn't been on since
Minix 1.5 so I assumed nobody cares.  (The video routines are convoluted
enough with all these word<->byte computations and memory wrapping and
stuff.)

Please let me know if it is worth the trouble to put snow checking back
in the driver for CGA.

Is there someone out there with an EGA screen who is willing to try if
taking out the lines

	/* Tell the EGA card, if any, to simulate a 16K CGA card. */
	out_byte(EGA + INDEX, 4);
	out_byte(EGA + DATA, 1);

makes any difference?  The BIOS should have initialized the card
properly, so these two lines look like someone tried to make EGA look
like CGA to get video memory wrapping working, but forgot to take the
lines out when they found out that video memory wrapping can't work for
EGA.  (Wrapping is when the card thinks that its video memory is
circular.)

I like to get rid of those lines because they make a VGA card think
it has 16 K instead of the 32 K there really is available in text mode.
--
	                        Kees J. Bot  (kjb@cs.vu.nl)
	              Systems Programmer, Vrije Universiteit Amsterdam
