← All spotlightsPrograms / Features

Spotlight › EGA

EGA detection and 350-line output

A corrected adapter probe and a 640x350 desktop using the existing planar renderer.

Control
The os8088 desktop on an EGA card at 640x350, in the colour theme: a teal desktop, a Control Panel window with a dark blue title bar and grey chrome, drive A and drive B icons down the right-hand side, and the dock along the bottom.
EGA desktop at 640x350.
Resolution
640 x 350
Palette entries
16
Reported host
IBM 5160

01 / The original detection fault

The original detection fault

A report from an IBM 5160 with IBM EGA exposed a probe error: the kernel classified EGA as VGA and laid out a 480-line desktop on a 350-line display. Falling back to the CGA renderer avoided clipping but lost the EGA surface.

IBM's EGA technical documentation is the hardware reference. The fix distinguishes adapter capabilities before selecting desktop geometry.

02 / Reuse the planar path

Reuse the planar path

The selected EGA mode uses the same four-plane, 80-byte scanline organisation as the VGA desktop path, with a different height. The change adds detection, mode selection and geometry handling rather than a separate rasteriser.

Dock, icons and window bounds use the live surface dimensions.

Control
The Control Panel's Display page on an EGA machine, listing two options: Cga 640x200 and Ega 640x350, with Ega 640x350 selected. Below is a Set Primary button and the line Switches now, and is kept.
Adapter selection after the probe correction.

03 / Theme capability

Theme capability

The colour theme uses entries already present in the standard palette. It requires colour capability, not VGA-specific palette programming. Replacing the VGA-only gate with a colour-capability gate enabled EGA without increasing the recorded code size.

Locator
The os8088 desktop on an EGA at 640x350 in the default black and white theme, with the menu bar across the top, the clock and date at the right, drive A and drive B icons down the right-hand side and the dock along the bottom.
Default theme on the 350-line desktop.

04 / Test EGA

Test EGA

Use make xt-ega for the 86Box IBM EGA configuration. A forced VIDEO=ega QEMU build tests the 350-line drawing path but does not validate real-adapter probing. When EGA and VGA are both installed, VGA is preferred. Extended desktop mode does not use EGA as primary.