SVGA, 1991
Once resolutions and colour depths multiplied, VESA VBE became the way to ask a card what it could actually do. This era reads the VbeInfoBlock, switches banks, walks 8-bit up to 24-bit colour, then covers quantization and the image formats that followed.
Graphics track · 29 missions · boss mission, written exam and certificate · free, no signup. Everything below runs in the browser terminal on the SERVBG home page.
What you will do
- draw the reference scene in 24-bit colour
refA 640x480 24-bit frame is 921,600 bytes. VGA mode 13h was 64,000 and fit in one real-mode segment; this does not, and everything in this era follows from that.
- read the VbeInfoBlock the card returns
vbe infoVESA was founded in 1988 by NEC Home Electronics and eight other board makers after every SVGA maker invented its own register layout. VBE 1.2 (1991) gave one BIOS call, INT 10h AX=4F00h, that any card answers with the signature "VESA" and its mode list.
- list the standard VESA mode numbers
vbe modesMode numbers from 100h up are VESA numbers, identical on every conforming card; numbers below 100h stay the IBM BIOS ones, which is why mode 13h is still 13h.
- set 640x480 in 256 colours
mode 101hMode 101h is 640x480x8: 307,200 bytes. That is 4.8 times what mode 13h needed and the first VESA mode most DOS software bothered to support.
- see how much memory each mode demands
vramA 512 KB card could do 800x600 in 256 colours but not 640x480 in 16-bit colour. Memory, not the chip, set the ceiling, which is why buyers started asking how many megabytes a card had.
- push to 800x600 in 256 colours
mode 103h800x600 was VESA's first standard, published in 1989, and the resolution that made "Super VGA" mean something specific rather than "better than VGA".
- work out the byte offset and bank of one pixel
addr 320 240offset = y * pitch + x * bytes_per_pixel. Pitch is bytes per scanline, not pixels, and on some cards it was padded wider than the visible width.
- move the 64 KB window over the frame buffer
bank 3Real mode could address only 64 KB at A000h, so VBE function 4F05h slid that window over the frame buffer. A full-screen fill in mode 101h spans five 64 KB banks.
- switch to the VBE 2.0 linear framebuffer
lfb onVBE 2.0, November 1994, mapped the whole frame buffer above 1 MB as one flat block. No window, no 4F05h call in the inner loop, but you needed a 32-bit protected-mode program to reach it.
- set 640x480 hi-colour, 15 bits per pixel
mode 110hSierra Semiconductor shipped the HiColor DAC in 1989: 15 bits per pixel, 5 per channel, one bit wasted for the sake of a trivial packing. 32,768 colours with no palette lookup at all.
- see the reference in RGB555
bpp 15Five bits per channel gives 32 levels each. The sky gradient is where that shows first, because a smooth ramp across 32 steps has visible edges the eye tracks easily.
- set 640x480 in 65,536 colours
mode 111hMode 111h is RGB565: the wasted bit of 555 handed to green. 614,400 bytes per frame, so this mode alone ruled out every 512 KB card.
- see the reference in RGB565
bpp 16Green carries roughly 59 percent of perceived luminance, so the spare bit buys more visible precision there than in red or blue. Sixty-four green levels against thirty-two of each other channel.
- pack one colour into a 16-bit word
pack 255 128 0word = (r>>3)<<11 | (g>>2)<<5 | (b>>3). Three bytes in, two bytes out, and the low bits of every channel are simply gone.
- watch green keep its extra bit
pack 0 255 0Unpacking replicates the high bits instead of shifting: 11111 becomes 11111111, so full-scale stays full-scale. A plain shift would cap white at 248 and tint every bright area.
- set 640x480 true colour
mode 112hMode 112h is 24 bits per pixel, 921,600 bytes, one byte per channel and no palette. 32-bit modes store the same three bytes plus a padding byte so each pixel sits on a 4-byte boundary.
- see the scene with nothing thrown away
bpp 2416,777,216 colours is past what the eye separates on a CRT, which is why 24-bit was called true colour and why the arms race moved from colour count to resolution and speed.
- drop to 256 indexed colours and watch it break
bpp 8At 8 bits the byte is an index, not a colour. The DAC holds 256 entries of 18 bits each, and every pixel on screen has to come out of those 256 choices.
- break the bands with a Bayer matrix
dither orderedBryce Bayer published the ordered threshold matrix in 1973. It is per-pixel, needs no memory and no neighbour, so hardware can do it in one pass, at the cost of a visible cross-hatch.
- spread the error instead of hiding it
dither fsFloyd and Steinberg, 1976: quantize a pixel, then push its error onto the neighbours not yet drawn, 7/16 right, 3/16 down-left, 5/16 down, 1/16 down-right. Better looking, but strictly serial.
- choose 16 colours from the image itself
quantize 16Median cut, Paul Heckbert 1980: put every sampled colour in one box, split the box with the widest spread at its median, repeat. The palette comes out of the picture instead of being assumed.
- compare an adaptive palette against a fixed one
quantize 256Same 256 slots, measurably less error: a fixed ramp spends entries on colours this image never contains. That is why GIF carries its palette inside the file.
- read a BMP header field by field
bmpWindows 3.0 (1990) fixed the 14-byte file header plus 40-byte BITMAPINFOHEADER at 54 bytes total. Pixels are stored B,G,R, bottom row first, each row padded to a multiple of 4 bytes.
- see the 256-colour limit and how LZW packs it
gifCompuServe shipped GIF87a in 1987 using Welch's 1984 LZW. It is lossless within its palette; the colour loss happens in the quantizer before the encoder ever runs.
- apply mild lossy compression
jpeg 80Baseline JPEG (ITU T.81, 1992) drops three quarters of the colour samples before it touches luminance, because the eye resolves brightness detail far better than colour detail.
- crank the loss up until the 8x8 blocks show
jpeg 20Each 8x8 block is transformed and its coefficients divided by a quantization table; at low quality the high-frequency terms round to zero and the block collapses toward its own average. The grid you see is the block grid.
- see how lossless filtering earns its compression
pngPNG 1.0 was specified in October 1996, months after Unisys started enforcing the LZW patent. Its per-row filters do not shrink anything; they shrink the range of the numbers so DEFLATE can.
- put CGA, EGA, VGA and SVGA on one screen
compareOne scene, four pipelines, ten years: 4 colours in 1981, 16 in 1984, 256 in 1987, 16.7 million in 1991. Every step was an argument about memory.
- Boss missionrender the finished four-quadrant poster, 8-bit quadrant dithered
posterFour pipelines, one scene, 1981 to 1991: fixed 4-colour palette, 16 of 64, 256 indices with the error spread by Floyd-Steinberg, and finally 24 bits where the value in memory simply is the colour. The next ten years spent all of it on triangles.
Certificate
This track is certifiable. Clear the boss mission in the terminal, then run EXAM SVGA for the written paper: 20 server-graded questions drawn from our own bank, pass mark 14 of 20. The certificate is issued once both are done, and it carries a verification code.