How Windows 98 Handled Game Resolution Changes

During the late 1990s, PC games frequently required lower display resolutions—such as 320x200 or 640x480—to maximize graphics performance, differing sharply from the native resolution of the desktop. Microsoft Windows 98 managed these transitions by granting games low-level hardware control through the DirectX API, temporarily superseding the standard Graphical Device Interface (GDI), and commanding the video driver to alter the monitor’s physical scanning mode before restoring the desktop state upon exit.

DirectDraw and Exclusive Mode

Windows 98 relied primarily on DirectX (specifically DirectDraw) to bridge the gap between Windows software and graphics hardware. When a game launched in full-screen mode, it requested an "Exclusive" cooperative level via the IDirectDraw::SetCooperativeLevel API call.

By acquiring exclusive access, the game effectively locked out the Windows GDI—the subsystem responsible for rendering standard desktop elements like windows, icons, and the taskbar. This exclusive lock prevented background applications from drawing over the game and granted the application direct authority to define the video adapter's operational state.

Invoking Hardware-Level Mode Switches

Once exclusive access was established, the game requested a new screen resolution and color depth using DirectDraw’s SetDisplayMode method or the Win32 API function ChangeDisplaySettings. Windows 98 communicated this instruction down to the video adapter through either legacy VxD (Virtual Device Driver) or the newer Windows Driver Model (WDM) architecture.

The graphics driver adjusted the hardware pixel clock, timing signals, and internal frame buffer configuration. On the cathode-ray tube (CRT) monitors prevalent at the time, this hardware shift physically altered the horizontal and vertical refresh rates. This process caused the characteristic audible click of internal relays inside the CRT monitor, followed by a momentary black screen while the monitor's electron guns recalibrated to the new raster timings.

Memory Reallocation and Direct Framebuffer Access

In standard desktop operation, Windows 98 managed video memory (VRAM) to hold the desktop surface and off-screen bitmaps. When a game changed the display resolution, DirectDraw reorganized the VRAM to match the new dimensions and bit depth.

Running at a lower resolution (such as 640x480 at 16-bit color) drastically reduced the memory footprint required for the primary display surface. This freed up scarce VRAM, allowing the game to allocate front and back buffers for smooth page flipping, as well as dedicated space for hardware-accelerated 3D textures.

Handling Task Switching and Desktop Restoration

Windows 98 had to account for users pressing Alt+Tab to leave a game. When an exclusive-mode game lost focus, the operating system intervened:

  1. Surface Invalidation: DirectDraw marked the game’s video memory allocations as "lost" (DDERR_SURFACELOST). The game stopped rendering to the active frame buffer.
  2. Resolution Reset: Windows 98 called the display driver to restore the user's default desktop resolution, color depth, and refresh rate.
  3. GDI Redraw: The operating system signaled the GDI to repaint the desktop, restoring the taskbar and open application windows.

When the user switched back to the game, the sequence reversed. The driver changed the display mode back to the game's configured resolution, and the game had to manually reload its textures, sprites, and surfaces back into VRAM before resuming gameplay.