Spotlight › EGA
EGA detection and 350-line output
A corrected adapter probe and a 640x350 desktop using the existing planar renderer.
- 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.
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.
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.