Skip to content

NES assembly

Learn 6502 assembly by building games

CPU
Ricoh 2A03
Speed
1.79 MHz
RAM
2 KB
Graphics
PPU
Sound
APU

NES assembly is the concrete 6502 route through a cartridge machine.

This is the application layer: 6502 instructions, memory-mapped PPU and APU registers, nametables, sprites, controller input, cartridge layout, mappers, and complete games that fit the console's rules.

  • The NES has no BASIC track; assembly is the route in.
  • The lessons explain variables, loops, branches and binary as they need them; Foundations covers them more slowly if you want it.
  • Use The Craft when a game introduces reusable ideas such as timing, scrolling, collision, state, or feel.

Before you begin

You'll need an assembler (Asm198x) and an emulator (FCEUX). Both are free, and the setup guide covers installing them on macOS, Linux and Windows.

Set up your tools →

Games

Start with Meet the Machine, then build Dash. Each game teaches new skills while building something you'll want to play. More games will be listed here as their lessons are published.

What you'll master

The parts of the NES these games put to work, from 6502 code to the PPU and APU.

PPU graphics

Master the Picture Processing Unit: tiles, sprites, nametables, and the scrolling techniques that defined a generation.

APU sound

Program the Audio Processing Unit's five channels: two pulse waves, triangle, noise, and DMC for authentic 8-bit music.

6502 assembly

The instruction set that powered the console revolution. Zero page, indexed addressing, and cycle-counted code.

Mapper magic

Understand cartridge mappers and how they expanded the NES beyond its limits. Bank switching and advanced techniques.

Memory map

The NES has a compact but powerful memory layout — just 2 KB of RAM, with memory-mapped I/O for the PPU and APU.

$0000–$07FFRAM (2 KB, mirrored to $1FFF)
$2000–$2007PPU registers
$4000–$4017APU & I/O registers
$8000–$FFFFPRG-ROM (cartridge code)

Ready to start?

Meet the Machine introduces the 6502 and the NES one idea at a time, before Dash builds your first finishable game.

Start: Meet the Machine →