Skip to content

Apple II ​

The Apple II uses the 6502, later the 65C02, and the 65C816 in the IIgs (CPU families). Soft switches select the video modes and the memory banks. The Disk II's encoding is controlled by software, so publishers wrote their own disk formats as copy protection.

Apple II, IIe and IIgs ​

Hardware ​

ModelLaunchCPU
Apple II10 June 19776502 at 1.023 MHz
Later models, IIe65C02
IIgs198665C816 at 2.8 MHz (not confirmed)

Sources: Wikipedia: Apple II (original), Wikipedia: Apple II, Wikipedia: Apple IIGS.

About six million Apple IIs were sold.

  • RAM. 4–48 KB, more on the IIe and IIgs.
  • Video. Lo-res and hi-res modes. Hi-res is 280x192 with six visible colours.
  • Sound. A 1-bit speaker, toggled at $C030. The IIgs has an Ensoniq 5503 DOC (not confirmed).
  • Memory map. Soft switches fill $C000–$C0FF. The language card banks RAM over $D000–$FFFF (AppleWin).

How games were made and loaded ​

Disk II and Apple DOS arrived in late 1978, with 140 KB per side (Wikipedia: Apple II (original)). Disk II encoding is GCR controlled by software. Publishers wrote custom sector formats, nibble counts and spiral tracks as copy protection.

Media and image formats ​

FormatWhat it holds
WOZBit-level tracks and timing; protected disks run from it (not confirmed)
DSK, DO, POOnly the 140 KB of sectors (not confirmed)

Source: WOZ reference.

Tools ​

  • AppleWin (github.com/AppleWin/AppleWin) is an Apple II emulator.
  • Ghidra has the 6502 and 65C02 built in. Its ADC p-code is not exact (arithmetic traps). The IIgs's 65C816 needs a community extension. Unicorn has neither. Use py65, mos6502 or floooh/chips for 6502 ground truth.
  • For IIgs code, track the m and x flags. Capstone's MOS65XX_65816 mode needs the width set for each function.

Projects to learn from ​

For an exact reimplementation ​

  • Record the soft switch and language card state for each code region.
  • Keep the WOZ image as the record of a protected disk. A DSK image loses the protection.
  • On the IIgs, record the m and x flag state at the entry of each function.

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