TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: MARC VAN DEN DIKKENBERG
date: 1998-03-24 06:38:00
subject: Re: VESA video modes

From: pb@excelsior.xs4all.nl.REMOVE-THIS (Marc van den Dikkenberg)
Subject: Re: VESA video modes
 
On 24 Mar 1998 15:11:58 GMT, "KB"  wrote:
 
>Marc van den Dikkenberg  wrote in
>article ...
>> 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
>>
>
>Wow, does this mean that 24bit mode is actually 32bit?
 
No...
 
Actually, it all depends on your definition... I think it's just rounded
off to the nearest WORD to make it faster to address... You still can
'only' address 256 x 256 x 256 = 16777216 colors.
 
In a true 32-bit graphical environment, that would be 4.29 billion colors,
with about 1626 shades of red, green and blue.
 
It would take up the same amount of memory, coincidentally, but puts higher
demands on your video adapter. 'standard' video adapters only support up to
24 bits.
 
The human eye can't distinguish the difference between 24 and 32 bits video
anyway.
--
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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.