[comp.os.msdos.programmer] Accessing full VGA colour/Grey scale in C pre

andrew@otago.ac.nz (06/08/91)

> 
> I reccomend the book:
> 
> 	Programmers Guide to PC and PS/2 Video Systems
> 	published by Microsoft Press.
> 

I also recommend this book but, I am awair of two errors in the book (or at
least they didn't work when I tried them).

1) It does not tell you how to program the palette registers on the DAC.  This
was a problem for me because the code I was writing was for XENIX and I was
told not to use the BIOS for anything I did.  I still don't know how to do
this.

2) The register number for the overscan in the book I had claimed to be
register 0x11.  The code only worked when I used register 0x31 (undocumented in
this book) as the overscan.  The symptoms were bizzar too.  Again if anyone
knows why 0x31 is correct please let me know.

Andrew.

david@kessner.denver.co.us (David Kessner) (06/08/91)

In article <1991Jun7.180739.495@otago.ac.nz> andrew@otago.ac.nz writes:
>I also recommend this book but, I am awair of two errors in the book (or at
>least they didn't work when I tried them).
>
>1) It does not tell you how to program the palette registers on the DAC.  This
>was a problem for me because the code I was writing was for XENIX and I was
>told not to use the BIOS for anything I did.  I still don't know how to do
>this.
>
>2) The register number for the overscan in the book I had claimed to be
>register 0x11.  The code only worked when I used register x31 (undocumented in
>this book) as the overscan.  The symptoms were bizzar too.  Again if anyone
>knows why 0x31 is correct please let me know.
>
>Andrew.

That's the problem with VGA (and most of the hardware for PC's)-- they assume
that you are running MS-DOS.  Programming the palette is easy (I have source 
code if you want it), but it uses the BIOS.  In general, I don't feel that
programming the VGA hardware directly (except for the original 6845 based
registers, and the display-ram) is very reliable/portable.  For instance, 
the ATI VGA wonder is a very popular card (I have one), but there are no less
than FOUR different versions of that board, all requiring suble programming
changes if you don't want to use the BIOS-- That is why EISX (AT&T System V)
does not support any of the SVGA modes on it for X11.  (there are other reasons
too, like ATI shipping them the programming documentation three weeks before 
that version of ESIX shipped.)

There should be a better standard for high-res video adapters.  The "AI" used
for XGA and 8514/a is a good start (but that too assumes MS-DOG).  TIGA is 
better, and is not limited to one operationg ststem.

On a current project, I am telling the client that the program will work on
_ONE_ SVGA board, and that's it.  I will also allow it to work with TIGA, but
that's it.  I don't feel that writing drivers for hundreds of SVGA boards is
worth the effort.

Good Luck.

-- 
David Kessner - david@kessner.denver.co.us            |
1135 Fairfax, Denver CO  80220  (303) 377-1801 (p.m.) | Reunite PANGEA!
Compuserve?  Isn't that some sort of FIDO BBS?        |