Board index » delphi » Getting RGB values in Vesa mode $13

Getting RGB values in Vesa mode $13

Quote
> Does anyone know how to get the RGB values for a given color in Vesa
> mode $13 (320x200x256) ?  I know that you set it with :
> Port[$3C8] := color_number;
> Port[$3C9] := red_value;
> Port[$3C9] := green_value;
> Port[$3C9] := blue_value;

> now how do you get them back?  I tried sending the color number to
> port $3C8 again and reading from port $3C9, but that doesn't work.
> Any help would be appreciated.

If you want to learn how to use palette, try my VGA tutorials in my
electronic magazine. You can get it from:

http://alfa.ist.utl.pt/~l42686

Try issue 3... It has the routines...

Diogo 'Spellcaster' Andrade
l42...@alfa.ist.utl.pt
http://alfa.ist.utl.pt/~l42686

 

Re:Getting RGB values in Vesa mode $13


Quote
>> Does anyone know how to get the RGB values for a given color in Vesa
>> mode $13 (320x200x256) ?  I know that you set it with :
>> Port[$3C8] := color_number;
>> Port[$3C9] := red_value;
>> Port[$3C9] := green_value;
>> Port[$3C9] := blue_value;
>> now how do you get them back?  I tried sending the color number to
>> port $3C8 again and reading from port $3C9, but that doesn't work.
>> Any help would be appreciated.

Try sending the color to $3C7 instead... That should work!

Re:Getting RGB values in Vesa mode $13


Quote
kouhs...@vt.edu (nevermind) wrote:
>Does anyone know how to get the RGB values for a given color in Vesa
>mode $13 (320x200x256) ?  I know that you set it with :
>Port[$3C8] := color_number;
>Port[$3C9] := red_value;
>Port[$3C9] := green_value;
>Port[$3C9] := blue_value;
>now how do you get them back?  I tried sending the color number to
>port $3C8 again and reading from port $3C9, but that doesn't work.
>Any help would be appreciated.
>Tom

Well, maybe the PC programmer's encyclopedia will be helpfull. You can
find it in ftp://teeri.oulu.fi/pub/msdos/programming/gpe.
By the way, can you use the BGI graphics libraries to get into 320x200
with 256 colors? I can't, but if you could help me, I would be very
gratefull.

Regards,
Nuno Costa

Other Threads