6502 by dbhqGitHub

Built in public

A 6502, built in the open

A cycle-accurate 6502 and 65C02 core in C#, and the machines it will run, as many as possible, each one proven. Every step is written down here as it happens.

Illustration of a microprocessor die
Illustration of a microprocessor die. Not a photograph of the 6502.

Machines

Run one in your browser

Running in the browser now: KIM-1, BBC Micro, Electron, Atari 2600 and NES.

  • KIM-1

    1976, 6502, 1 MHz

  • BBC Micro

    1981, 6502, 2 MHz

  • NES

    1983, Ricoh 2A03 at 1.79 MHz (NTSC), 2A07 at 1.66 MHz (PAL)

  • Electron

    1983, 6502, 2 MHz

  • Atari 2600

    1977, 6507 at 1.19 MHz (NTSC), 1.18 MHz (PAL)

All 56 machines in the family

Status

Where it stands

Every figure here comes from the latest test run or a dated measurement. None is typed by hand.

5 of 51

Machines implemented

A machine counts only once it runs in the browser and passes an automated test.

5

Variants of the core

The NMOS 6502, the NES's 2A03, and three 65C02s.

7,485

Tests passing

From the latest test run, on the commit shown below.

24.4 times

Against a 2 MHz machine, in the browser

Best of 5 runs, compiled ahead of time, on one machine, collected 30 Sept 2026. The design target is at least 25 times real speed, for the core alone. Against this site's 2 MHz reference it is met natively and not yet met in the browser.

Test run on commit 59a2d86. Full status

Proof

Checked cycle by cycle

The core is checked against Tom Harte's SingleStepTests, a published record of every opcode's bus activity, cycle by cycle. A failing test names the cycle and the byte. Where the core knowingly differs from a reference, the status page says so.

dotnet test
Passed PpuScanlineTests: 616
Passed TransistorModelTests: 266
Passed Nmos6502Harte: 256
Passed Rockwell65C02Harte: 256
Passed Synertek65C02Harte: 256
Passed!  - Failed: 0, Passed: 7,485, Skipped: 0

Illustration: the textured backgrounds behind the proof and machines sections are generated, not measurements