From: pb@excelsior.xs4all.nl.REMOVE-THIS (Marc van den Dikkenberg)
Subject: Re: VESA video modes
On Mon, 23 Mar 1998 22:21:43 -0500, Robert Severn
wrote:
>To set a VESA video mode, you have to set AX = &H4F02 and then put the
>video mode (&H111, &H114...) in BX. Then do the INT &H10. As far as
>actually doing anything in these modes, I know how to set pixels in the
>256 colour modes (that's easy, just write bytes to the video buffer) but
>as for the high colour modes I don't know how the pixels are stored. So
>if anyone does, let me know.
I've been playing around with the hi-color modes for a little while now,
and did figure out that part. Hope this helps:
In a 16-bit mode, you have to poke two bytes for one pixel.
the first 5 bits are the red value, then 6 bits for green, and 5 bits for
red again.
&B RRRRRGGG
&B GGGBBBBB
In a 16-million color mode, you have a byte for each of the colors.
However, there seems to be a fourth byte of which I havne't found the
use yet. Probably just stuffing:
&B RRRRRRRR
&B GGGGGGGG
&B BBBBBBBBB
&B ??????????
So you poke 4 bytes for each pixel.
--
Marc van den Dikkenberg
-----------------------
The PowerBasic Archives
http://www.xs4all.nl/~excel/pb.html
*** QwkNews (tm) v2.1
* [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|