The VGA Attribute Controller Is Weird
76 points
13 days ago
| 2 comments
| os2museum.com
| HN
corysama
12 days ago
[-]
Back in the day, Michael Abrash wrote quite a bit about how people would occasionally discover new video modes that VGA was capable of. Or, at lease some VGA controllers could support and others would crash the machine without warning.

For Quake1 he wrote a little script language around each step of setting up the various modes. With that, it was much easier to navigate the maze of “Step A and C both failed, that means it’s a Type 3 device and Step D will crash so, we should skip to the Branch 3 Path and hope for success at a lower resolution.”

reply
hagbard_c
12 days ago
[-]
> Back in the day, Michael Abrash wrote quite a bit about how people would occasionally discover new video modes that VGA was capable of

That was not just true for VGA but for many of the ...interesting... cards which were put on the market 'back in the day'. I had one of those, a 'Diamond Brand' multi-IO + Hercules + memory card without documentation or drivers I happened upon at one of the then-ubiquitous hardware dump meets - it was the 'PC Dumpdag' in Amsterdam for those who remember that phenomenon - with which I spiced up my otherwise somewhat boring Bondwell BW 32. While working on a TSR (as in 'background routine') which would make it possible to automate data entry into some school management software package I ended up flipping a bit on the 6845 display controller on the thing upon which the vertical resolution suddenly doubled. Instead of 80 columns 25 lines it now displayed a somewhat compressed and initially messed up 80x50. Experimenting further I got it up to 80x70 and 132x70. I made another TSR to enable mode switching and used this quite a lot when working in Wordperfect and the like. It also did double the normal (720x348) graphics resolution which I got to work in a few programs but which was less useable than the text modes. I tested this program on many other boards but never found another one where it worked, alas.

reply
bombcar
12 days ago
[-]
I remember trying every single SVGA driver that came on the SimCity 2000 CD until I found one that would let the game load; the board I had was some no-name knockoff, but the OAK TECHNOLOGIES driver worked.
reply
Zardoz84
12 days ago
[-]
I had the same issue! (but was Sim City 2000 on floppy disks). And I had a OAK SVGA card ... an OAK OTI 87 or 84, if I remember correctly.

Also, I remember that with some tools that come on a floppy disk with the card, I could output a 1024x768 graphics scree, but with a horrible blinking... I think that I was putting my multi-sync monitor at the limit.

reply
moosedev
11 days ago
[-]
A lot of monitors* in that era (1994ish) that could handle 640x480 or 800x600 at an acceptable-ish refresh rate of 60, 72, or 75Hz, could only do 1024x768 as an interlaced mode - meaning odd and even lines were drawn on alternate frames, so the overall refresh rate was effectively halved. The lack of phosphor persistence over such long "frames" manifested as visible flicker. IIRC, 1024x768 @ 43Hz interlaced was a common (supported, if rarely used) standard. It hurt.

* Graphics card RAMDAC bandwidth was a limiting factor for higher resolutions x higher refresh rates, too. And video memory limited higher desktop resolutions x higher color depths for years - really until 3D accelerators were coming of age.

reply
vintagedave
12 days ago
[-]
Do you still have the board?
reply
hagbard_c
11 days ago
[-]
No, when I moved from the Netherlands to Sweden some 22 years ago I put out several cubic metres of hardware and software for all to come and loot since I only had a small truck to move all my stuff in one go. That board was in one of the machines and hopefully found a new life elsewhere.
reply
livrem
12 days ago
[-]
I thought of his Black Book when reading about the VGA registers. He goes quite deep into how the VGA hardware works. Interesting to read, but I only read it around 2010. Would have been much more useful to have read in 1990.

https://github.com/jagregory/abrash-black-book

reply
Koshkin
12 days ago
[-]
Love these kinds of articles. (Now, I can only imagine how insanely more complex the modern hardware is!)
reply
kevingadd
12 days ago
[-]
If you want something interesting on that topic, here's a fantastic explanation of one complex part of modern graphics hardware and how it varies across vendors https://www.gfxstrand.net/faith/blog/2022/08/descriptors-are...
reply
yencabulator
11 days ago
[-]
Modern hardware is complex (there's a computer at the other end too), but sometimes people actually succeed in making the interface simpler. NVMe is a surprisingly simple hardware interface from the driver's perspective, just ringbuffers in memory. Many modern network devices are similar, but not standardized.
reply