FCPP is a cross-platform, simple and accurate FC/NES emulator in C++. FCPP is my undergraduate graduation project, but I hope not limited to this and make it better.
FCPP can be compiled to WebAssembly, try it in your browser!
NES Joypad | Keyboard | Xbox Controller |
---|---|---|
A | A | A |
B | S | B |
Select | X | X |
Start | Z | Start |
Up | Up | Up |
Down | Down | Down |
Left | Left | Left |
Right | Right | Right |
Turbo A | Q | LB |
Turbo B | W | RB |
Key | Feature | QFCPP Support | TFCPP Support |
---|---|---|---|
F1 | Quick Save | Yes | Yes |
F2 | Quick Load | Yes | Yes |
F3 | Reset | Yes | Yes |
F4 | Pause/Resume | Yes | Yes |
F5 | Rewind | Yes | No |
- SDL2 (Optional,as multimedia backend)
- SFML2 (Optional,as multimedia backend)
- raylib (Optional,as multimedia backend,can be downloaded automatically by CMake)
- Qt5 or Qt6 (Optional,for GUI)
- Pybind11 (Optional,for Python binding,can be downloaded automatically by CMake)
- CMake (v3.13 or newer)
- C++17 compiler
Option | Description | Default |
---|---|---|
FCPP_SHARED_LIB | Build libraries as shared lib | OFF |
FCPP_IO_WITH_SFML2 | Build SFML2 backend | OFF |
FCPP_IO_WITH_SDL2 | Build SDL2 backend | ON |
FCPP_IO_WITH_RAYLIB | Build raylib backend | OFF |
FCPP_BUILD_CLI | Build CLI | ON |
FCPP_BUILD_GUI | Build GUI | ON |
FCPP_BUILD_TEST_CORE | Build test for libfcpp | OFF |
FCPP_BUILD_TEST_WASM | Build test demo for wasm | OFF |
FCPP_BUILD_TEST_DEBUGGER | Build test demo for debugger | OFF |
FCPP_BUILD_C_BINDING | Build C binding | OFF |
FCPP_BUILD_PYTHON_BINDING | Build Python binding | OFF |
FCPP_BUILD_WASM | Build libefcpp for wasm | OFF |
FCPP_BUILD_TOOLS | Build libfcpp_tools | OFF |
FCPP_LTO | Enable Link time optimization | OFF |
- Adjust CMake options as needed, and generate a Visual Studio project.
- If there are no special requirements, change the build type to
release
. - Generate the
ALL_BUILD
project. - (optional) Generate the
INSTALL
project to install the binary file to the specified location.
Build in KUbuntu21.10 with Qt5 and use the default CMake option:
# Install Qt5 and SDL2
sudo apt-get install qtbase5-dev qtbase5-dev-tools qttools5-dev libsdl2-dev
# Enter the FCPP root directory and prepare to build
cd FCPP && mkdir build && cd build
# Do cmake
cmake ..
# Building
make
# Run binary
./bin/qfcpp
# Install (Optional)
make install
No extra dependency is required, just download emsdk and build it:
# Enter the FCPP root directory and prepare to build
cd FCPP && mkdir build_wasm && cd build_wasm
# Do cmake
emcmake cmake .. -DFCPP_PRESET_EMSCRIPTEN=ON -DROM_PATH="/path/to/your/rom/file"
# Building
emmake make
# launch a http server to run it on your browser
emrun ./bin/fcpp_test_wasm.html
Not tested, should work, similar to Linux
- Mapper 0
- Mapper 1
- Mapper 2
- Mapper 3
- Mapper 4
- Mapper 7
- Mapper 9
- Mapper 10
- Mapper 11
- Mapper 13
- Mapper 92
- Mapper 180
Check game compatibility for each Mapper here.