ARISTOS wrote:
How can I get/use the real screen resolution?
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.