NES with ca65
Alternative local tools for this machine’s assembly lessons.
This guide uses ca65. For the recommended Asm198x workflow and available browser lessons, use the main setup guide.
Install the alternative tools
macOS
1. Install Homebrew (if needed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"2. Install cc65 Toolchain
brew install cc65This includes ca65 (assembler), ld65 (linker), and cc65 (C compiler).
3. Install FCEUX Emulator
brew install --cask fceux4. Verify Installation
ca65 --version && ld65 --versionWindows
1. Download cc65
Download the Windows snapshot from cc65.github.io.
Extract to a folder like C:\cc65 and add C:\cc65\bin to your PATH.
2. Download FCEUX
Download FCEUX from fceux.com.
3. Verify Installation
ca65 --versionLinux
1. Install cc65 (Debian/Ubuntu)
sudo apt install cc65Or build from source for the latest version: github.com/cc65/cc65
2. Install FCEUX
sudo apt install fceux3. Verify Installation
ca65 --version && ld65 --versionBuilding Your Code
NES builds typically use a two-step process - assemble then link:
ca65 game.asm -o game.old65 -C nes.cfg game.o -o game.nesThen run in FCEUX:
fceux game.nesYou'll need a linker config file (nes.cfg) - this is covered in the curriculum.