How much do you support VGA?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
RaffoPazzo
Posts: 23
Joined: Tue Apr 05, 2011 11:34 am

How much do you support VGA?

Post by RaffoPazzo »

Do you guys support VGA by BIOS call or do you go on your way implementing VGA driver?
Why do you do it that way?
Do you support all VGA features or Just the text mode to have (early) console leaving GUI to graphics card?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How much do you support VGA?

Post by Combuster »

If you use BIOS calls, it's just as easy to support VBE instead of VGA, and you get mostly superior results with that. The thing with VGA is that it is the simplest device to write a graphics driver for, both in terms of relative simplicity and in terms of available documentation and prior art. Therefore you are not likely to see a VGA implementation that depends on BIOS calls.

I have an operational graphics driver for VGA for both 4bpp and 8bpp modes including palette support, but there's still a lot of work to do in the graphics subsystem before all the features can be practically used (among which there are things that emulators really don't like). Especially if there's also another a dozen of other drivers to maintain.
"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 ]
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: How much do you support VGA?

Post by Chandra »

Normally, it is desirable to invoke BIOS calls, in the early stage of the OS development. For the time being, you can stick with the BIOS calls but for long run you will definately be looking for a major graphics driver or some such. So my personal recommendation here would be to write the basic VGA driver at the very least. Once done, you can then jump to VESA driver. VESA 2 and lower implement BIOS calls so you don't have to do much with the driver. So you may prefer to write the driver for VESA 3 as well. Furthermore, you can try writing drivers for specific graphic cards, but that's certainly going to cost you a lot of work.
Cheers!
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: How much do you support VGA?

Post by jal »

Chandra wrote:Normally, it is desirable to invoke BIOS calls, in the early stage of the OS development.
That depends a bit on what you're doing. I use GRUB, and hence start in protected mode, so directly accessing the (text mode) video memory is much easier than going through the BIOS.


JAL
Post Reply