It's been a few months since this was posted; max offered to copy it over to the wiki, but you said you'd get around to it. Is it safe to assume now that it's not going to happen, and we can take max up on his offer?

This is one of the more helpful VESA write ups and it'd be great to have it on the wiki.

VESA TutorialHello. Today, I'm posting specifically to teach people who want graphics all about VESA. That means that in less than 30 minutes, you'll be able to have a high-color graphics world in your OS!

How can I get/use the real screen resolution?Also does Windows use VBE for graphics? (If not, what?)

Search for EDID. Monitor reports loads of things with it about itself. Its documentation is available on the VESA site. I wish I could elaborate, but tbh, I am a noobass here yet.) On my target, there is two LCD controllers driving HDMI port. GPU isn't involved here at all. You somehow get access to EDID through I2C, and then knowing what the monitor supports, set aforementioned LCD controllers appropriately. Not only resolution, - timings, framebuffer format, DMA/interrupts etc. It's a long way to learn for me yet.)

If you mean the display's optimal screen resolution, you should use EDID. The EDID is a block of information that the monitor reports about itself, and it includes the optimal screen resolution.

ARISTOS wrote:

Also does Windows use VBE for graphics? (If not, what?)

Windows uses VBE when there is no graphics driver available, otherwise it uses the graphics driver which would also normally allow things like acceleration, hardware blitting and other features that wouldn't be possible using VBE.

zaval wrote:

You somehow get access to EDID through I2C, and then knowing what the monitor supports, set aforementioned LCD controllers appropriately. Not only resolution, - timings, framebuffer format, DMA/interrupts etc.

Unless you're writing a graphics driver, you don't need to know that many details on how to communicate with the monitor itself; VESA offers function 0x4F15 which allows you to request the EDID block. The BIOS does all the dirty work for you in this function. Look at the VBE EDID specification. The defined structures tell you all you need to know.

In case the EDID function fails or the information in it isn't valid, you can either use a default mode (like 640x480 or 800x600) or ask the user for their preferred mode from the list of supported modes.

_________________You know your OS is advanced when you stop using the Intel programming guide as a reference.[My OS]

Unless you're writing a graphics driver, you don't need to know that many details on how to communicate with the monitor itself; VESA offers function 0x4F15 which allows you to request the EDID block. The BIOS does all the dirty work for you in this function.

In case the EDID function fails or the information in it isn't valid, you can either use a default mode (like 640x480 or 800x600) or ask the user for their preferred mode from the list of supported modes.

EDID works I got the resolution of the screen, Do one of the non standard mode os VBE will contain it?Also I would like to use multiple screens with different resolutions and have different memory address to access them. Am I asking too much?

_________________How people react when a new update of your OS is coming:Linux user: Cool, more free stuff!Mac user: Ooh I have to pay!Windows user: Ah not again!

EDID works I got the resolution of the screen, Do one of the non standard mode os VBE will contain it?

Yes. You should scan the supported modes to find the screen resolution you want. On top of that, you should never rely on "standard modes," because most BIOSes support them for backward compatibility only, and the specification says they really don't have to support them if they don't want to. So you should always scan modes and not hardcode numbers.

ARISTOS wrote:

Also I would like to use multiple screens with different resolutions and have different memory address to access them. Am I asking too much?

VBE does not offer multiple monitor support. You'll need a real graphics driver to achieve that, and each graphics device will implement it in a different way.

_________________You know your OS is advanced when you stop using the Intel programming guide as a reference.[My OS]

How can I get/use the real screen resolution?Also does Windows use VBE for graphics? (If not, what?)

Search for EDID. Monitor reports loads of things with it about itself. Its documentation is available on the VESA site. I wish I could elaborate, but tbh, I am a noobass here yet.) On my target, there is two LCD controllers driving HDMI port. GPU isn't involved here at all. You somehow get access to EDID through I2C, and then knowing what the monitor supports, set aforementioned LCD controllers appropriately. Not only resolution, - timings, framebuffer format, DMA/interrupts etc. It's a long way to learn for me yet.)

I really dislike posting to necro'd threads but I got a question here. Are the display controllers for those ARM SoCs you're working with (the ones driving the HDMI port, not the number crunching GPU chips) typically documented? If I know the timings, is the documentation sufficient to set them? Is there documentation on how to drive the I2C bus? The I2C (as well as DDC and EDID) protocol is fairly simple (a few lines of C code); the question is if access to the pins itself is documented.

_________________managarm: A microkernel-based OS that is capable of running a Wayland desktop

Who is online

Users browsing this forum: No registered users and 1 guest

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