Author Topic: several video pages  (Read 4174 times)

FORTRANS

  • Member
  • ****
  • Posts: 946
Re: several video pages
« Reply #15 on: July 31, 2014, 10:07:33 PM »
HI,

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.

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

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: several video pages
« Reply #16 on: July 31, 2014, 10:38:13 PM »
Steve,

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
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8749
  • Still using Abacus 2.0
    • DednDave
Re: several video pages
« Reply #17 on: August 01, 2014, 07:40:26 AM »
bitmap files, bitmaps in general, use BGR order, too   :P

Gunther

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: several video pages
« Reply #18 on: August 01, 2014, 08:14:17 AM »
bitmap files, bitmaps in general, use BGR order, too   :P

 :t

Gunther
Get your facts first, and then you can distort them.