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.

Open SVGA in the terminal

What you will do

  1. draw the reference scene in 24-bit colour ref

    A 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.

  2. read the VbeInfoBlock the card returns vbe info

    VESA 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.

  3. list the standard VESA mode numbers vbe modes

    Mode 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.

  4. set 640x480 in 256 colours mode 101h

    Mode 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.

  5. see how much memory each mode demands vram

    A 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.

  6. push to 800x600 in 256 colours mode 103h

    800x600 was VESA's first standard, published in 1989, and the resolution that made "Super VGA" mean something specific rather than "better than VGA".

  7. work out the byte offset and bank of one pixel addr 320 240

    offset = 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.

  8. move the 64 KB window over the frame buffer bank 3

    Real 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.

  9. switch to the VBE 2.0 linear framebuffer lfb on

    VBE 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.

  10. set 640x480 hi-colour, 15 bits per pixel mode 110h

    Sierra 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.

  11. see the reference in RGB555 bpp 15

    Five 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.

  12. set 640x480 in 65,536 colours mode 111h

    Mode 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.

  13. see the reference in RGB565 bpp 16

    Green 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.

  14. pack one colour into a 16-bit word pack 255 128 0

    word = (r>>3)<<11 | (g>>2)<<5 | (b>>3). Three bytes in, two bytes out, and the low bits of every channel are simply gone.

  15. watch green keep its extra bit pack 0 255 0

    Unpacking 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.

  16. set 640x480 true colour mode 112h

    Mode 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.

  17. see the scene with nothing thrown away bpp 24

    16,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.

  18. drop to 256 indexed colours and watch it break bpp 8

    At 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.

  19. break the bands with a Bayer matrix dither ordered

    Bryce 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.

  20. spread the error instead of hiding it dither fs

    Floyd 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.

  21. choose 16 colours from the image itself quantize 16

    Median 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.

  22. compare an adaptive palette against a fixed one quantize 256

    Same 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.

  23. read a BMP header field by field bmp

    Windows 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.

  24. see the 256-colour limit and how LZW packs it gif

    CompuServe 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.

  25. apply mild lossy compression jpeg 80

    Baseline 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.

  26. crank the loss up until the 8x8 blocks show jpeg 20

    Each 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.

  27. see how lossless filtering earns its compression png

    PNG 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.

  28. put CGA, EGA, VGA and SVGA on one screen compare

    One 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.

  29. Boss missionrender the finished four-quadrant poster, 8-bit quadrant dithered poster

    Four 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.

Nearby eras

Previous
1987 · VGA
Program VGA mode 13h: 256 colours, the 18-bit DAC, poking the A000 framebuffer, palette cycling, Mode X and demoscene effects.
Next
1992 · 3D SOFTWARE
Build a software 3D renderer by hand: DDA raycasting, textured walls, fixed-point maths, BSP sectors, projection and depth sorting.

All 25 eras in the Terminal Academy

Open SVGA in the terminal