How Windows 3.11 Managed SVGA Video Memory
This article explores how Microsoft Windows 3.11 handled Super VGA (SVGA) video memory allocation and addressing within the confines of its 16-bit protected-mode architecture. Managing high-resolution, high-color graphics required the operating system and graphics drivers to overcome the legacy 64 KB VGA memory window. To achieve this, Windows 3.11 utilized a combination of hardware bank switching, protected-mode selector tiling, emerging Linear Frame Buffering (LFB), and dedicated 32-bit Virtual Display Drivers (VxDs).
The 64 KB Real-Mode Memory Window and Bank Switching
Standard IBM VGA architecture originally allocated a single
64-kilobyte aperture in the upper memory area, spanning physical
addresses A0000h to AFFFFh. Standard SVGA
resolutions—such as 800x600 or 1024x768 at 256 colors or higher—required
far more memory than this 64 KB window could contain (for example, an
800x600 display at 8-bit color required roughly 480 KB).
To overcome this, early SVGA implementations in Windows 3.11 relied
on bank switching (or paging). The SVGA display driver divided the
physical video RAM on the graphics card into discrete 64 KB banks.
Whenever the Graphics Device Interface (GDI) needed to draw to a section
of the screen outside the currently mapped bank, the video driver
reprogrammed the graphics card's onboard paging registers (often using
VESA BIOS Extensions or proprietary chipset registers) to redirect the
A0000h physical aperture to the requested bank of video
memory.
Selector Tiling in 16-bit Protected Mode
Because Windows 3.11 was built upon a 16-bit segmented protected-mode architecture, memory pointers were limited to a 16-bit offset, restricting any single segment descriptor to a maximum of 64 KB.
To bridge this architectural limitation with display memory, Windows 3.11 used a technique called selector tiling. The driver allocated an array of contiguous segment selectors via the Windows kernel. Each selector pointed to a successive 64 KB boundary. When software addressed memory across a 64 KB boundary, the driver advanced to the next selector. In bank-switched environments, the driver used custom low-level drawing routines to detect bank crossings during raster operations, ensuring the appropriate hardware bank was switched in before writing pixels.
Linear Frame Buffering (LFB)
As VESA Local Bus (VLB) and PCI expansion slots gained popularity
during the Windows 3.11 era, graphics cards could bypass the traditional
A0000h bottleneck. Under 386 Enhanced Mode, Windows 3.11
could take advantage of the 32-bit flat addressing capabilities of the
80386/80486 processors.
Advanced SVGA drivers and hardware compliant with VESA VBE 2.0 supported Linear Frame Buffering (LFB). Using LFB, the graphics card mapped its entire video memory buffer into a single, contiguous physical address space high above physical system RAM (typically above the 2 GB or 3 GB boundary). The Windows 3.11 video driver then mapped these high physical addresses into a linear virtual memory space. This completely eliminated the performance penalty of bank switching, allowing high-performance drawing routines to access the entire frame buffer continuously.
The Role of Virtual Display Drivers (VDDs)
Because Windows 3.11 allowed multiple MS-DOS sessions to run
concurrently with the graphical environment, hardware contention was a
critical issue. SVGA memory state was managed using a specialized 32-bit
Virtual Device Driver (*VDD).
The VDD intercepted direct hardware register access and tracked the video memory state and active banking registers. When a user switched between the Windows desktop and a full-screen or windowed DOS application, the VDD saved and restored the active SVGA register states and memory contents, ensuring that video memory allocations for the Windows desktop remained intact and isolated from background tasks.