Nano Banana 2.1 is LIVE — Google's Latest | Try Now →
WAVESPEED AI 6502 EMULATOR RUNS IN YOUR BROWSER
100% FREE

6502 Emulator & AssemblerWrite assembly, run it, watch every register.

Type 6502 assembly and press Run: it is assembled and runs on a 32×32 colour screen with keyboard input.
Step one instruction at a time, set breakpoints and watch the registers, flags and memory change.

Built-in assemblerStep & breakpointsSnake and 7 more examples
No sign-up Nothing to install Works offline

Loading the emulator…

Your code is assembled and run on your device. Nothing is uploaded.
THREE SIMPLE STEPS

How to use the 6502 emulator

01

Write or pick a program

Type 6502 assembly in the editor or choose an example such as Snake, Colour bars or the maths demo. Programs start at $0600.

02

Run it

Press Run (or Ctrl/⌘+Enter). The code is assembled; mistakes are listed with their line numbers. Click the screen to send keys to the program.

03

Debug it

Pause, step one instruction at a time and click a line number to set a breakpoint. Watch the registers, flags, memory and disassembly as it runs.

LEARN 6502

6502 tips for beginners

The 6502 has three 8-bit registers, a 256-byte stack and a handful of addressing modes. These ideas get you a long way.

The screen is memory

Each byte from $0200 to $05FF is one pixel, 32 per row. STA $0200 colours the top-left pixel; add $20 to move down one row.

Zero page is fast

Addresses $00–$FF take one byte to name and one cycle less to read. Keep counters and pointers there.

Pointers use (zp),Y

Store a 16-bit address in two zero-page bytes, low byte first, then LDA ($10),Y reads from that address plus Y. The Snake and pattern examples use this to walk the screen.

Carry before maths

ADC adds the carry too, so start an addition with CLC and a subtraction with SEC. Branches like BCC and BCS test the carry afterwards.

Decimal mode

After SED, ADC and SBC count in decimal: $58 + $46 gives $04 with the carry set (104). Handy for scores; turn it off again with CLD.

Read the flags

Every load and arithmetic instruction updates N and Z. Step through a loop and watch them change before the branch that tests them.

WaveSpeed AI

Make art for your retro projects

Create pixel-art sprites, title screens and short clips for your games and demos from a prompt with WaveSpeed AI.

  • 1,000+ AI models
  • Image, video and 3D
  • Pay as you go

$1 in free credits for eligible new accounts. No card needed. Generators have separate account and credit requirements. The 6502 emulator is free.

6502 emulator FAQ

Is this 6502 emulator free?

Yes. It is free with no sign-up, no ads and no limits. Your program is saved in your browser so it is still there next time.

Which 6502 does it emulate?

The original NMOS 6502 with all 151 documented instructions, binary-coded decimal mode with the NMOS flag behaviour, the JMP ($xxFF) page bug and the documented cycle counts, including page-crossing and branch penalties.

How accurate is it?

It passes a widely used 6502 functional test program and 1.5 million single-instruction test cases that check registers, flags, memory and cycle counts.

What is the memory map?

64 KB of RAM. The screen is $0200–$05FF (one byte per pixel, 16 colours), reading $FE gives a new random byte, $FF holds the last key you pressed, and programs load at $0600. Programs written for the popular beginner 6502 tutorials that use this layout run unchanged.

How do I send keys to my program?

Click or tap the screen, then type: the key's ASCII code goes to $FF. The arrow keys and the on-screen arrows send w, a, s and d, which the Snake and Paint examples use.

What assembler syntax is supported?

Labels (loop: or a word at the start of a line), constants (define name value or name = value), *= or .org, .byte/dcb, .word, .text, .asciiz and .res, numbers in hex ($FF), binary (%1010), decimal and characters ('A'), arithmetic, and < and > for the low and high byte. A value below $100 uses zero page; write $00FF to force the absolute form.

How do breakpoints and stepping work?

Click a line number (or press F9 on a line) to set a breakpoint. Run stops before that instruction; Step (F10) runs one instruction and highlights its line. The registers, flags, memory and disassembly update after every stop, which makes it a great way to learn 6502 assembly.

Can I save or share my program?

Your program is saved in your browser automatically. You can also save it as an .asm file, download the assembled .bin, copy a hex dump, save the whole machine state, or copy a link that contains the program.

Is my code uploaded anywhere?

No. Assembling and running happen in your browser. A share link keeps the program in the part of the address after #, which browsers do not send to the server.

All Free Tools

Run your first 6502 program

Free, in your browser, with a debugger.

Open the emulator