Page 2 of 2

Re: VBE Questions

Posted: Thu May 09, 2013 2:07 am
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.

Re: VBE Questions

Posted: Thu May 09, 2013 4:56 am
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

Re: VBE Questions

Posted: Thu May 09, 2013 5:06 am
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

Re: VBE Questions

Posted: Thu May 09, 2013 5:16 am
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

Re: VBE Questions

Posted: Thu May 09, 2013 11:24 am
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

Re: VBE Questions

Posted: Thu May 09, 2013 1:17 pm
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.