[comp.lang.c] VGA & Turbo-C

jerry@starfish.Convergent.COM (Gerald Hawkins) (02/26/89)

I need help.  I've been trying to program my Vega VGA into mode 13 (320 x
200, 256 colors) with Turbo-C 2.0.  I'm able to easily set the modes
which Borland lists in the reference manual (like 640x480, 16 color), but
they have not apparently made any provision for some of the less-used 
modes.

Looking through the <graphics.h> file, I see #define MAXCOLORS 15, which
gives me at least one clue that they never thought people would use the
256 color modes.

I can place my board into mode 13 by using a BIOS interrupt after
initially setting it to mode 12h with a Turbo-C function (initgraph()).
One point of confusion is that Borland's nomenclature for mode numbers is
different from those used by BIOS, for no apparent reason.  Thanks, guys.
However, when I use the BIOS to reach mode 13h, though the display
reaches the correct mode, some of the TC stuff still thinks it is in mode
12h.  Therefore, getmaxx() will return 639 and getmaxcolor will return
15, so I apparently can't set the palette registers 16 - 255 without
error.

I may be able to use BIOS the whole way and skip most of the TC
functions, but that would be a major pain.  Does anyone have advice?  Am
I missing something obvious here?

Please post or e-mail:


Still thinking of a clever, witty, thoughtful, timely .signature file ...

These opinions are mine.
Jerry.  (jerry@starfish.convergent.COM)
-----

ftw@masscomp.UUCP (Farrell Woods) (02/28/89)

In article <957@starfish.Convergent.COM> jerry@starfish.Convergent.COM (Gerald Hawkins) writes:
>I need help.

[description of problem specific to IBM PC's and almost not at all related
to the C language proper deleted]

Please, please, PLEASE follow up in comp.sys.ibm.pc, and NOT here.  Sheesh!

-- 
Farrell T. Woods				Voice: (508) 692-6200 x2471
MASSCOMP Operating Systems Group		Internet: ftw@masscomp.com
1 Technology Way				uucp: {backbones}!masscomp!ftw
Westford, MA 01886				OS/2: Half an operating system