Page 1 of 1

32-bit protected mode in C, screen resolution 1920x1080+

Posted: Wed Aug 07, 2013 10:15 am
by roban100
Hello!,

So I have recently been programming an operating system ( in C, 32-bit protected mode ).

And I have made a keyboard driver and some text printing, but now I would like to make
my operating system's resolution to go to 1920x1080+. I have no clue how to do it
since neither vesa or svesa is capable of doing such thing ( at least not on my computer )...
But still windows 7 can do it so there must be a way! :D

So I hope someone could give me a hint in the right direction ( if no more! ) :P.

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Wed Aug 07, 2013 10:29 am
by Antti
This is one big problem in hobby OSs. If VBE does not give you that video mode, you need to write native video drivers. Easiest way to start is to support some well-documented video cards. It is impossible to support all of them.

As a hint: writing native drivers is not probably the right direction at this point.

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Wed Aug 07, 2013 10:39 am
by bluemoon
If you really want to try 1920x1080, you can write driver for BGA(bochs VGA), I just verified you can pass 1920x1080 to set video mode and update screen using LFB without problem.

However, 1902x1080 without any kind of acceleration is plain stupid.

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Wed Aug 07, 2013 11:44 am
by madanra
What resolutions does VESA/VBE give you on your computer?

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Sat Aug 10, 2013 12:23 pm
by roban100
I think I will just use what I can get for now!

Thanks anyway ! :)

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Sat Oct 05, 2013 4:32 am
by Someone256
Just like what the others said, write drivers for well documented VGA cards. But writing VGA drivers is complex and takes for ever. Also, what is the resolution for your monitor? Mine is 1366x768 (16:9) but I use 1600x1200 VBE mode and fill the visible area with my graphics.

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Mon Oct 07, 2013 2:54 am
by Combuster
VGA drivers are easy. Dedicated Graphics drivers for pretty much any other video card is going to be quite the problem. :wink:

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Fri Oct 11, 2013 11:18 am
by AbstractYouShudNow
If you have a graphics card of a well-known brand (nVidia, ATI, Matrox...), well you're stuck because these cards are undocumented (though I heard that ATI was now managed by AMD and the specifications were being opened, but don't know at all if it's true). The problem is that the Windows drivers are coded by the companies themselves (because otherwise, they couldn't sell their silicon) and are closed-source. So if you want to code a graphics driver for these cards, then you'll have a hard time doing that, if you succeed at all. So as an alternative, if VGA, VESA and all documented stuff doesn't give you what you want, I suggest that you consider supporting Intel and AMD graphics cards shipped with modern CPUs (which have reasonnably good resolutions).

I've planned to contact nVidia when I'll get to implementing my GUI to ask if there is documentation available (either for free or not), but I'm still very far from it so you can either do that yourself, or just wait ;)

Re: 32-bit protected mode in C, screen resolution 1920x1080+

Posted: Fri Oct 11, 2013 11:53 am
by AndrewAPrice
AbstractYouShudNow wrote:I've planned to contact nVidia when I'll get to implementing my GUI to ask if there is documentation available (either for free or not), but I'm still very far from it so you can either do that yourself, or just wait ;)
Even with hardware documentation, they tend to be awfully complicated pieces of hardware.

If you're main focus is to build your own eco-system of graphical interfaces, APIs, etc. then perhaps it'd be worth building on top of the Linux or FreeBSD kernel, otherwise you're on your own.