Skip to content

Emu6802

A Motorola 6802 emulator that taught a thousand students

C++DOSWatcomPMODE/WCompleted

Part 6 of 9 · Early Work

Emu6802 emulates the Motorola 6802 down to all 197 opcodes, with a built-in assembler and disassembler, single-step and animated tracing, breakpoints, memory editing, and a Motorola 6821 PIA whose two ports drive the PC’s real LPT1. I wrote it in 1999 with Watcom C/C++ 11.0 and the PMODE/W extender, and the Instituto Tecnológico de Morelia used it in every Computer Architecture I and Digital Systems II course for years, more than a thousand students in all.

Emu6802 running: registers and bus state on the left, a memory dump at the top, the disassembled program in the middle with the current instruction highlighted, and the function keys along the bottom, all in Spanish.

How to Emulate a 6802 walks through the real code: a hand-written binary search for a decoder, condition codes settled “after dark” in one pass, and the bugs a test harness found in it 27 years later.

Downloads: the emulator with its bugs fixed, rebuilt with Open Watcom 2 in 2026, and the 2002 release, the emulator and its source, as it was.

Source and history on GitHub: Kronuz/Emu6802, where a test harness and one pull request per bug fixed the corners I got wrong.