Skip to content

ocfbnj/NesEmulator

Repository files navigation

NesEmulator

CI

This is an NES emulator. It implements Mapper0-4, which cover about 80% of iNes rom. The following games have been tested, other games may or may not work:

  • Super Mario Bros.
  • Battle City
  • Contra
  • Teenage Mutant Ninja Turtles
  • Double Dragon
  • Zelda

Usage

./NesEmulator <nes file path>

Controller

Player1

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

Player2

Button Mapped to
A Num1
B Num2
Select Right Shift
Start Num0
Up Up
Down Down
Left Left
Right Right

Other

Button Effect
R Reset
I Quick Save
L Quick Restore

How to build

Prerequisites

  • A compiler supporting C++20.
  • Python3 installed.
  • CMake installed.

Building with Conan Package Manager

  1. Install Conan

    pip install conan -U
    conan profile detect --force
  2. Clone and Build

    Windows

    git clone https://github.com/ocfbnj/NesEmulator.git
    cd NesEmulator
    conan install . --build=missing
    cmake --preset=conan-default
    cmake --build --preset=conan-release

    Linux, macOS

    git clone https://github.com/ocfbnj/NesEmulator.git
    cd NesEmulator
    conan install . --build=missing
    cmake --preset=conan-release
    cmake --build --preset=conan-release

Now, you can find the binary in build directory.

Screenshots

Super Mario Bros Battle City Contra Teenage Mutant Ninja Turtles III Double Dragon II

References

Developing an NES emulator is exciting and interesting 😀. If you also want to develop your own one, you can refer to the following tutorials and references. ❤️

Nesdev Wiki

Tutorials

Other NES implementations

CPU

Graphic

Audio

About

A cross-platform NES emulator in C++.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published