Skip to content
Amber Folio
Play

How it works

The Gold Box games were written for a particular late-1980s PC. Amber Folio recreates that machine in software and lets the original game run on it.

The machine

An emulator is a computer made of software. This one includes just the parts a Gold Box game uses: the processor, memory, a display, a timer and the PC speaker, plus the small set of operating-system services the game relies on. The game cannot tell it is not running on real hardware.

The machine Amber Folio buildsA block diagram. Your own copy of the game is loaded into the emulator core. Inside it, an 8086 processor, one megabyte of memory and a BIOS and DOS service layer all meet at a bus; below the bus sit the EGA video adapter, the 8253 timer and the PC speaker, and beneath them a virtual clock counted in 1,193,182 ticks a second. The core hands frames and sound out to the host — this page in your browser — and takes key presses back in.Your own copy of the gamethe program and data files, unmodifiedloaded from the files you supplyAmber Folio core8086 CPUreal mode, interpreted1 MB of memory640 KB for the programBIOS and DOSINT 10h · 16h · 21hthe bus — every read and write is sorted hereEGA video320×200, 16 colours8253 timerthe tick and the tonePC speakerone square wavevirtual clock — 1,193,182 ticks a second, and never the host'sframessoundkeysThe host — this page, in your browsercanvas · Web Audio · keyboard
The parts of the emulated machine. Only pictures, sound and key presses cross its edge.

Your copy of the game is loaded into the emulated machine unchanged. Inside, the processor, memory and system services are connected to the display, the timer and the speaker. Finished pictures and sound go out to the page in your browser; your key presses come back in. That is everything that crosses the edge.

The processor

An Intel 8086, the chip in the original IBM PC. The emulator runs each instruction of the game one at a time, and its accuracy is checked against test data recorded from a real chip. A speed setting lets you match the machines the games were designed for.

The screen

An EGA display in the mode the games use: 320×200 pixels in sixteen colours. The emulator draws each frame, and the page shows the newest one. If your browser falls behind it skips a frame; the game never slows down.

Time

The emulated machine keeps its own clock, ticking at the same rate as the original PC’s timer chip, and never reads your computer’s. That means the same game session plays out identically on any computer — a laptop today, a phone tomorrow.

The speaker

The PC speaker, and only that: the one-note-at-a-time beeper the games were written for. The emulator reproduces its sound and plays it through your browser.

The services underneath

A game of this era asked the operating system to open files, read the keyboard and print text. The emulator provides those services over a virtual disk made from the folder you supply, so the game finds its files where it expects them.

Why emulate the machine rather than rewrite the game

  • It is your game, exactly. Every rule, table and quirk comes from the program on your disk, so nothing plays slightly differently from how you remember it.
  • One machine, every game. The Gold Box titles share an engine, so getting the machine right once brings the whole series within reach. Games shows how far each one has got.
  • Nothing from the games is needed. The emulator holds facts about the machine, never any part of a game.

Why a browser

  • Nothing to install. Open a page and hand it the folder you already own. The emulator download is about 200 KB.
  • The same emulator everywhere. The browser version is the same code as the desktop one, not a cut-down edition.
  • A web page cannot look through your computer. It sees only what you hand it, which is the strongest form of the promise below.
Where your files goA block diagram with two regions. Everything inside a dashed box marked 'your browser' happens on your own machine: the Amber Folio page, the emulator compiled to WebAssembly, and beside it the one filesystem adapter the emulator sees, which sits over two stores — your game files, kept read-mostly, and your saves and settings, written as you play. Below the dashed box, separate from it, sits amberfolio.org, with a single arrow pointing up into the browser: the page and the build it runs are downloaded once, and nothing travels back the other way.Your browserThe Amber Folio pagecanvas, sound, keyboard and touchThe emulatorWebAssembly, running in this tabAmber FolioThe filesystem it seesone adapter over two storesYour game fileskept as you dropped them, read-mostlySaves and settingswritten as you playboth stores stay inside this boxnothing goes back the other waydownloaded onceamberfolio.orgthe page, and the build it runs
How Amber Folio will keep your files. Today’s preview holds them only while the page is open.

Your files stay here

Everything inside the dashed box happens on your own computer: the Amber Folio page, the emulator, and the two places your files will live — your game files in one, your saves and settings in another. The site sends the page and the emulator to your browser once; nothing travels back the other way.

Keeping saves separate from game files is what will let saved games follow you between devices one day, without a game file ever leaving your machine. None of that storage exists yet: in today’s preview, files you hand over are kept only while the tab is open. The guide explains what to supply.

Reading more

The emulator’s own documentation goes deeper. Each link points at the exact build this site runs (commit 472ec98).

The project itself is at github.com/amberfolio/amberfolio (opens in a new tab).