OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:34 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Some questions about VESA 3.0
PostPosted: Mon Feb 11, 2019 2:13 pm 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
Good day!
I have some questions about VESA 3.0.

Does any emulator have support for VESA 3.0?
Does VESA 3.0 support for high graphic modes then 1024x768 like 1366x768?
I was read then VESA 3.0 can start graphic mode from protected mode without BIOS, how it work? Is there ports for VESA?
Is graphic cards support VESA 3.0 on real hardware?
Where is Apendix 5 in specification?

I read VESA 3.0 specification but I am confused with get graphic mode from protected mode. Please help me.

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Mon Feb 11, 2019 4:39 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
Hi,

Yes it does support high resolution modes. When talking about real hardware it would depend on your GPU + monitor combo.
Forget about the protected mode interface part, it was poorly supported at best or not supported at all. I think Haiku OS has a workaround that tries to fix this, still not something you can relay on.
There aren't any "ports" as such, it is a completely different interface.
VBE 3.0 is badly broken on some modern GPUs and it needs some patching (again I think Haiku OS does some magic to solve it).
Appendix 5 is right here: http://www.phatcode.net/res/221/files/vbe20.pdf
So again, forget about accessing the VBE from protected mode, there are other more viable options:
1.Write a Virtual 8086 emulator. Relatively easy to do, works really well, can "coexist" with protected mode, has paging. Not supported on x64. My personal choice.
2.Write/port an x86 emulator. Quite a task. Works on x64 doe.
3.Write a dedicated GPU driver. Not quite doable, no publicly available specs, hard to write even if you had them. (except Intel HD graphics).
4.Drop to real mode and do your business. Simple but complicated at the same time. You would have to disable paging, be limited to only 1 MiB of RAM, quite a challenge. Not my favorite.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Tue Feb 12, 2019 6:09 am 
Offline
Member
Member

Joined: Tue May 13, 2014 3:02 am
Posts: 280
Location: Private, UK
Octacone wrote:
1.Write a Virtual 8086 emulator. Relatively easy to do, works really well, can "coexist" with protected mode, has paging. Not supported on x64. My personal choice.


V86 isn't an emulator! It's a CPU "mode" (and one that's actually not much different from normal Ring-3 Pmode; just some differences in how the segment registers work, interrupt handling, etc.).

Octacone wrote:
2.Write/port an x86 emulator. Quite a task. Works on x64 doe.


I've done this (port; not write). I had it working in an afternoon. The "libx86emu" emulator is very easy to port, was designed specifically (by SciTech) for running video BIOS code and has been used as such in multiple well-known OSs. Even Windows uses this method (probably not this code; although I won't be particularly surprised if MS had licenced SciTech code at some point) to access VBE on 64-bit systems. SciTech were the experts on graphics driver development in the 1990s-early 2000s, producing loadable VBE-compatible DOS TSRs for cards without (good) native VBE support, comprehensive sets of graphics drivers for non-mainstream OSs (particularly OS/2), etc. It's a shame that their one-time pledge to release their software as Open Source never came about.

Octacone wrote:
3.Write a dedicated GPU driver. Not quite doable, no publicly available specs, hard to write even if you had them. (except Intel HD graphics).


Intel isn't the only documented GPU out there... Also, if you're only interested in 2D/framebuffer graphics (that's all you'll get from VBE anyway), both the X.org project and the Linux kernel ("fbdev" drivers) have reasonably understandable (and relatively portable) drivers for a huge selection of video devices. There's also the (somewhat dated) SVGAlib collection.

Octacone wrote:
4.Drop to real mode and do your business. Simple but complicated at the same time. You would have to disable paging, be limited to only 1 MiB of RAM, quite a challenge. Not my favorite.


I also wouldn't recommend doing this; it's fairly reasonable if you do it once during startup (at which point you may as well do it before switching to pmode or via your bootloader), but switching to real-mode at runtime risks losing interrupts, which can cause significant problems with things like networking, DMA-based I/O, etc.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Tue Feb 12, 2019 12:56 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
mallard wrote:
V86 isn't an emulator! It's a CPU "mode" (and one that's actually not much different from normal Ring-3 Pmode; just some differences in how the segment registers work, interrupt handling, etc.).


Of course it is a CPU mode, never said otherwise. I should have used a word "monitor", you basically wait for a Global Protection Fault and then "emulate" one instruction after the other until a certain point. You need to implement like push, pop, int, iret, cli, sti and some override prefixes I believe.

mallard wrote:
Intel isn't the only documented GPU out there... Also, if you're only interested in 2D/framebuffer graphics (that's all you'll get from VBE anyway), both the X.org project and the Linux kernel ("fbdev" drivers) have reasonably understandable (and relatively portable) drivers for a huge selection of video devices. There's also the (somewhat dated) SVGAlib collection.


Sure there are some other specs such as for AMD (older cards I believe) cards or Virtio (practically non-existent outside of the emulated world) + some nouveau docs. You can't realistically expect anything else that a framebuffer driver anyways. GPUs are very complex devices that require a good amount of studying before you can code anything (if you plan on doing anything else than a mode setting driver).

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Tue Feb 12, 2019 1:47 pm 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
Thank you for answers. I have some questions about VBE. I want start my operating system on real computer but VGA mode is too small for me.

I read than GRUB can start graphic mode. Is GRUB use VBE?
Is VBE support better modes than 1024x768?
Is graphic cards support VBE?

Please help me.

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Tue Feb 12, 2019 4:43 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
The common denominator for graphics cards used to be VBE 2.0 (and not 3.0), which already does support higher resolutions. If GRUB runs off the legacy BIOS it can use VBE and set basically any mode for you - just beware of the fact that not every screen will appreciate you giving it 1920x1080.

GRUB can also run off EFI and use its video functionality - the likely configuration for modern computers. However, that firmware has shown to be greatly inferior in terms of the feature set - unless things have improved over the past 3 years you might find you have exactly two options: text mode and one graphics mode of the cards choosing - which is usually not a high resolution to make sure it works on all monitors.

_________________
"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 ]


Top
 Profile  
 
 Post subject: Re: Some questions about VESA 3.0
PostPosted: Sat Feb 16, 2019 9:33 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
Thank you for answers!

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 73 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group