Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


NES emulator written in Go.

Subscribe to updates I use nes

Statistics on nes

Number of watchers on Github 3520
Number of open issues 5
Average time to close an issue about 2 months
Main language Go
Average time to merge a PR about 9 hours
Open pull requests 2+
Closed pull requests 5+
Last commit almost 3 years ago
Repo Created over 5 years ago
Repo Last Updated over 2 years ago
Size 188 KB
Organization / Authorfogleman
Page Updated
Do you use nes? Leave a review!
View open issues (5)
View nes activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating nes for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


This is an NES emulator written in Go.



Title Screens




The portaudio-go dependency requires PortAudio on your system:

To build portaudio-go, you must first have the PortAudio development headers and libraries installed. Some systems provide a package for this; e.g., on Ubuntu you would want to run apt-get install portaudio19-dev. On other systems you might have to install from source.

On Mac, you can use homebrew:

brew install portaudio


The go get command will automatically fetch the dependencies listed above, compile the binary and place it in your $GOPATH/bin directory.

go get github.com/fogleman/nes


nes [rom_file|rom_directory]
  1. If no arguments are specified, the program will look for rom files in the current working directory.

  2. If a directory is specified, the program will look for rom files in that directory.

  3. If a file is specified, the program will run that rom.

For 1 & 2, the program will display a menu screen to select which rom to play. The thumbnails are downloaded from an online database keyed by the md5 sum of the rom file.

Menu Screenshot


Joysticks are supported, although the button mapping is currently hard-coded. Keyboard controls are indicated below.

Nintendo Emulator
Up, Down, Left, Right Arrow Keys
Start Enter
Select Right Shift
A (Turbo) A
B (Turbo) S
Reset R


The following mappers have been implemented:

  • NROM (0)
  • MMC1 (1)
  • UNROM (2)
  • CNROM (3)
  • MMC3 (4)
  • AOROM (7)

These mappers cover about 85% of all NES games. I hope to implement more mappers soon. To see what games should work, consult this list:

NES Mapper List

Known Issues

  • there are some minor issues with PPU timing, but most games work OK anyway
  • the APU emulation isn't quite perfect, but not far off


Interested in writing your own emulator? Curious about the NES internals? Here are some good resources:

nes open issues Ask a question     (View All Issues)
  • about 4 years APU Problems
  • over 4 years error with go get github.com/fogleman/nes
  • over 4 years Broken link
nes open pull requests (View All Pulls)
  • add mapper 225
  • Add fullscreen support, cmdline and keyboard toggle
nes questions on Stackoverflow (View All Questions)
  • Stanford NER combining multiword NEs with an underscore
  • I am not able to create arrays in Nes-C language. any suggestions ?
  • issue recognizing NEs with StanfordNER in python NLTK
  • NES(6502 assembly) sprites does not move
  • NES(6502 assembly) Sprites movement
  • How to write an NES function that also takes character input?
  • Lvalue/rvalue -nes encoding for universal references
  • Metal Gear on NES: Are the rules for opening doors in the game an algorithm?
  • Have any classic NES games been open-sourced?
  • How does one modify an old school NES game?
  • Nolio NES Threads
  • 8 bit NES Program Memory Limit
  • Where on an NES cartridge is all this graphics data stored?
  • Javascript HTML5 Canvas Mario Bros NES clone, collisions and jumping broken
  • Why is the NES init code like this (6502 assembly)?
  • which language is used to develop NES games?
  • Arduino Bluetooth HID NES controller coding keypresses in C
  • Communicate with a NES game running in an emulator
  • NES Programming - Nametables?
  • How to play NES Sound in IOS
  • How much knowledge is needed to create a video game Mario (Nes version) in java?
  • How to access NES display register in Google's 8bit Map SDK?
  • Where can I find a list of timezΠΎnes?
  • CQRS/NES - Insight into how sample project works?
  • NES Game development: ASM6 tutorials?
  • NES (.NET Event Sourcing) sample exception (using NServiceBus 2.0)
  • NES (.NET Event Sourcing) running older NSB alright?
  • How to generate NES palette in C# code
  • NES (.NET Event Sourcing) transactions fail?
  • How do I convert normal UIImage into corresponding NES palette color?
nes list of languages used
Other projects in Go
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark