VESA BIOS Extension

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
bluecode

VESA BIOS Extension

Post 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.
Dex4u

Re:VESA BIOS Extension

Post 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.
bluecode

Re:VESA BIOS Extension

Post 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 ;)
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:VESA BIOS Extension

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Dex4u

Re:VESA BIOS Extension

Post 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.
bluecode

Re:VESA BIOS Extension

Post by bluecode »

thanks for your explanations :)
and the links work for me.

have fun ;)
pradeep

Re:VESA BIOS Extension

Post 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.
bluecode

Re:VESA BIOS Extension

Post 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
Post Reply