VGA controller documentation

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
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

VGA controller documentation

Post 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
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: VGA controller documentation

Post 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
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: VGA controller documentation

Post 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.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: VGA controller documentation

Post 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.
rdos
Member
Member
Posts: 3297
Joined: Wed Oct 01, 2008 1:55 pm

Re: VGA controller documentation

Post 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.
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: VGA controller documentation

Post 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.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
Post Reply