ApplEm
An Apple II emulator for the browser and the desktop.
A cycle-accurate Apple II emulator running in the browser using WebAssembly and WebGL. No JavaScript frameworks — vanilla ES6 modules with Vite for bundling. Having built native emulators in the past, this is my first attempt at a browser-based emulator, hopefully making it easier to allow cross platform users from making use of it :)
The emulation core is applem-core, included here as a submodule at core/. The same core runs as a native macOS app, applem, with its own Dear ImGui and Metal front end.
Four machines are modelled: the Apple IIe Enhanced, the Apple II Plus, the Apple IIc and the Apple IIgs. See Machines.
Run it → · Documentation wiki →
Features
- Four machines — Apple IIe Enhanced, Apple II Plus, Apple IIc and Apple IIgs, chosen from the badge in the header; each is described by a profile and remembers its own slot layout, display settings and save states
- Cycle-accurate 65C02 CPU — All legal 6502 opcodes plus 65C02 extensions at 1.023 MHz
- A 65C816 for the IIgs — 24-bit bus, 16-bit registers, native and emulation modes, verified against 5.1 million recorded states from real silicon
- Full Apple //e memory architecture — 128KB RAM (64KB main + 64KB auxiliary), language card, soft switches; the IIgs adds 256K–8M of fast RAM, bank shadowing and a Mega II inside it
- Multiple display modes — Text (40/80 col), LoRes, Double LoRes, HiRes, Double HiRes, monochrome, and Super Hi-Res (320/640, palette per scanline) on the IIgs
- GS/OS — the IIgs boots System 6.0.4 to the Finder from its built-in SmartPort, with a working mouse, an Ensoniq synthesiser and a battery-backed clock
- Signal-accurate composite video — Decodes the machine's real 14.31818 MHz dot stream rather than looking colours up, so artifact colour, the hi-res half-dot shift and colour burst all emerge from the signal
- WebGL rendering — Hardware-accelerated display with configurable CRT shader effects and saveable monitor profiles
- Web Worker architecture — WASM emulation runs in a dedicated Worker thread, eliminating main-thread blocking
- Audio-driven timing — Web Audio API AudioWorklet drives frame timing at 48kHz via Worker RPC
- Disk II controller — DSK, DO, PO, and WOZ format support with write capability
- 3.5" drives on the IIgs: two Apple 3.5" drives on the IWM, read and written by the IIgs's own firmware and GS/OS: 800K and 400K images, 2MG and 3.5" WOZ, saved back in the format they came in
- Expansion cards — Mockingboard sound card, Thunderclock Plus, Apple Mouse Interface Card, SmartPort hard drive, Super Serial Card, Parallel Card (Centronics), Microsoft Z-80 SoftCard, No-Slot Clock (DS1215). A //c has no sockets but decodes every slot address to a soldered-in part; a IIgs carries its SmartPort in slot 5
- Virtual dot-matrix printer — ImageWriter II (colour), ImageWriter I, Epson FX-80, and Apple DMP with period-correct fonts, sounds, and PNG/PDF export, plus a standalone font editor at
/printers/rom-editor.html
- File explorer — Browse DOS 3.3 and ProDOS disk contents with BASIC detokenizer and disassembler
- Shareable links — Pass a disk image URL in the address (
?disk=) to open the emulator with it already loaded
- Save states — Autosave slot plus 5 manual save slots, stored in IndexedDB, kept per machine; a state names the machine that wrote it and loading one switches to it
- Built-in debugger — CPU debugger, memory browser, heat map, soft switch monitor, BASIC conditional breakpoints, and more
- Light/Dark/System themes — Switchable colour scheme with Apple rainbow logo accent palette
- AI Agent integration — Full programmatic control via MCP and AG-UI event protocol for AI-assisted development
- PWA support — Install as a standalone app with offline functionality
- A native macOS app too: the same core in applem, with a Dear ImGui and Metal front end, a ca65 Build and Run workflow and a profiler
Machines
The emulator runs one machine at a time, and the badge in the header names it — click it to switch. Four machines are described:
| Apple IIe (Enhanced) | Apple II Plus | Apple IIc | Apple IIgs |
|---|
| Released | 1983 | 1979 | 1984 | 1986 |
| CPU | 65C02 | NMOS 6502 | 65C02 | 65C816 @ 2.8 MHz |
| RAM | 128KB (64 main + 64 aux) | 48KB + 16KB language card in slot 0 | 128KB | 128KB Mega II + 256K–8M fast |
| Columns | 40 / 80 | 40 | 40 / 80 | 40 / 80 |
| Double-resolution modes | Yes | No | Yes | Yes, plus Super Hi-Res |
| Character sets | US/UK | One | One | One |
| Colour burst in text | Inhibited | Always sent (text fringes) | Inhibited | Inhibited |
| Expansion slots | 1–7, slot 3 fixed | 0–7, slot 0 fixed | None — every slot address is a soldered-in part | Slot 5 is the built-in SmartPort |
| Disk controller | Disk II card | Disk II card | IWM (built in) | IWM (built in) |
| ROMs | Included | Included | Included | Included |
A machine's differences are data in its profile rather than special cases scattered through the code, so the II+'s missing auxiliary bank is what makes 80 columns and double hi-res genuinely unreachable rather than merely hidden.
This is the beginning of the README. Read the rest at the original. Read the full README ↗