VBE 2 without v86

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.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

VBE 2 without v86

Post by NickJohnson »

I've been reading the VESA VBE docs, and they seem to suggest that there is a way to switch modes entirely in protected mode as long as the card supports version 2.0 and above (which I assume all modern cards do, since the spec is from 1996.) First, is this actually true? Second, is there a reasonable guide on doing this, since the official documentation is a bit vague on how to actually call the functions from protected mode? Third, if this is possible, why does everything on the wiki say that VBE always requires v86? This seems like it could be much much simpler and give you the same effect, so we should be recommending it.
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: VBE 2 without v86

Post by Chandra »

NickJohnson wrote:I've been reading the VESA VBE docs, and they seem to suggest that there is a way to switch modes entirely in protected mode as long as the card supports version 2.0 and above (which I assume all modern cards do, since the spec is from 1996.) First, is this actually true? Second, is there a reasonable guide on doing this, since the official documentation is a bit vague on how to actually call the functions from protected mode? Third, if this is possible, why does everything on the wiki say that VBE always requires v86? This seems like it could be much much simpler and give you the same effect, so we should be recommending it.
Are you sure the documents are official? I've been using VBE2 documents as well, but I'm sure nothing is mentioned about PMI.As you know, it's VBE3 that supports PMI and so far I've not heard of any such thing being supported by VBE2. And Of course, I can't blame your documents for something I don't know.So, let's see if anyone has such experience.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: VBE 2 without v86

Post by NickJohnson »

Well, I've been using this document, which at least claims to be official. Section 4.2 has stuff about a protected mode interface, although I'm having trouble figuring out how you actually call its functions.

However, if only VBE 3 supports the protected mode interface, I'd still like to know about how to use it. How prevalent are cards that support VBE 3 nowadays?
Cognition
Member
Member
Posts: 191
Joined: Tue Apr 15, 2008 6:37 pm
Location: Gotham, Batmanistan

Re: VBE 2 without v86

Post by Cognition »

Not all cards support the protected mode interface described in the VBE spec. Even if they claim to be VBE 3 compliant. There is a protected mode interface available for some specific functions on VBE 2 cards (page flipping, etc.), but not mode setting. In general support for full VBE3 style protected mode interface seems to be spotty at best (in my experience anyways).

The method for finding and accessing the protected mode interface is described pretty well in the VBE 3 specification. It requires creating several segments and copying the VGA bios over iirc. It's quite similar to the BIOS32 interface, but once again it's not very well supported. In general if VM86 is available it's the best way to get things done, if not you can either use a real mode emulator or virtualization extensions if they're available on the processor (pretty much involves using VM86 mode through a VM).
Reserved for OEM use.
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: VBE 2 without v86

Post by quok »

Cognition wrote:Not all cards support the protected mode interface described in the VBE spec. Even if they claim to be VBE 3 compliant. There is a protected mode interface available for some specific functions on VBE 2 cards (page flipping, etc.), but not mode setting. In general support for full VBE3 style protected mode interface seems to be spotty at best (in my experience anyways).
Yes, that's correct... the VBE2 protected mode interface does not support mode setting, which is the primary reason it's not recommended for use I do believe. However, the VBE2 protected mode interface is 32-bit, and required by the VBE2 spec. VBE3 differs here as the protected mode interface is not only optional, but uses 16-bit protected mode. Support for the VBE3 protected mode interface is spotty at best, but it does support mode setting, as it is required to support all VBE3 functions if it is present.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: VBE 2 without v86

Post by NickJohnson »

Okay, well, I guess it won't work then. It's going to be particularly hard for me to use VM86 because I'm working in usermode (with port privileges). Is there actually a working implementation of a 80286 emulator that I could use to simulate the BIOS, or do people just suggest this because it is theoretically possible?
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: VBE 2 without v86

Post by quok »

x86emu is what's generally used for this purpose.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: VBE 2 without v86

Post by bewing »

And I've built a simplified emulator based on rebochs that does the same thing.
rdos
Member
Member
Posts: 3310
Joined: Wed Oct 01, 2008 1:55 pm

Re: VBE 2 without v86

Post by rdos »

I've not seen any system yet that supports the PMI interface, even though I once coded it just in case. Besides, providing V86 is much easier nowadays with the VME flag supported by most CPUs.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: VBE 2 without v86

Post by Combuster »

rdos wrote:Besides, providing V86 is much easier nowadays with the VME flag supported by most CPUs.
And which is broken in half of the virtual machines.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
rdos
Member
Member
Posts: 3310
Joined: Wed Oct 01, 2008 1:55 pm

Re: VBE 2 without v86

Post by rdos »

Combuster wrote:
rdos wrote:Besides, providing V86 is much easier nowadays with the VME flag supported by most CPUs.
And which is broken in half of the virtual machines.
Not much of an issue since the aim is not to run an OS in a virtual machine, but on real hardware, where it should not be broken. However, in practise, some low-end CPUs does not support VME, so if the target audience is low-end systems (like embeded systems), both VME and non-VME processors must be supported. I support both by having a module that emulates the x86 processor that I can attach when the processor has no VME (or possibly when VME is broken in a virtual machine), but that I can leave-out if it supports VME.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: VBE 2 without v86

Post by jal »

Cognition wrote:Not all cards support the protected mode interface described in the VBE spec.
This is a common meme on this board, but since there arem in practice, only three gfx cards families to deal with on PCs, i.e. Intel, AMD and nVidia, has anyone ever tried to check what VBE support they offer on their latest products?


JAL
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: VBE 2 without v86

Post by NickJohnson »

We can't: none of us have implemented the VBE 3 protected mode interface. :P
rdos
Member
Member
Posts: 3310
Joined: Wed Oct 01, 2008 1:55 pm

Re: VBE 2 without v86

Post by rdos »

NickJohnson wrote:We can't: none of us have implemented the VBE 3 protected mode interface. :P
Not true. But I've not yet seen a card with a working VBE 3 protected mode interface. :wink:
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: VBE 2 without v86

Post by jal »

rdos wrote:Not true. But I've not yet seen a card with a working VBE 3 protected mode interface.
What do you call "working"? Do they just not support VBE3, or is their implementation of it faulty?


JAL
Post Reply