Skip to content

VoltXd/NESFT

Repository files navigation

NESFT

Nes Emulator with Sound Fourier Transform. A project aiming to run Super Mario Bros. (and more...)

Goals

The main goal of this project was to create a NES emulator without GUI. A side goal was to try unit testing in C++ with Google Test. Once I achieved the main goal, I started to make a GUI including mainly sound visualisation features.

How to build

First, clone this repository:

git clone --recursive https://github.com/VoltXd/NESFT.git
# or
git clone --recursive git@github.com:VoltXd/NESFT.git

Run the following command :

cmake -B build

This will generate a makefile or a Visual Studio project (depending on your system). Then, you can either build the main target or the test target.

Compile on Linux

cd build

# Build targets one-by-one
make nesft
make nesft-TEST

# Build everything
make all

Compile on Window (MSVC)

:: Build targets one-by-one
MSBuild.exe nesft.vcxproj /property:Configuration=Release
MSBuild.exe nesft-TEST.vcxproj /property:Configuration=Release

Plan

  • CPU
    • Official instructions
    • Illegal instructions (not planned to do them)
  • PPU
    • Rendering with OpenGL
    • Pixels rendering
      • Background rendering
      • Sprites rendering
      • 8x16 sprite rendering
    • Color emphasis & greyscale
  • Controller
    • Keyboard default keys
    • Keyboard custom keys
    • Gamepad
  • Audio
    • APU
    • Stream audio with OpenAL
    • Changeable master volume
    • Filtering (AA and low-pass)
    • Fix OpenAL
      • Sound latency
      • No sound if app closed unexpectedly...
    • Generate sound signals
      • Pulses
      • Triangle
      • Noise
      • DMC
    • Sound channels visualisation
    • Sound spectrum visualisation
      • Zero padding
      • Window functions
  • Mappers
    • 000 (SMB, DK, Excitebike...)
    • 001 (Zelda I & II, Metroid, Kid Icarus...)
    • 002 (Castlevania, Duck Tales, Mega man...)
    • 003 (Arkanoid, Gradius...)
    • 004 (SMB2/3, Kirby's adventure, Mother)
    • Total: 5 / 256 iNES 1.0 mappers

References

Inspiration

Inspired by Dave Poo:
Emulating a CPU in C++ (6502)
Emulating a CPU in C++ #2 (6502) - Unit Testing

And OneLoneCoder
NES Emulator from scratch

NES Hardware

NESdev Wiki
Palette color

6502

Andrew Jacobs - 6502
C64 Reset Process, I need to verify if it is different on the NES...
6502 Overflow flag explained

Test

Google Test

OpenAL

OpenAL Documentation
OpenAL destroy computer audio FIX
Sound latency (just don't use 165463 sound buffers please...)

OpenGL

Learn OpenGL

Libraries

Check out libraries folder.

License

MIT License. See LICENSE file.

Releases

No releases published

Packages

No packages published

Languages