JMcKiern / NES-Emulator

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NES Emulator

Build Status Build status Coverity Scan

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
  • PortAudio - portaudio19-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 portaudio: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

sudo apt install libglew-dev libglfw3-dev portaudio19-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 can be set in a settings.ini file.

The default controls are

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++

License:GNU General Public License v3.0


Languages

Language:C++ 97.6%Language:CMake 1.7%Language:C 0.5%Language:GLSL 0.2%