News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

several video pages

Started by ghjjkl, July 18, 2014, 12:35:14 AM

Previous topic - Next topic

FORTRANS

HI,

Quote from: MichaelW on July 31, 2014, 09:33:00 AM
If I recall correctly in mode 13h, and assuming the default palette and color register values, the first 16 colors (0-15) by design match the colors for the 16-color modes.

   Yes, you are correct.  Wikipedia has a picture of the default palette
on their Mode 13H page.  If you use only the other 240 palette
entries, your program may be more compatible with an OS or the
BIOS when displaying text or the like.

Quote from: dedndave on July 31, 2014, 09:59:09 AM
if i remember correctly, the DAC values are 6-bits only
so, 0 is for no luminance in that color, and 3Fh is full luminance
i don't remember the order for colors, but guessing R, G, B

   Right, you remember correctly, the VGA color registers are 6-bits
each.   And they are in RGB order.  An image using a 256 color
palette normally stores 8-bit values.  So you divide by four (usually
by shifting to the right) to convert those palette entries when using
Mode 13H.  Targa TGA images muddle things a bit by using a BGR
ordering.

Regards,

Steve N.

Gunther

Steve,

Quote from: FORTRANS on July 31, 2014, 10:07:33 PM
Targa TGA images muddle things a bit by using a BGR ordering.

for most TGA images is that true. But it's not the only case for BGR color ordering.

Gunther
You have to know the facts before you can distort them.

dedndave

bitmap files, bitmaps in general, use BGR order, too   :P

Gunther

Quote from: dedndave on August 01, 2014, 07:40:26 AM
bitmap files, bitmaps in general, use BGR order, too   :P

:t

Gunther
You have to know the facts before you can distort them.

deeR44

Few things excite me more than 16 bit MS-DOS programming. Yippee-ki-yay!