Mail Archives: djgpp/1997/10/17/00:58:26
>Subject: Re: ALLEGRO - 256 shades of grey?? How?
>To: pscargill AT cix DOT compulink DOT co DOT uk (Peter Scargill)
>Date: Fri, 17 Oct 1997 13:47:28 +1000 (EST)
>Cc: djgpp AT delorie DOT com (DJGPP)
>From: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>
>
>> In 800*600*256 mode, GRX20 lets you set up 256 shades of gray.
ALLEGRO in
>> the same mode only lets you set up 64 (then you get them repeated 3
times
>> as the routine uses 6 bits per colour).
>>
>> How do I get the full 256 shades of grey. HELP!!!
>>
>In a 256-colour mode it is only possible to have 64 shades of grey,
because
>you can go from 0,0,0 to 63,63,63. I don't know how GRX does it, maybe
they
>just repeat them 4 times and claim that they are gray?
>
>Why do you want gray anyway, and isn't 64 shades enough?
>
>Brett
>
>--
>"Who here believes in telekenesis? Raise MY hand!"
>--
>Brett Porter
>bporter AT rabble DOT uow DOT edu DOT au
>
Can't you create a palette containing 256 shades of grey and set the
palette with allegro's set pallete function? I haven't tried, but I
believe this should work.
i.e., a palette consisting of values like:
0,0,0
1,1,1
2,2,2
...
255,255,255
and then set it. I believe the 6 bits per color is only applicable when
converting a palette value to it's equivalent DAC register value. I may
not have the details right, but I believe the DAC is limited to a 6-bit
digital to analog conversion per color(2^6 = 64).
Any corrections are welcome.
Good luck,
John
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- Raw text -