README.md

June 20, 2025 ยท View on GitHub

puNES

Qt-based Nintendo Entertainment System emulator and NSF/NSF2/NSFe Music Player

GitHub release License Crowdin GitHub code size in bytes CodeFactor Packaging status

Download on Flathub

:floppy_disk: Work in Progress (WIP) Builds Build status

These executables are always updated to the latest commit:

Notes:

  • WARNING save states of version 0.110 or earlier are no longer compatible.
  • Due to the many changes I'm making to the core of the emulator, new bugs may have been introduced, if you find that the roms no longer work properly compared to version 0.110, please let me know.
  • 32 bit versions are Windows XP compatible.

:beer: Support

If you want buy me a beer :

GitHub Sponsors PayPal kofi

Multilingual Support

A big thank you to everyone who contributed to the translations:

  • Arabic
  • Chinese
  • English
  • French
  • German
  • Hungarian
  • Italian
  • Polish
  • Portuguese
  • Russian
  • Spanish
  • Turkish

Help with Translations here

:camera: Screenshots

puNES main window puNES NSF2 Player puNES Slot Preview puNES General Settings puNES Video Filters Settings puNES Cheat Editor puNES Xbox360 Standard Controller Settings puNES PS4 Standard Controller Settings puNES Family BASIC Virtual Keyboard puNES Subor Virtual Keyboard

:keyboard: Configuration

To run in portable mode there is 3 distinct ways:

  1. If the executable is in a folder containing the puNES.cfg file.
  2. Rename the executable by adding the suffix _p.
    • Examples: punes.exe -> punes_p.exe or punes64.exe -> punes64_p.exe
  3. Run the emulator with the "--portable" option.

To see a list of available command-line options, start puNES with the -h argument.

:electric_plug: Supported Mappers

012345678910
1112131415161718192021
2223242526272829303132
33343536373840414243
44454647484950515253
5556575859606162636465
6667686970717273747576
77787980818283858687
88899091929394959697
99100101103104105106107108
111112113114115116117118119120
121122123125126
132133134136137138139140141142
143144145146147148149150151152153
154155156157158159162163164
165166167168170171172173175
176177178179180182183184185186
187188189190191192193194195196197
198199200201202203204205206207208
209210211212213214215216217218219
221222224225226227228229230
231232233234235236237238240241
242243244245246248249250252
253254255256258259260261262263
264265266267268269271272274
281282283284285
286287288289290291292295
297298299300301302303304305306307
308309311312313314315
319320322323324325327328329
331332333334335336337338339340
341342343344345346347348349350351
352353354355356357358359360361362
366368369370372
374375377380381382384
386387388389390393394395
396397398399400401403404406
409410411412413414415416417
420421422428
429431432433434436437438
442446447
451452455456457
471
481
512513516
517518519521522524525526527
528529530532534536537538
539540541543547
550551552554555556557558559560
561562564

:electric_plug: UNIF boards

  1. 3D-BLOCK
  2. 8-IN-1
  3. 10-24-C-A1
  4. 12-IN-1
  5. 13in1JY110
  6. 42in1ResetSwitch
  7. 64in1NoRepeat
  8. 70in1
  9. 70in1B
  10. 150in1A
  11. 158B
  12. 190in1
  13. 212-HONG-KONG
  14. 603-5052
  15. 8157
  16. 8237
  17. 8237A
  18. 11160
  19. 22026
  20. 22211
  21. 43272
  22. 60311C
  23. 80013-B
  24. 82112C
  25. 411120-C
  26. 810544-C-A1
  27. 820561C
  28. 830118C
  29. 830134C
  30. 830425C-4391T
  31. 830752C
  32. 831128C
  33. 891227
  34. 900218
  35. A60AS
  36. A65AS
  37. AC08
  38. AMROM
  39. ANROM
  40. AOROM
  41. AX5705
  42. AX-40G
  43. BB
  44. BJ-56
  45. BOY
  46. BS-5
  47. BS-400R
  48. BS-4040R
  49. CC-21
  50. CHINA_ER_SAN2
  51. CITYFIGHT
  52. CNROM
  53. COOLBOY
  54. COOLGIRL
  55. CTC-09
  56. CTC-12IN1
  57. D1038
  58. DANCE
  59. DANCE2000
  60. DRAGONFIGHTER
  61. DREAMTECH01
  62. DRIPGAME
  63. EDU2000
  64. EH8813A
  65. F-15
  66. FARID_SLROM_8-IN-1
  67. FARID_UNROM_8-IN-1
  68. FC-28-5027
  69. FK23C
  70. FK23CA
  71. FS304
  72. G-146
  73. Ghostbusters63in1
  74. GKCXIN1
  75. GN-26
  76. GS-2004
  77. GS-2013
  78. H2288
  79. HP898F
  80. HP2018-A
  81. HPXX
  82. JC-016-2
  83. K-3006
  84. K-3010
  85. K-3033
  86. K-3036
  87. K-3046
  88. K-3071
  89. K-3088
  90. KOF97
  91. KONAMI-QTAI
  92. KS106C
  93. KS7012
  94. KS7013B
  95. KS7016
  96. KS7017
  97. KS7021A
  98. KS7030
  99. KS7031
  100. KS7032
  101. KS7037
  102. KS7057
  103. L6IN1
  104. LH09
  105. LH10
  106. LH32
  107. LH51
  108. M2C52A
  109. MALISB
  110. MARIO1-MALEE2
  111. MINDKIDS
  112. N49C-300
  113. N625092
  114. NEWSTAR-GRM070-8IN1
  115. NovelDiamond9999999in1
  116. NROM
  117. NROM-128
  118. NROM-256
  119. NTBROM
  120. NTD-03
  121. OneBus
  122. RESET-TXROM
  123. RESETNROM-XIN1
  124. RT-01
  125. S-2009
  126. SA005-A
  127. SA-0036
  128. SA-0037
  129. SA-016-1M
  130. SA-9602B
  131. SA-72007
  132. SA-72008
  133. SA-NROM
  134. Sachen-74LS374N
  135. Sachen-8259A
  136. Sachen-8259B
  137. Sachen-8259C
  138. Sachen-8259D
  139. SB-5013
  140. SC-127
  141. SHERO
  142. SL1632
  143. SLROM
  144. SMB2J
  145. STREETFIGTER-GAME4IN1
  146. Super24in1SC03
  147. SuperHIK8in1
  148. Supervision16in1
  149. T3H53
  150. T4A54A
  151. T-230
  152. T-262
  153. TBROM
  154. TC-U01-1.5M
  155. TEK90
  156. TF1201
  157. TFROM
  158. TH2131-1
  159. TJ-03
  160. TKROM
  161. TLROM
  162. Transformer
  163. UNROM
  164. UOROM
  165. VRC7
  166. WAIXING-FS005
  167. WAIXING-FW01
  168. WS
  169. YOKO

:information_source: How to Compile

CMake Options

CMake OptionDescriptionDefault
ENABLE_RELEASEBuild release versionON
ENABLE_FFMPEGEnable FFMPEG supportON
ENABLE_OPENGLUse OpenGL support instead of Direct3D 9 (only for Windows)ON
ENABLE_OPENGL_CGEnable OpenGL nVidia Cg Toolkit supportOFF
ENABLE_FULLSCREEN_RESFREQEnable Fullscreen resolution and auto frequencyON
ENABLE_QT5_LIBSForce use of QT5 librariesOFF
DISABLE_PORTABLE_MODEDisable portable mode handling (useful with sandbox
environments like Flatpak)
OFF

:penguin: Linux

Expand

Dependencies

Compilation of puNES

git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON
cmake --build build -j2

if you don't want to use the Ninja build system and prefer the classic Makefile:

cmake -B build -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL_CG:BOOL=ON
make -j2

the executable punes is in the build/src directory.

Linux Debug version

If you need the debug version then you need to replace the cmake -B build -G Ninja command of the previous examples with the following:

cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOL=OFF [...]
cmake --build build -j2

or if you prefer the classic Makefile:

cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOL=OFF [...]
make -j2

where [...] are the other necessary options.

Example on how to compile on Ubuntu 24.04

sudo apt-get install -y git cmake ninja-build libtool build-essential pkg-config mesa-common-dev freeglut3-dev
sudo apt-get install -y nvidia-cg-toolkit libx11-dev libxrandr-dev libxcb-cursor-dev libasound2-dev libudev-dev
sudo apt-get install -y libglvnd-dev libavformat-dev libavcodec-dev libswresample-dev libswscale-dev libavutil-dev libqt6svg6-dev
sudo apt-get install -y qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools qt6-image-formats-plugins
git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja
cmake --build build -j2

to start the emulator

./build/src/punes

P.S. To work correctly under wayland you need to have QT6 updated to at least 6.8 while 24.04 uses 6.4. I recommend using the AppImage :link:x86_64 which uses 6.9.1. If you are curious to know how I compile the AppImage consult the :link:.github/workflows/build.yml.

:smiling_imp: FreeBSD

Expand

Dependencies

  • CMake >= 3.14 (Ninja build system is optional)
  • Qt5 or Qt6 with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
  • sndio
  • libX11 and libXrandr
  • p7zip for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
  • (optional) ffmpeg libraries >= 4.0 if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See notes.

Compilation of puNES

sudo pkg install -y devel/cmake devel/ninja devel/pkgconf devel/git multimedia/ffmpeg audio/sndio devel/qt5-qmake
sudo pkg install -y devel/qt5-buildtools devel/qt5-core x11-toolkits/qt5-gui x11-toolkits/qt5-widgets graphics/qt5-svg
sudo pkg install -y devel/qt5-linguisttools
git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2

if you don't want to use the Ninja build system and prefer the classic Makefile:

cmake -B build -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
make -j2

the executable punes is in the build/src directory.

FreeBSD Debug version

If you need the debug version then you need to replace the cmake -B Build -G Ninja command of the previous examples with the following:

cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
cmake --build build -j2

or if you prefer the classic Makefile:

cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
make -j2

where [...] are the other necessary options.

:blowfish: OpenBSD

Expand

Dependencies

  • CMake >= 3.14 (Ninja build system is optional)
  • Qt5 or Qt6 with OpenGL support (qtcore, qtgui, qtwidgets, qtnetwork, qtsvg and qttools)
  • sndio
  • libX11 and libXrandr
  • p7zip for compressed file support (lib7zip uses the 7z.so library on unix-like systems)
  • (optional) ffmpeg libraries >= 4.0 if you want video and audio recording support (libavcodec, libavformat, libavutil, libswresample and libswscale). See notes

Compilation of puNES

git clone https://github.com/punesemu/puNES
cd puNES
cmake -B build -G Ninja -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2

if you don't want to use the Ninja build system and prefer the classic Makefile:

cmake -B build -DQt5_DIR=/usr/local/lib/qt5/cmake/Qt5 -DENABLE_FFMPEG:BOOL=ON
make -j2

the executable punes is in the buid/src directory.

OpenBSD Debug version

If you need the debug version then you need to replace the cmake -B Build -G Ninja command of the previous examples with the following:

cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
cmake --build build -j2

or if you prefer the classic Makefile:

cmake -B build -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]
make -j2

where [...] are the other necessary options.

:computer: Windows

Expand

Dependencies

  • Qt5 with OpenGL support (5.6.3 is the last if you want the support for Windows XP)

Development Environment installation

  1. install MSYS2
  2. open "MSYS2 MinGW 64-bit" shell (or 32 bit if you want compile the 32 bit version of puNES)
pacman -Syu
  1. close the MSYS2 window and run it again from Start menu
pacman -Su
pacman -S base-devel git wget p7zip unzip mingw-w64-i686-cmake mingw-w64-x86_64-cmake
pacman -S perl ruby python2 mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
pacman -S mingw-w64-i686-ffmpeg mingw-w64-x86_64-ffmpeg
exit
  1. open a new MSYS2 shell and build the necessary libraries

Compilation of the Qt5 libraries

  1. download and unzip the sources
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qtbase-everywhere-opensource-src-5.15.8.zip
unzip qtbase-everywhere-opensource-src-5.15.8.zip
mv qtbase-everywhere-src-5.15.8 qt5

the renaming of the directory is necessary to not generate a compile-time error caused by the 255 characters maximum path length limitation on Windows, This is the typical error message you might encounter:

"../../../../include/QtEventDispatcherSupport/5.15.8/QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h:1:10: fatal error: ../../../../../src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h: No such file or directory"
  1. compile the libraries
cd qt5
echo -e "QMAKE_LFLAGS += -static -static-libgcc\nDEFINES += QT_STATIC_BUILD\n" >> mkspecs/win32-g++/qmake.conf
./configure.bat -prefix $MINGW_PREFIX -extprefix $MINGW_PREFIX -bindir $MINGW_PREFIX/lib/qt5/bin -headerdir $MINGW_PREFIX/include/qt5 -libdir $MINGW_PREFIX/lib/qt5 -archdatadir $MINGW_PREFIX/lib/qt5 -plugindir $MINGW_PREFIX/lib/qt5/plugins -libexecdir $MINGW_PREFIX/lib/qt5/bin -datadir $MINGW_PREFIX/share/qt5 -docdir $MINGW_PREFIX/share/doc/qt5 -translationdir $MINGW_PREFIX/share/qt5/translations -sysconfdir $MINGW_PREFIX/etc/xdg -examplesdir $MINGW_PREFIX/share/qt5/examples -testsdir $MINGW_PREFIX/share/qt5/tests -platform win32-g++ -nomake examples -nomake tests -nomake tools -no-compile-examples -release -opensource -confirm-license -static -c++std c++17 -sse2 -static-runtime -make libs -no-ltcg -no-dbus -no-accessibility -no-inotify -no-iconv -no-icu -no-openssl -no-system-proxies -no-cups -no-fontconfig -no-zstd -opengl desktop -no-angle -gif -ico -qt-libpng -qt-libjpeg -qt-pcre -qt-zlib -qt-freetype
make
  1. and finally install them
make install
cp -v $MINGW_PREFIX/lib/qt5/pkgconfig/* $MINGW_PREFIX/lib/pkgconfig/.
cd ..
  1. now it's time for the SVG module...
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qtsvg-everywhere-opensource-src-5.15.8.zip
unzip qtsvg-everywhere-opensource-src-5.15.8.zip
mv qtsvg-everywhere-src-5.15.8 qt5svg
cd qt5svg
$MINGW_PREFIX/lib/qt5/bin/qmake
make
make install
cp -v $MINGW_PREFIX/lib/qt5/pkgconfig/* $MINGW_PREFIX/lib/pkgconfig/.
cd ..
  1. ...and for the tools
wget http://download.qt.io/archive/qt/5.15/5.15.8/submodules/qttools-everywhere-opensource-src-5.15.8.zip
unzip qttools-everywhere-opensource-src-5.15.8.zip
mv qttools-everywhere-src-5.15.8 qt5tools
cd qt5tools
$MINGW_PREFIX/lib/qt5/bin/qmake
make
make install
cd ..

Compilation of puNES

  1. Now you have everything you need to compile correctly puNES
git clone https://github.com/punesemu/puNES
cd puNES

if you want D3D9 version :

cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON -DENABLE_OPENGL:BOOL=OFF
cmake --build build -j2

otherwise :

cmake -B build -G Ninja -DENABLE_FFMPEG:BOOL=ON
cmake --build build -j2

The executable punes.exe is in the build/src directory but in order to run it you need the following dlls:

  • 7z.dl
  • avcodec-58.dll
  • avformat-58.dll
  • avutil-56.dll
  • cg.dll
  • cgD3D9.dll (only for D3D9 version)
  • cgGL.dll (only for OpenGL version)
  • libwinpthread-1.dll
  • swresample-3.dll
  • swscale-5.dll

that you can download here : :link:64bit version or :link:32bit version.

Windows Debug version

If you need the debug version then you need to replace the cmake -B build -G Ninja command of the previous examples with the following:

cmake -B build -G Ninja -DCMAKE_C_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O0 -g -DDEBUG' -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_RELEASE:BOOL=OFF [...]

where [...] are the other necessary options.


:movie_camera: FFmpeg

It is always possible to disable audio/video recording support by specifying the configure parameter --without-ffmpeg. If the installed version is lower than 4.0 the support will be disabled automatically.

Supported audio recording formats:

  • WAV Audio
  • MP3 Audio (lame) (*)
  • AAC Audio
  • Flac Audio
  • Ogg Audio (vorbis) (*)
  • Opus Audio (libopus) (*)

Supported video recording formats:

  • MPEG 1 Video
  • MPEG 2 Video
  • MPEG 4 Video
  • MPEG H264 Video (libx264) (*)
  • High Efficiency Video Codec (libx265) (*)
  • WebM Video (libvpx) (*)
  • Windows Media Video
  • AVI FF Video
  • AVI Video

(*) if compiled in FFmpeg.