how Civilization & Colonization ran a planet in real-mode DOS

MPS LABS · HUNT VALLEY, MARYLAND · 1991 & 1994

A WORLD IN 640K

Sid Meier's Civilization (1991) and Sid Meier's Colonization (1994) each simulate centuries of a planet — terrain, nations, economies, war. Colonization ships 4.34 MB of decompressed art and roughly 450 KB of program, for machines whose entire arena for program, data and stack was 640 KB minus DOS. This site is the byte-level story of how it was done.

C:\MPS\CIV> the 1991 boot, as captured

  
Banner and prompt text as captured from a live boot under mddosem (2026-07-18, 720×400 text mode); copyright line omitted and layout approximated from the captured frame.
640 KB
the whole arena — program, data, stack and DOS itself
4.34 MB
Colonization's decompressed art, shipped as 2.31 MB (4,344,422 → 2,307,349 B)
54
overlay units across the two games — 23 Civ overlays + 31 Colonization pages
≈24 KB
Colonization's live world state; Civ's .SVE save is 37,856 B
608.8 Hz
the retuned system timer, measured live ≈300 ms into boot
1,031
self-patching call-gate thunks in viceroy.exe's paging machinery

The wall

Every DOS program was born into the same room. IBM's original PC handed the 8088's 20-bit address bus a single megabyte of address space and drew a line at 640 KB: below it, RAM for DOS and whatever you ran; above it, 384 KB reserved for hardware — video apertures, adapter ROMs, the system BIOS. As the Digital Antiquarian's Jimmy Maher puts it, IBM's engineers “reserved big chunks of ‘special’ memory for purposes that hadn't even been imagined yet”. In 1981 the split looked generous. Within a decade it was simply the wall, and every PC game was engineered against it.

The map below is that megabyte as both games found it. Note how little of it the games actually own: the amber band is everything — code, data, stack, decompression buffers, a planet. Hover any region for what it does.

The first megabyte, as both games found it hover a region for its role · replay the sweep below
system data (IVT · BDA · DOS) the 640 KB arena video windows adapter ROMs · UMB space system BIOS EMS page frame HMA (above 1 MB)
addresses exact · vertical scale compressed for legibility
Standard IBM PC real-mode address map. DOS-resident size and the 607 KB free figure are measured from our instrumented Colonization runs (period-typical driver overhead, first free paragraph at segment 0800); the games' INT 08h hooks were read live from guest memory, and the EMS-frame traffic measured from opening.exe's 207 INT 67h calls — all under mddosem, 2026.

The industry's escape hatch was expanded memory. EMS — announced by Lotus, Intel and Microsoft in 1985 — bank-switched 16 KB pages of extra RAM through a 64 KB window in the reserved area: four movable “lenses” aimed at megabytes the CPU could not otherwise address. Bill Gates, signing Microsoft up, as reported by Maher: “It's garbage! It's a kludge! But we're going to do it.” Extended memory (XMS) later offered honest block-copies above 1 MB, and DOS 5's DOS=HIGH parked part of the kernel in the 65,520-byte high memory area — a region that exists only because the 286's A20 address line fails to wrap the way an 8088's did — handing programs back up to 46 KB of the arena.

None of it moved the wall. A mid-range 1994 PC carried 4 MB of RAM behind a 486DX2-66; Colonization's manual still demands “at least 575,000 bytes of free conventional memory” — a requirement you met by editing CONFIG.SYS, not by buying hardware. Entire product categories (QEMM, MemMaker) existed to win back tens of kilobytes of that band. The two games on this site are what disciplined engineering looks like inside it.

Two games, two answers

MicroProse solved the arena twice, three years apart. Civilization is close to a solo work — “I did just about all the coding,” Meier told Game Developer — a 304,512-byte real-mode executable whose code is split into 23 overlays by Microsoft LINK's interrupt-driven overlay scheme. Colonization, written largely by Brian Reynolds, is one linker generation later: its 493,470-byte viceroy.exe carries a software virtual-memory system — RTLink/Plus — that demand-pages 31 chunks of code through an LRU pool, patching its own call sites as it goes.

Same studio, same wall, two philosophies
CivilizationColonization
Shipped1991 · CIV.EXE, 304,512 B1994 · viceroy.exe, 493,470 B
VideoEGA / MCGA / VGA / Tandy — swappable driver EXEsVGA Mode 13h (320×200×256)
Resident need237,967 B minimum root footprint (~232 KB); MaxAlloc = FFFF, take everything~168 KB ask — MaxAlloc pinned 512 B above MinAlloc; never grows
Overlay techMicrosoft LINK INT 3Fh — 23 overlays, 121,720 B, one resident at a timeRTLink/Plus VM — 31 demand-paged code pages, 361,168 B, LRU pool, 1,031 thunks
Asset codec.PIC tagged blocks — LZW + RLEMADSPACK 2.0 containers — FAB, 4 KB window
EMS usenone — runs entirely in conventional memoryoptional — page cache for code; intro audio streamed through the page frame
World stateevery save exactly 37,856 B; terrain in a .MAP stored via the art codec≈24 KB live; the colony09.sav save is 25,311 B, byte-exact
Civilization's world map at 4000 BC under mddosem: a settler unit on a generated continent, with the menu bar GAME, ORDERS, ADVISORS, WORLD, CIVILOPEDIA
Civilization at 4000 BC — a freshly grown world whose terrain is stored as a 320×200 picture. Captured running under mddosem.
Colonization's isometric world map under mddosem: coastal terrain, minimap, Spring 1495, a Dutch Merchantman at sea
Colonization, Spring 1495 — a Dutch Merchantman at sea. Every unit on this screen is 28 bytes; the whole hemisphere about 24 KB. Captured running under mddosem.

The chapters

Seven chapters, each built around figures that move. The numbers in them are measured, not remembered.

How to read this site

Chapters 1–3 are the machinery: how the code, the memory and the art were made to fit. Chapters 4–6 are the simulation: how a world small enough to store became big enough to matter. Chapter 7 is the method. Every number on the site is measured — read out of the shipped bytes in fresh 2026 analysis, or observed in live instrumented runs under mddosem, the hardware-accurate PC emulator (written in Rust) that serves as our instrument. Where community lore and the bytes disagreed, the bytes won. Errors are ours; corrections are welcome.

Sources for this page — era & quotes: The Digital Antiquarian, Quote Investigator, Game Developer (2007), the Colonization manual; byte-level: fresh 2026 analysis of the CIV.EXE and viceroy.exe installs; runtime: live PIT and IVT captures under mddosem. Full credits in How We Know.