[comp.sys.ibm.pc.misc] Quick C and VGA Mode 10h

ruben@bcstec.boeing.com (Reuben Wachtfogel) (01/27/91)

Some quick help will save me some time and be much appreciated.

There seems to be some confusion in the literature regarding this
mode.  I've seen it described as a 16 color mode, a 64 color mode,
a 4 or 16 color mode, and a 16 or 64 color mode in various online
tech manuals, and my VGA card (Paradse)  manuals.
In Quick C, the online help calls it a 64 color mode, but the graph.h
include file calls it a 4 or 16 color mode. The quick 'C' functions
to set colors, and _getvideoconfig seem to treat the mode as a 16 color
mode. My questions are:
1) What does a 4 OR 16 color mode mean ? Doesn't 16 include 4 ?
2) Why all the confusion ?
3) Is there a 64 color 640x350 mode or isn't there ?
   If there is, is there an easy way to access it from Quick 'C' ?



6666666666666666666666666666666666666666666666666666666666666666666666666666666
66                                                                           66
66  DISCLAIMER:  All concepts and opinions expressed herein are the sole     66
66  responsibility of the undernamed.  They do not in any way reflect any    66     
66  official or unofficial position of the Boeing Company. Furthermore, they 66
66  do not necessarily even represent the opinions of the undernamed as he   66
66  is a rather wishy-washy sort of fellow.  In fact, most of the opinions   66
66  expressed aren't even really opinions. They're actually more like random 66
66  access thought samplings. Considering for a moment the Holographic model 66
66  of the brain, they are probably range distortions, as viewed from a      66
66  position of minimal resolution on the synapse focal axis.                66
66                                                                           66
66---------------------------------------------------------------------------66
66  "Blessed Are The Cheesemakers..."  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$66
66                                     % Bitnet:  xavier@UWAV1               66
66  (c) 1989 by "Disclaimers R' Us .   % Boeing:  ruben@dsp35001.boeing.com  66
6666666666666666666666666666666666666666666666666666666666666666666666666666666

cummings@hammer.Prime.COM (Kevin Cummings) (01/30/91)

In article <10513@jarthur.Claremont.EDU>, rspangle@jarthur.Claremont.EDU
(Froot Loop) writes:
|> In article <634@bcstec.boeing.com> ruben@bcstec.boeing.com (Reuben
Wachtfogel) writes:
|> >There seems to be some confusion in the literature regarding this
|> >mode.  I've seen it described as a 16 color mode, a 64 color mode,
|> >a 4 or 16 color mode, and a 16 or 64 color mode in various online
|> >tech manuals, and my VGA card (Paradse)  manuals.
|> 
|> >3) Is there a 64 color 640x350 mode or isn't there ?
|> 
|> Not on any EGA or VGA card I can think of.  The 64 comes from the
palette.
|> On EGA cards, the red/green/blue values can each go from 0-3.  4^3 =
64
|> possible colors.  
|> 

At the risk of further confusing the issue, but in the interests
of trying to clarify Randy's point:

The IBM EGA card came in various memory configurations.  The cheap
version of the card had only 64KB or video memory.  The more usable
EGA cards came with 128KB of video memory.  Clone cards were known
to come with as much as 256K of video memory.

The 64KB EGA cards can support 320x200x16 and 640x200x16 because
those video modes only require 32K and 63K of video memory.  But
the 640x350 mode can only support 4 colors (using 55K of video
memory). 

The 128K EGA cards can easily support 320x200x16, 640x200x16.
And the 640x350x16 mode only needs 110K of memory.

EEGA cards (that come with 256K memory) usually support some extended
modes like 640x480x16 (150K) and 800x600x16 (234K).  Note that EGA
cards NEVER support more than 16 colors (and always out of a palette
of 64 colors).  Also note that these modes, tho similar to the VGA
modes,
use the EGA color palette (not the VGA color palette), and do not
work with VGA software that might appear to support them.

The digital signal applied to the EGA monitor consists of rgbRGB.  This
means that in general, an EGA monitor can display 2^6 distinct colors
on its screen, however the the programability of the colors in
software looks like iRGB (where the i bit is an intensity bit in text
mode), leaving the programmer access to only 16 colors out of the 64
the monitor can display.

The mapping done by the EGA board between the iRGB form and the rgbRGB
signal is done by treating the color palette as a 16 color field
containing an rgbRGB value the monitor should display for each iRGB
color.
The order of the colors in the palette is setable by the programmer.
For the sake of compatibility, most programs assume that the color
palette is loaded with a "standard" color mapping very close to
a physical interpretation of iRGB as a physical color signal.
(I think the -RG- color is actually closer to ORANGE than YELLOW,
because IBM didn't think people could tell the difference between
high and low intensity yellow!  IBM actually calls the low intensity
color: BROWN.)

Thus in graphics modes, ANY 16 colors can be chosen by the programmer.

In text modes, (someone correct me if I'm wrong here) the iRGB form is
fixed, the color palette is not used, and only 2 intensities of 8 real
colors are available (totaling 16 colors).  

There, I hope I haven't confused things TOO much  B^)

=================================================================
Kevin J. Cummings                       Prime Computer Inc.
20 Briarwood Road                       500 Old Connecticut Path
Framingham, Mass.                       Framingham, Mass.

InterNet:  cummings@primerd.Prime.COM
UUCP:      {uunet, csnet-relay}!primerd.Prime.COM!cummings

Std. Disclaimer: "Mr. McKittrick, after careful consideration,
		  I've come to the conclusion that your new
		  defense system SUCKS..."   --  War Games
=================================================================

cd5340@mars.njit.edu (Charlap) (02/01/91)

In article <1991Jan30.103545@hammer.Prime.COM> cummings@hammer.Prime.COM (Kevin Cummings) writes:
>
>In text modes, (someone correct me if I'm wrong here) the iRGB form is
>fixed, the color palette is not used, and only 2 intensities of 8 real
>colors are available (totaling 16 colors).  
>
You asked for it.  No, you can remap the palette in text mode.  The only
problem is that a MODE CO80 command will clear it back to the default
colors, which match the CGA color set.  Check out a recent copy of the
Norton Utilities, and run the NCC program, which lets you do it.

--- Dave (cd5340@mars.njit.edu)