VBE Questions

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.
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

Re: VBE Questions

Post by rdos »

PearOs wrote:That's a good point RDos, maybe ill try that approach. What would be really cool is to have a 8086 emulator in long mode and I think just load a VBE Bios and execute its code.
You don't load a VBE Bios. It must already be present. If you have a modern CPU that supports VME, there really is no need for an emulator either if you use v86 mode.
PearOs wrote: I think that's what someone above was talking about doing. But there's only two problems. I don't know enough about 8086, which I can find info on, and the other is that I don't have a VBE Bios image anywhere. Now aside from going from long mode to protected mode and back to work with the VBE and VESA Bios. Do you think the speed would relatively fast? Or would I have huge speed issues? Thanks, Matt
Speed doesn't matter since you only need to switch video-modes using VBE. You should select modern video modes that use LFB (Linear Frame Buffer), as these doesn't need any VBE support beyond setting them up.
PearOs wrote:You know, there's one thing I don't understand. Its obvious that Windows Xp for example is running in protected mode. But I have a desktop that needed a graphics card driver, and didn't have one installed. So the only resolution available was 800x600 which I mean isn't too bad. But how can Windows achieve this? I mean if I only had 800x600 I really wouldn't mind, but how can they support that without any drivers for my card? Maybe a generic driver? And if so could I write the same thing in my Os? Where would I find info on it? Thanks guys, Matt
That's not so strange. I can switch to all the supported video modes (at least those returned by the VBE interface) without a specific graphics card driver. That's the big benefit of using VBE.
freecrac
Member
Member
Posts: 69
Joined: Thu Sep 20, 2012 5:11 am
Location: germany hamburg

Re: VBE Questions

Post by freecrac »

rdos wrote:That's not so strange. I can switch to all the supported video modes (at least those returned by the VBE interface) without a specific graphics card driver. That's the big benefit of using VBE.
It sounds like there is no problem of using the LFB-address that we can get from the VBE_mode_info_buffer+28h together with the longmode.
And we do not need another way for to get the LFB-address like to search for devices on the PCI-bus.
Can you agree this speculation?

Dirk
User avatar
Luis
Member
Member
Posts: 39
Joined: Sat Feb 16, 2013 11:19 am

Re: VBE Questions

Post by Luis »

Hi,
freecrac wrote:It sounds like there is no problem of using the LFB-address that we can get from the VBE_mode_info_buffer+28h together with the longmode.
And we do not need another way for to get the LFB-address like to search for devices on the PCI-bus.
Can you agree this speculation?

Dirk
Yes. For VBE you don't have to worry about PCI spec.


Cheers,

Luís
freecrac
Member
Member
Posts: 69
Joined: Thu Sep 20, 2012 5:11 am
Location: germany hamburg

Re: VBE Questions

Post by freecrac »

Luis wrote:Hi,
freecrac wrote:It sounds like there is no problem of using the LFB-address that we can get from the VBE_mode_info_buffer+28h together with the longmode.
And we do not need another way for to get the LFB-address like to search for devices on the PCI-bus.
Can you agree this speculation?

Dirk
Yes. For VBE you don't have to worry about PCI spec.


Cheers,

Luís
Thank you.

Dirk
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: VBE Questions

Post by PearOs »

So I set the VBE mode in real mode and get the LFB. But what is the equations for setting and getting pixels in long mode? Thanks, Matt
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

Re: VBE Questions

Post by rdos »

PearOs wrote:So I set the VBE mode in real mode and get the LFB. But what is the equations for setting and getting pixels in long mode? Thanks, Matt
The only thing you need to do is to map the physical LFB address with paging to some linear address, and write using that address. The bit-organisation of the VBE modes are available from VBE.
Post Reply