An interactive 6502 / 65C02 microprocessor simulator — registers, a hex memory view, a live disassembler, an ATASCII text screen and a keyboard, all in one front panel.
sim_6502 is a desktop simulator for the classic MOS 6502 and the enhanced WDC 65C02 microprocessors. It runs a CPU over a flat 64 KB of memory and wraps it in an interactive front panel: you can watch the registers, flags and cycle counter update live, scroll a hex dump of all of memory, follow a disassembly of the program, and see output on a simulated 40×32 text screen with an Apple II-style keyboard interface at 0xC000 and 0xC010.
Load programs as Intel HEX files, paste raw bytes, or write code straight into memory, then run at full speed or single-step one instruction at a time while the memory and disassembly views track the program counter. It ships with several ready-to-run examples — including a machine-language monitor and a small Tiny BASIC interpreter that can save and load programs to your filesystem.
The simulator implements every documented NMOS 6502 opcode (with the period-correct
indirect-JMP bug), a switchable 65C02 mode with its extra instructions and fixes,
and hardware interrupts (NMI / IRQ). Choose a light or dark theme and your preferred font
from the in-app settings.
Release 1.1.5 — pick the build for your operating system.
Make it executable and run it:
chmod +x sim_6502_1.1.5.AppImage
./sim_6502_1.1.5.AppImage
Open the .dmg and drag sim_6502 to Applications.
The build is unsigned, so on first launch you may need to right-click the app and choose
Open, or allow it under System Settings → Privacy & Security.
Double click the .msix file to install.
The build is unsigned, you will need to deal with the Microsoft warnings to install.
The programs bundled with the app — demo_sum, the
maze_10print "10 PRINT" maze, the monitor,
tinybasic, and the forth interpreter — as py6502 assembler
source plus assembled .hex, along with samples PROGRAM.BAS
and SNOW.BAS. Unpack with
tar xzf examples_1_1_5.tgz, then load a .hex with "Open .hex file".
The full simulator, compiled to WebAssembly, hosted at deadhat.com/sim_6502_app. File loading and SAVE/LOAD use your browser's file picker.
Both desktop builds also accept a hex file on the command line, e.g.
sim_6502 program.hex, to load it at startup.
A walk through the simulator, from the front panel to loading and running a BASIC program.
On a wide window the Memory, Disassembly and Screen views sit side by side. Along the top are the registers and flags, the view toggles, the 6502 / 65C02 switch and the cycle counter; along the bottom are the Pause, Step, Run, NMI and IRQ controls. The Screen pane shows the start-up demo and an on-screen keyboard.

Turn on the Memory and Disassembly views and press Step to execute one instruction at a time. Both views follow the program counter — the current instruction is highlighted in the disassembly — so you can watch exactly how the interpreter does its work while the screen updates alongside.

The information below is from the project's README.
NV-BDIZC flags), including
the original indirect-JMP page-boundary bug.BRA,
PHX/PHY/PLX/PLY, STZ, TRB/TSB, INC A/DEC A,
the new BIT modes, (zp) indirect addressing, JMP (abs,X),
WAI/STP, and the Rockwell RMBn/SMBn/BBRn/BBSn) and the 65C02
behavioural fixes. Switch between the two with the 6502 / 65C02 pill next to
the registers.$FFFA /
$FFFE). IRQ respects the interrupt-disable flag.$0800–$0CFF (1280 bytes), $0800 at the top-left, row-major.
Each byte is one ATASCII character; high-bit bytes render in inverse video. Writing to that region
(from a running program, the loader, or the Memory tab) updates it live.Each tab remembers its scroll position when you switch away and back, and PC-following keeps the current instruction in view while stepping or running.
Two kinds of breakpoint pause a Run:
Resuming with Run steps past the breakpoint it stopped on. The Settings dialog has a Delete all breakpoints option that clears every breakpoint when you press OK.
The Screen tab includes an on-screen keyboard, and physical keystrokes are captured while that tab is focused. Keys are presented to the program through an Apple II-style interface:
$C000 (KBD) — bit 7 is the strobe (a key is waiting), bits 0–6 are the key's ASCII code.$C010 (KBDSTRB) — reading it clears the strobe so the program can poll for the next key.A typical reader loop is LDA $C000 / BPL wait / ... / LDA $C010.
sim_6502 program.hex loads that Intel HEX
file at startup.The simulator ships with ready-to-load programs (assembler source in the py6502 format, plus the assembled Intel HEX):
demo_sum — sums 1..10 and stores the result (55 / $37) at $00.maze_10print — the "10 PRINT" maze: fills the screen with random diagonals using an
8-bit LFSR.monitor — a small machine-language monitor (loads at $1000) with a
monitor: prompt and the commands g (run), c
(change memory), r (read/dump), d (disassemble), and h (help),
with backspace line editing.tinybasic — a line-numbered integer BASIC interpreter (PRINT, LET, IF/THEN, GOTO,
GOSUB/RETURN, FOR/NEXT, INPUT, PEEK/POKE, CLS, CXY, SAVE/LOAD, LIST, RUN, NEW, …). SAVE/LOAD use the
host filesystem via the file picker. See the Tiny BASIC language guide
for the full reference.forth — a small direct-threaded Forth interpreter: a stack machine with
+ - * / MOD, comparisons, @ ! C@ C!, ./EMIT/KEY,
colon definitions with IF/ELSE/THEN and BEGIN/UNTIL/AGAIN, plus
VARIABLE and CONSTANT. See the Forth language guide
for the full reference.sim_6502 is built with Flutter and targets iOS, Android, macOS, Linux, Windows, and the web. The
application identifier is com.deadhat.sim_6502. The downloads above are the Linux and macOS
desktop builds; on macOS the app sandbox is disabled so it can read a hex file given on the command line.
NMOS 6502 WDC 65C02 64K memory Intel HEX ATASCII screen Apple II keyboard NMI / IRQ Tiny BASIC
The simulator does not include an assembler — it loads pre-assembled
Intel HEX files. To turn assembly source into a .hex you
can load, a Python-based 6502 / 65C02 assembler is available at
github.com/dj-on-github/py6502.
The bundled example programs are written in its syntax.