An NES emulator in C++
Go to file
Diordany van Hemert 61762fa1b5 Fix log typo 2024-03-03 02:01:47 +05:30
cmake/Modules FindSFML.cmake added and updated CMakeList.txt 2016-07-23 17:58:42 +05:30
include Fix build error 2022-08-29 02:00:42 +08:00
src Fix log typo 2024-03-03 02:01:47 +05:30
.gitignore Added Cartridge class and worked on it and MainMemory a bit 2016-07-10 20:35:47 +05:30
CMakeLists.txt Add keybindings.conf 2016-12-08 11:04:20 +05:30
LICENSE Add LICENSE 2019-03-13 12:00:17 +05:30
README.md Update README.md 2022-08-21 21:02:09 +05:30
keybindings.conf Add keybindings.conf 2016-12-08 11:04:20 +05:30
main.cpp fix: remove hardcoded paths 2023-05-27 13:35:33 +05:30

README.md

SimpleNES

An NES emulator written in C++ for nothing but fun.

Roughly 40-50% of games should work (ie. games that use either no mapper or mappers 1, 2, 3 and experimental support for 4, 7, 66 and 11).

Examples of games that have been tested to run (but NOT limited to):

(USA/Japan or World versions only i.e. NTSC compatible)

  • Super Mario Bros.
  • Contra
  • Adventure Island
  • Ninja Gaiden
  • Wrecking Crew
  • Megaman and Megaman 2
  • Mario Bros.
  • Donky Kong and Donkey Kong Jr.
  • Battle City
  • Paperboy
  • Legend of Zelda
  • Pacman
  • Tennis
  • Excitebike
  • Nightmare Elm Street
  • Cabal
  • Battletoads
  • Arch Rivals
  • etc...

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 6 Screenshot 6

Videos

YouTube Playlist

Compiling

You need:

  • SFML 2.0+ development headers and library
  • C++11 compliant compiler
  • CMake build system

Compiling is straight forward with cmake, just run cmake on the project directory with CMAKE_BUILD_TYPE=Release and you'll get Makefile or equivalent for your platform, with which you can compile the emulator

For e.g., on Linux/OS X/FreeBSD:

$ git clone https://github.com/amhndu/SimpleNES
$ cd SimpleNES
$ mkdir build/ && cd build/
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make -j4    #Replace 4 with however many cores you have to spare

Running

Just pass the path to a .nes image like

$ ./SimpleNES ~/Games/SuperMarioBros.nes

To set size of the window,

$ ./SimpleNES -w 600 ~/Games/Contra.nes

For supported command line options, try

$ ./SimpleNES -h

Controller

Keybindings can be configured with keybindings.conf

Default keybindings:

Player 1

Button Mapped to
Start Return/Enter
Select Right Shift
A J
B K
Up W
Down S
Left A
Right D

Player 2

Button Mapped to
Start Numpad9
Select Numpad8
A Numpad5
B Numpad6
Up Up
Down Down
Left Left
Right Right