Page 1 of 1

VESA BIOS Extension

Posted: Sat Dec 10, 2005 12:27 pm
by bluecode
hi,

I'm currently working on a simple VESA BIOS Extensions driver to test my virtual-8086-monitor. I already wrote a function, that simply detects the presence/absence of VBE. So now I want to go further and looked through the (graphic) modes supported by the specification and was quite surprised when I didn't see any 32bit modes. Now I'm wondering whether there are just 16bit and 24bit video modes or are there also 32bit ones (but not supported by VBE).

Thanks for your help.
I appreciate it.

Re:VESA BIOS Extension

Posted: Sat Dec 10, 2005 5:06 pm
by Dex4u
When you are making a driver for vesa high-res, you need to remember that some use 24bpp and others use 32bpp.
But in fact they really only support 24bpp, this is how it works, some use "RGB" and others "RGBX", each letter = a byte, for Red, Green, Blue, the X = a byte of 0.
Now what you need to do is test "ModeInfo_BitsPerPixel" to see if it users 24bits or 32bits and jump to a differant peace of code, your users 24bit, most new cards use 32bit. its faster to more a DD than a W & B.

PS: Have you not seen black strips when testing some peoples vesa code, that because it works fine on a 32bit vesa test pc, but not on your 24bit test pc.

Re:VESA BIOS Extension

Posted: Sat Dec 10, 2005 5:23 pm
by bluecode
The VESA BIOS Extension explicitly specifies which modes have which bitdepth and there are none with 32bpp mentioned. If I understood you correctly now, it's up to the VideoBIOS to decide whether that mode is 24bpp or 32bpp. So I have to check whether some mode (which is defined in the VBE Specs as being 24bpp) actually is 24bpp or 32bpp?

Have fun ;)

Re:VESA BIOS Extension

Posted: Sat Dec 10, 2005 5:48 pm
by Brendan
Hi,
bluecode wrote:The VESA BIOS Extension explicitly specifies which modes have which bitdepth and there are none with 32bpp mentioned. If I understood you correctly now, it's up to the VideoBIOS to decide whether that mode is 24bpp or 32bpp. So I have to check whether some mode (which is defined in the VBE Specs as being 24bpp) actually is 24bpp or 32bpp?
My copy of VBE 3.0 Specification explicitly states (page 19):
Starting with VBE version 2.0, VESA will no longer define new VESA mode numbers and it will no longer be mandatory to support these old mode numbers.
The correct method (which works for all versions of VBE) is to use the Get Controller Information function, which returns a list of mode numbers. Then for each mode returned use the Get Mode Information function to find out what each video mode is.


Cheers,

Brendan

Re:VESA BIOS Extension

Posted: Sat Dec 10, 2005 6:14 pm
by Dex4u
Yes you will need to test.
Here is a example of what i have to do to display a 24bit bmp through vesa 24/32bpp modes.

Code: Select all

 ;----------------------------------------------------;
 ; PutBmp                    ;put a bmp pic on screen ;
 ;----------------------------------------------------;

PutBmp:
        cmp   [ModeInfo_BitsPerPixel],24
        jne   Try32bits
        call  PutBmp24
        jmp   wehavedone1
Try32bits:
        cmp   [ModeInfo_BitsPerPixel],32
        jne   wehavedone1
        call  PutBmp32
wehavedone1:
        ret 

You need to write two separate display codes :( .

PS: @Brendan, your links, do not seem to work.

Re:VESA BIOS Extension

Posted: Sat Dec 10, 2005 6:24 pm
by bluecode
thanks for your explanations :)
and the links work for me.

have fun ;)

Re:VESA BIOS Extension

Posted: Sun Dec 11, 2005 12:28 am
by pradeep
he VESA BIOS Extension explicitly specifies which modes have which bitdepth and there are none with 32bpp mentioned.
However some vendors use different mode numbers which is not given in the VBE3.0 spec. For eg: In case of VMware WS 5.0 they use different mode numbers. However i haven't tested in real hardware.

Re:VESA BIOS Extension

Posted: Sun Dec 11, 2005 8:29 am
by bluecode
Just some hint for the other:

The VBE3.0 Specification states, that the correct method of getting the supported video modes is explained in Appendix 5. This Appendix is not in the VBE3.0 specification, it's in the VBE2.0 Specs (A5.2.2). :P