Chris Collins

Tools · retro

Atari 2600 IDE

Write Atari 2600 (VCS) programs in 6502 assembly — DASM-style, with vcs.h and macro.h built in — assemble them to a 2K, 4K or 8K cartridge, and run them in an emulator with a debugger: step by instruction, scanline or frame, breakpoints, registers, RAM, TIA state, the beam position, and a frame-timing check.

Added · updated 13 October 2026

How to use it

Write a program on the left and press Assemble & run (Ctrl/⌘ + Enter). The examples cover the basics: a colour per scanline, the playfield, a sprite moved with the joystick, a two-line kernel, sound, and a tiny game.

The assembler

The source is the DASM dialect most 2600 code uses:

  • processor 6502, include "vcs.h", include "macro.h" — both headers are built in: the register names from the Stella Programmer’s Guide, and VERTICAL_SYNC, CLEAN_START and SLEEP n.

  • SEG.U for RAM variables (ds reserves bytes without putting anything in the ROM), SEG, ORG, RORG, .byte/dc.b, .word/dc.w, ds, HEX, ALIGN.

  • Macros (MAC name … ENDM with {1}…{9}), REPEAT n … REPEND, and IF/ELSE/ENDIF on constants. Labels are case-sensitive; .local labels belong to the label before them.

  • Illegal opcodes are accepted (.byte $04,$00 is the 3-cycle NOP SLEEP uses).

ORG $F000 code makes a 4K cartridge (2K if it fits in $F800–$FFFF). For 8K, use the F8 scheme: two banks with ORG $0000/RORG $F000 and ORG $1000/RORG $F000; reading or writing $1FF8 selects bank 0 and $1FF9 bank 1. Every image needs the reset vector at $FFFC. Download .bin saves the cartridge for a real console (via a flash cart) or another emulator; Open ROM… runs a 2K, 4K or F8 image of your own.

⛶ Full screen (or F) gives the TV screen the whole screen as a 4:3 picture, the run controls above it and the editor beside it on a wide screen — the browser’s full screen where it is allowed, otherwise a full-window layer (iPhone). ◫ Panels hides the editor. Escape leaves.

The debugger

  • Step runs one instruction, Line to the start of the next scanline, Frame to the end of the frame (the moment VSYNC turns off).

  • Click a line in the listing, or type a label, to set a breakpoint.

  • CPU & beam shows the registers, the next instruction, where the beam is (scanline, colour clock, CPU cycle within the line) and the RIOT timer. Frame timing counts the last frame’s VSYNC, VBLANK, visible and overscan lines against NTSC’s 3 + 37 + 192 + 30 = 262.

  • RAM shows the 128 bytes and lets you edit them; TIA shows the registers, object positions, collision latches, and the most recent writes with the line and colour clock each happened on.

  • Show the whole frame draws VSYNC and VBLANK lines too; when paused, a red line marks the beam.

Software to load

The Software panel has two parts:

  • Library — programs this site can share: open-source and public-domain releases, freeware whose author allows it to be passed on, and this site’s own examples. Each shows its licence, why it may be shared, and where it came from; Copy link gives a link (?lib=<id>) that opens this page and loads it.

  • Open URL / archive.org — paste a link to a file, or an archive.org item (its URL or identifier). For an archive.org item the panel lists the files the 2600 can open, with the item’s licence as the uploader set it. Sites that allow it load straight into the emulator; archive.org doesn’t let other sites read its files, so for those you get a download link and drop the file onto the emulator.

There are no links to "complete ROM set" archives: most are copies of commercial software that is still under copyright, whatever the upload’s licence field says. Files you own you can always load — drop them onto the emulator or paste a link.

How accurate it is

The emulator is written for this page: a 6502 core, the TIA (playfield, two players, two missiles, the ball, colours and priorities, collisions, HMOVE, vertical delay, and both sound channels) and the RIOT (RAM, joystick and console switches, the interval timer). It runs at the level of colour clocks, and a register write takes effect on the last cycle of the instruction, as on the real console; WSYNC halts the CPU until the next line.

It is close enough to develop and debug kernels, but not cycle-exact like Stella: a read is timed to the start of its instruction’s last cycle (one cycle early when an indexed read crosses a page), the RESPx/HMOVE position offsets and the "HMOVE comb" are simplified, the extra one-pixel delay of stretched players isn’t modelled, and the sound is an approximation of the TIA’s divider and polynomial counters. Paddles, keypads and bank-switching schemes other than F8 aren’t supported. Check timing-critical code in Stella before you burn a cartridge.

The colours are the NTSC palette as tabulated in Wikipedia’s List of video game console palettes. No commercial ROMs are included; the examples are original.

Runs entirely in your browser; nothing you type leaves this page.