Skip to content

Home computers and the PC ​

An 8-bit home computer with its monitor, cassette deck and disk drive

This section covers the home computers, the PC and the Mac that games were written for. Each page covers one family of machines. An exact reimplementation of a game needs three facts about its machine: the CPU family and its arithmetic quirks, the memory and banking state when the code ran, and the timing the game was written against. On 8-bit machines the game logic depends on that timing.

Ask your agent ​

Start on a home computer game. Copy this prompt into your coding agent:

text
In my GameFrame project, start work on a game for <machine>.

1. Read docs/computers/README.md, docs/computers/cpu-families.md and the page for <machine>.
2. Identify the media image format and the exact release. Record its checksum.
3. Set up the emulator with a debugger that the page names. Tell me what it needs before you
   install anything.
4. Run the game past its loader and save a memory snapshot once the game code is in memory.
5. Record the CPU, the memory banking and the frame timing in docs/FINDINGS.md.

Across all machines ​

  • CPU families: the eleven CPU families, their byte order, Ghidra, Unicorn and Capstone support, small cores for ground truth, and the arithmetic traps.

8-bit home computers ​

16-bit and 32-bit home computers ​

The PC and the Mac ​

  • The IBM PC and compatibles: the eras and their executable formats, Tandy paths, compiler fingerprints, copy protection, what runs where today.
  • The Macintosh: 68k resource forks and the A5 world, PEF, Mach-O, Rosetta, the emulator for each era, Marathon and Aleph One.
  • Engine-era PC games: Unity with Mono and IL2CPP, Unreal .pak files, Godot .pck files, anti-cheat, Linux builds as a second binary.

The shape of each page ​

Each family page opens with one short paragraph. Then it has one section per machine. Each machine section has the same headings in the same order.

  1. Hardware: the years, the CPU, memory and banking, the video and sound chips, timing.
  2. How games were made and loaded: languages, loaders, operating systems.
  3. Media and image formats: tape, disk and cartridge images, and what each one keeps.
  4. Tools: emulators with debuggers, Ghidra and Unicorn support.
  5. Projects to learn from: disassemblies, source releases and reimplementations.
  6. For an exact reimplementation: what to settle before porting.

An agent can load one page and act from it alone. The CPU families page holds the facts that several pages share.

A fact marked "(not confirmed)" has one source and lacks a second. Treat it as a lead and check it before you rely on it.

Four groups of machines ​

The four groups of machines and the first step for each

The machines split into four groups with different first steps.

GroupFirst stepPages
8-bit home computersGet past the loader, then learn the frame timingSinclair to other 8-bit
16-bit and 32-bit home computersLearn the custom chips, because many games bypass the OSAmiga, Atari ST, Acorn 32-bit, Japanese 16/32-bit
The PC and the MacIdentify the executable format of the era. The loader and the tools depend on itIBM PC, Macintosh, engine-era games
ConsolesSee Console games

Snapshot after the loader ​

A loader runs in an emulator until the game code is in memory, then a snapshot is taken

The first job on a tape or disk game is usually to get past the loader. Run the game under an emulator until the game code sits in memory. Then take a snapshot. A reimplementation does not need to copy the protection code that runs before the game starts. It therefore normally starts from the decrypted image in memory. Keep the lossless media image (TZX, G64, WOZ, EDSK, ATX, IPF, STX) as the record of what shipped.

Copy protection is described factually on each page. The law on working around it differs by country (Legal, the law worldwide). You decide which route to take.

How games were written on 8-bit machines ​

Four 8-bit machines where the video hardware takes CPU time

Commercial games were mostly hand-written assembly. BASIC appears in loaders and in budget and type-in games. Tape was the main medium in the UK and Europe. Disk was the main medium in the US and Japan. Cartridges were common on the MSX, the VIC-20 and the Atari.

On four machines the game logic depends closely on exact timing. The Spectrum has contended memory. The C64 has VIC-II badlines and raster interrupts. The Atari has ANTIC DMA and display list interrupts. The CPC has wait states that round every access to 4 cycles.

Not covered yet ​

The Sinclair QL (68008) and the SAM Coupé (Z80B) belong with these machines. Their pages still need sources.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.