FuNes is a Nintendo Entertainment System (NES) emulator, written in Haskell.
Warning
This emulator is for research purposes. Do not use as your daily emulator. You can easily find more mature NES emulators on GitHub!
FuNes is an experiment before anything else. The goal was to see if the functional paradigm would apply well to writting virtual machines and emulator, thus being written in Haskell.
While the goal is to have a working emulator, it is in no way 100% valid. Some features are not (yet) implemented (see here) and some behaviour may be invalid
-
The different parts of the emulator (CPU, PPU, Bus) are isolated objects and computations on them were designed using Monads. This made testing a real pleasure. Moreover, I find the code overal quite elegant (e.g. for the opcodes).
-
The typeafety prevented some bit-level mistakes (especially when handling 2-byte addresses and 1-byte data), which is always welcome.
-
However, it feels like the functional paradigm didn't bring much else to the table, compared to a regular object-orented approach. Although, it should be noted that, in any case, was the functional paradigm an obstacle in the design and implementation of the emulator
Still wanna try out the emulator? Ok, here's how
You will need to have Stack and the SDL2 library installed.
Note: stack install will install the emulator as funes-exe
- Select: Space
- Start: Enter
- A: A
- B: S or Z
- D-pad: directional arrows
- Exit: Q or esc
- A unit test suite tests the behaviour of the CPU using the nestest suite
- It is regularly tested (manually) using the AccuracyCoin ROM.
Do not be scared of the failing tests, please check out this video to understand what this ROM checks for.
Results from Oct. 11 2025
Screen.Recording.2025-10-11.at.17.56.24.mp4This project wouldn't exist without the following resources. Many thanks to their respective authors 🙏
- 6502 Reference
- 'Writting NES emulator in Rust' (GitHub Pages, Source Code)
It's simple: Functional Programming + NES = FuNes
The fact that it shares the name with the late french actor Louis de Funes is accidental.
.png)


