[comp.os.minix] Yet Another EGA fix.

sheu@gitpyr.UUCP (04/23/87)

 << ??? >>

The EGA Fix posted by Larry R. Hubble works fine, yet here is another 
(simpler) fix.  I tried this with an IBM EGA card and an Quad-EGA, both
worked fine.  Since the later one uses EGA chip set from Chips and Tech.,
it can be safely said this fix will work with other cards use the same
chip set.

Following is a brief explanation.  There is a register inside the EGA 
sequencer, to tell 'Extended Memory' (those beyond 64K, or 16K in fact, 
since 4 color planes share the same memory space) is installed or not.  
By cheating the hardware no extended memory installed, it will perform
exactly like a CGA (but with a much better resolution, of course).

I added the following three lines into 'main.c' (at the very begin).
I believe this modification won't cause any problem with mono or CGA cards, 
since those I/O addresses are not used anywhere else.  However, I don't have 
the hardware to test it with.

  port_out(0x3c4, 4);   /* Select register inside the sequencer     */
  port_out(0x3c5, 1);   /* No extended memory, take my word for it. */
  /*  That's all!  Just as I said, it's simpler.  (Optional, :-) )  */

By the way, I also took the V-Sync waiting loop out of the klib88.s vid_copy
routine (don't do this if you still need the CGA compatibility), and the 
result broke Dr. Einstein's theory -- it ran faster than the light!

  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Der-Ru Sheu
Georgia Insitute of Technology, Atlanta Georgia, 30332
...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!sheu