Skip to content

JMcKiern/NES-Emulator

Repository files navigation

NES Emulator

Build Status Build status

NES emulator written in C++

How to Build

Dependencies

Before building this project the following must be installed :

  • GLEW - libglew-dev on Ubuntu
  • GLFW - libglfw3-dev on Ubuntu
  • SDL2 - libsdl2-dev on Ubuntu

CMake

To keep this project platform independent CMake is used to generate the build files.

The following definitions can be used to locate the dependencies if they are not found automatically:

  • CMAKE_INCLUDE_PATH
  • CMAKE_LIBRARY_PATH

Windows

I use vcpkg to install the dependencies on Windows

vcpkg install glfw3:x64_windows
vcpkg install glew:x64_windows
vcpkg install sdl2:x64_windows
git clone https://github.com/jmckiern/NES-Emulator
cd NES-Emulator
mkdir build
cd build
cmake -G"Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake ..
cmake --build . --target ALL_BUILD --config Release

Linux

The below packages supply the dependencies on Ubuntu

sudo apt install libglew-dev libglfw3-dev libsdl2-dev
git clone https://github.com/jmckiern/NES-Emulator
cd NES-Emulator
mkdir build
cd build
cmake ..
make

How to Use

Running the emulator

This emulator opens the file passed through the command line arguments. A game can also be dragged onto the executable.

Controls

The controls are currently hardcoded.

Player 1:

Directional Pad - WASD
Select - G
Start - H
A - K
B - J

Player 2:

Directional Pad - Arrow Keys
Select - Keypad 1
Start - Keypad 2
A - Keypad 3
B - Keypad 0

Mappers supported

The mappers currently supported are NROM (0), MMC1 (1), UxROM (2), CNROM (3) and MMC3 (4).

Including only games released in the USA, this emulator supports 641 games.

About

A NES (Nintendo Entertainment System) emulator written in C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages