Skip to content

A Nintendo Entertainment System emulator written in C++ (hobby project)

Notifications You must be signed in to change notification settings

Louis-Tarvin/NES-Emulator

Repository files navigation

NES Emulator

A Nintendo Entertainment System emulator written in C++. This has only been tested on Linux but should be cross-platform.


Features:

  • 6502 CPU
  • iNES cartridge loading
  • background rendering
  • sprite rendering
  • user input
  • audio
  • support for most common mappers

Currently implemented mappers:

  • NROM (000)
  • MMC1 (001)
  • UxROM (002)
  • MMC3 (004)

Controls

  • A button: X
  • B button: Z
  • Start: S
  • Select: A
  • D-pad: Arrow keys
  • Play/pause: Space
  • Step single CPU instruction (while paused): Enter
  • Cycle displayed nametable: Tab
  • Cycle colour palette: P

Screenshot

screenshot

The main screen is drawn to the left, with debug information drawn to the right. This includes the values of internal registers, the selected nametable (changed by pressing tab), and the pattern tables.


Structure

The structure of the code closely resembles the structure of the hardware itself, with busses being used to map addresses to the correct components. The functionality of the PPU bus is encapsulated within the PPU class, whereas the CPU bus is its own class which can be though of as the main class of the emulator.

This structure is shown by the following diagram:

layout


Acknowledgements

About

A Nintendo Entertainment System emulator written in C++ (hobby project)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published