Page 1 of 1

protected mode VESA

Posted: Tue Sep 30, 2003 11:00 pm
by inteter
Hi.

I'd like to know if someone has found a way to use VESA while in protected mode, without using the crappy VESA BIOS that is only available for vesa 2.0. I was thinking about switching to graphical mode while in real mode, and then write into some ports in order to get the proper resolution. Is it possible?

Thanks.

RE:protected mode VESA

Posted: Tue Sep 30, 2003 11:00 pm
by Squrky
Hi, have a look at the VBE 3.0 documentation. Its the most up-to date VESA BIOS interface at the moment I think (corrections?). Its a few years old now so its supported on most systems.

Its normally used in real-mode, but enough of the functionality is available through a protected mode interface. If you do go the protected mode route with VESA then you will have to do lots of initialisation before its ready, but after that its just calls to protected mode entry points just as usual. If you don't need bank switching and other VBE functions (which I assume you don't want) then you could just set your video mode in real-mode, and write your GUI in protected mode. Thats what I'm doing at the moment because I found it easier.

Anyway, check out:
http://www.vesa.org/vbe3.pdf

Hope that helped.

RE:protected mode VESA

Posted: Wed Oct 01, 2003 11:00 pm
by carbonBased
Uhm... the Vesa BIOS == Vesa.  You can't use Vesa without using the Vesa BIOS, they are one and the same.

You _cannot_ use Vesa 1.x in pmode because all entry points are real mode routines.  Vesa 2.x can be used in pmode using either the linear frame buffer, or the pmode bank switching routine, _however_ you must get this pmode interface through real mode.  You can't get around this!

You're going to have to write a vm86 handler, or jump back and force to real mode (slow, tedious, and bug-prone).  Sure, you can set the mode in your boot loader, and do all the work in pmode (if you can get the LFB, that is)... but what if you can't get the LFB?  Not all cards support it.  And what if you want to change the video mode some time (is that so unresonable?)?  I wouldn't reccomend "the easy route."  I'd suggest going to whole way with a vm86 handler... it'll be useful later on anyway.  And... isn't this why you decided to write an OS in the first place?

Cheers,
Jeff

RE:protected mode VESA

Posted: Fri Oct 03, 2003 11:00 pm
by modshah
hi

by the way what is LFB ?


regards
modshah

RE:protected mode VESA

Posted: Sun Oct 05, 2003 11:00 pm
by knicos
linear frame buffer