Hi,
StudlyCaps wrote:
Apologies for off topic, but what do you think of starting with something like Intel HD instead of Cirrus of 3dfx? It seems that the standards are quite open, and honestly, I don't think I could find a real Cirrus or Voodoo card in 2018 if my life depended on it!
The standards are relatively open; but without prior experience it's very hard to understand any of it, and trying to debug a video driver when there's no video (because the video driver needs debugging) adds an extra layer of difficulty on top of that. Writing a video driver for an emulator (where you can use a debugger) gets you the prior experience that makes it "less hard" to understand (parts of) Intel's documentation.
Mostly; I'd start with Cirrus Logic (it's supported by both Bochs and Qemu) and then maybe consider "VMware SVGA-II" (supported by both Qemu and VMware). After that I'd try to find a real computer that has Intel's integrated video plus something else, where something else is/can be configured as "primary display adapter". That way I'd be able to use a working "raw framebuffer setup by boot loader" video driver for the primary display adapter (to see debugging messages, etc) while writing a proper driver for Intel's integrated video.
For writing a video driver; I'd want to start by trying to figure out which (VGA, HDMI, DVI, ..) ports there are and which ones have a monitor plugged in; then getting information/EDID from the monitor/s; then basic video mode switching (including using EDID to get the timing right); then monitor power management (sending the display into standby, etc) and backlight control (if its a laptop); then hot-plug events (for when a monitor is plugged in or unplugged). Next I'd probably add support for "unused video RAM as swap space"; then try to get vertical sync and page flipping to work. At this point I'd stop and move on to the next video card.
After "initial support" is finished for all video cards (and after I've died from old age in several of my lives - I'm hoping that's how it works) I'd revisit each video card driver. For "round two"; I'd start by adding support for any fixed function hardware (hardware mouse cursor, hardware bitblits, 2D and 3D graphics accelerators in old video cards, movie/MPEG/H.265 decoders). Then (for newer video cards) I'd do GPGPU (not for graphics), followed by GPU (for graphics - shaders or whatever); and GPU power management.
Cheers,
Brendan