Overview

1 Let’s program games!

Video games surged from the late 1970s arcade boom to the living room, with Nintendo’s Famicom—rebranded as the NES—becoming a defining 8-bit platform through landmark series like Super Mario Bros., The Legend of Zelda, and Metroid. While commercial NES development once required costly, specialized equipment, accurate modern emulators and community knowledge now let hobbyists build and share new titles. This chapter sets the stage for that journey, explaining why the NES’s approachable scope, strict constraints, and enduring appeal make it ideal for learning core game-making concepts and for crafting complete projects with a solo creator or a small team.

At a high level, the NES pairs a 6502-derived Ricoh 2A03 CPU with a custom Picture Processing Unit for graphics and an Audio Processing Unit for distinctive sound. Cartridges can augment the base system with program/data banking and optional RAM, enabling larger worlds and richer effects than the console alone. Because resources are tight, assembly language is recommended to fully leverage the hardware, yet the 6502’s small instruction set keeps the learning curve manageable. The book’s goal is to guide readers, step by step, toward a simple but polished space shooter inspired by Astrosmash while teaching graphics, input, collision detection, scoring, and audio along the way.

The chapter also outlines how an NES game is structured: initialize the console, load tiles and sprite patterns, present an intro or title flow, and then run the central game loop. That loop typically reads controller input, moves the player and enemies, detects collisions, animates objects, and scales difficulty or advances levels. Crucially, all visual updates must respect the PPU’s timing—VRAM changes occur during vertical blank (vBlank), delivered via a Non-Maskable Interrupt—so logic and rendering coordination are core skills. Finally, planning for an ending or score summary provides closure and motivation, rounding out the blueprint for building a complete, fun, and technically sound NES game.

Nintendo Entertainment System
Legacy Game Development
Astrosmash running on the Intellivision.
NES Architecture
The structure of a game
NES PPU Chip – what is a vBlank

Summary

  • By learning and using 6502 Assembler you will be able to take control and make the most of the hardware.
  • Developing games for a retro console can provide a way to demonstrate your skills and passion in the game industry without having to involve a team of people.
  • Your game code needs to wait for the NES console hardware to be ready.
  • The “Game Loop” is the most important part of a game.
  • Most games have a way to make progress with different levels, enemies, and increased difficulty.
  • Player satisfaction is improved if a game has a background story and a defined ending.

FAQ

What will I build by following Chapter 1 and this book?You’ll build a simple, space-themed shoot‑’em‑up inspired by Astrosmash. Along the way you’ll learn NES fundamentals: 6502 assembly, tiles and sprites, controller input, collision detection, scoring, and adding sound effects and music.
Why make games for the NES today?The NES’s simplicity lets a single developer or small team create a complete, polished game. Working within tight constraints teaches core game-engine concepts, is great portfolio material, and taps into a thriving retro community.
What are the key components of the NES hardware?The NES centers on a Ricoh 2A03 CPU (mostly 6502 compatible), a Picture Processing Unit (PPU) for graphics with its own VRAM, and an Audio Processing Unit (APU) for music, effects, and basic digital samples. Game cartridges provide program/data ROM, pattern data for graphics, and can add RAM, battery-backed saves, and bank switching.
How does the cartridge expand the NES’s capabilities?Cartridges map up to 32 KB of program/data at a time and include 8 KB of pattern data for tiles/sprites (as ROM or RAM). Mappers enable bank switching and can add extra work RAM, video RAM, or battery-backed RAM for saves.
Do I need to use assembly language to make NES games?You can use higher-level languages like C, but assembly is often needed for performance and full hardware control. The 6502 has a small, approachable instruction set, so you can be productive quickly once you learn the basics.
How is an NES game structured?Typical flow: initialize the console, show intro/title screens, then run the main game loop (input, spawn enemies, move entities, detect collisions, animate, adjust difficulty). Screen updates happen via the PPU during vBlank, and the game ends with a result or ending screen.
How do NES graphics work with tiles and sprites?The NES doesn’t use a traditional bitmap; it builds backgrounds from 8×8 tiles and draws movable 8×8 sprites on top. Tile and sprite patterns must be loaded into PPU pattern tables (from cartridge data) before they can be displayed.
What is vBlank and the NMI, and why do they matter?After the PPU finishes drawing a frame, the vBlank interval begins and triggers a Non‑Maskable Interrupt (NMI). vBlank is the safe window to read/write VRAM; doing so while the screen is drawing risks visual glitches, so updates are scheduled in the NMI routine.
What should I do during console initialization?Wait for hardware readiness, clear RAM, and initialize the APU (silence any channels). Detect connected controllers as needed and upload any required tile/sprite patterns to PPU memory before drawing screens.
Where can I find NES developer resources and community?Join the community at https://www.nesdev.org/ for documentation, forums, and tools. Modern emulators make it practical to build, test, and share new NES games today.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Classic Game Programming on the NES ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Classic Game Programming on the NES ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Classic Game Programming on the NES ebook for free