[comp.unix.i386] How do you program graphics cards via ioctl

platt@ndla.UUCP (Daniel E. Platt) (02/23/90)

Hi,

I have a VDC600 (sort of like a VGA) which runs Xwin (ATT's X11)
in a 16 color mode.  I would like to take advantage of the
640x400x256 mode.  I also don't need all of the kinds of things
that X11 provides; I could live with a much smaller, and in some ways
more flexible, set of primitives for graphics.  However, I don't
know how to handle the ioctl() calls on the things described in
the 'Display(7)' entry in my manuals.  In particular, I have learned
that it is possible to:

	1) open vt0n's,
	2) modify what the display mode is in the vt0n,
	3) load color tables, &c using ioctl() (control the card's registers).
	4) map memory (control the pixel contents).

Many of these things are done with Xwin.  However, it isn't clear how all
of these work together.  The only example of code was how to change one
character in your font.  I don't have any idea on how these calls relate
to each other and how to set them up. 

Further, I also need to know about VGA graphics involving the DAC (digital
to analog converter -- looks like a bunch of registers that you can
change the contents of to make color maps out of).  I borrowed a book
from a friend that describes how these cards work -- somewhat -- but
it didn't go into any detail on how to program many of the registers.
Most of the DOS based books I have are pre-VGA (back when EGA was
kittens).  The the ioctl() calls I've figured out so far will change the
modes for me nicely.  However, I would like to know how to change the 
memory map on VGA compatible cards.  Anyone willing to answer this?

PS:	If you know some of the answer to this, send it along.  Don't feel
you have to know all of it to say anything; I'll put together the
information and try it out.  I'll even post the results for those of you
who are curious.


Thanks in advance :-)

Dan Platt
...uunet!ndla!platt