Page 1 of 1

VGA controller documentation

Posted: Sat Jan 16, 2021 4:35 pm
by nexos
Hello,
I am getting ready to start writing a VGA driver. Does anyone know of a good documentation for it? The wiki has an article about it, but it has a lot of missing pieces. Any docs will be useful.
Thanks,
nexos

Re: VGA controller documentation

Posted: Sat Jan 16, 2021 5:24 pm
by bzt
nexos wrote:Hello,
I am getting ready to start writing a VGA driver. Does anyone know of a good documentation for it? The wiki has an article about it, but it has a lot of missing pieces. Any docs will be useful.
Thanks,
nexos
I don't think its easy to get a doc these days, because VGA is obsolete for decades. I know it doesn't help you, but probably OSDev wiki is one of the best sources online.
Maybe try http://www.osdever.net/FreeVGA/home.htm (or edu mirror).

Ps.: I have two printed (for the young generation: off-line) books from the '90s with all the technical details (in my native language of course, Programming of VGA-card, and Practical Assembly). Those are very in-depth books written by enthusiastic reverse-engineering-is-the-best hackers. Both had floppies attached with the sources (Turbo Pascal and TASM), give me some time, maybe I can find those and upload them for you (you could use Google Translate to translate the comments).

Cheers,
bzt

Re: VGA controller documentation

Posted: Sat Jan 16, 2021 5:39 pm
by PeterX
The only good info source I know is this printed book:
https://www.goodreads.com/book/show/416 ... -vga-cards

I had it but I lost it (maybe during moving). I don't remember if it deals with the I/O ports or only with the BIOS interrupts.

Re: VGA controller documentation

Posted: Sat Jan 16, 2021 7:54 pm
by Octocontrabass
VGA is completely obsolete. Are you sure you want to write a driver for it?

If you want to push VGA hardware to its limits, I suggest Michael Abrash's Graphics Programming Black Book.

If you want a register cross-reference, try VGADOC.

Re: VGA controller documentation

Posted: Sun Jan 17, 2021 8:01 am
by rdos
Octocontrabass wrote:VGA is completely obsolete. Are you sure you want to write a driver for it?

If you want to push VGA hardware to its limits, I suggest Michael Abrash's Graphics Programming Black Book.

If you want a register cross-reference, try VGADOC.
Right. VGA is completely obsolete.

VBE linear frame buffer or EFI linear frame buffer are the only reasonable choices for a graphics driver for real hardware today. Unless you want to write a driver for some modern graphics accelerator hardware, which is a whole lot more complicated, but also gives much better results.

Re: VGA controller documentation

Posted: Sun Jan 17, 2021 9:43 am
by nexos
It looks like FreeVGA is the best resource. I wanted to get a little experience in coding native graphics drivers (as Intel HD graphics is the only modern GPU which looks feasible to implement). I will probably just stick to VBE for now, as that will make it easier to port to x86_64 EFI in the future.