A NES emulator written in Haskell on SDL2: NTSC timing, the NROM mapper, audio and keyboard controls, built as an experiment in whether the functional paradigm suits virtual machines, with the CPU, PPU and bus as isolated monadic computations, checked against nestest and AccuracyCoin.
- 83 / 131AccuracyCoin score
Trade-offs
- CPU, PPU and bus are isolated, with their computations in monads: testing was a pleasure, and types caught bit-level mistakes with 2-byte addresses and 1-byte data.
- Beyond that, the functional paradigm brought little over an object-oriented design, though it never got in the way.
- Accuracy isn't the goal: it is a research emulator with one mapper and imperfect audio, not a daily driver.
Q&A3
Against the nestest ROM and its reference trace; AccuracyCoin then scores broader hardware behaviour.
The stateful work on CPU, APU and PPU runs in continuation-passing style monads, with rendering and sound filtering on separate threads.
NTSC, the NROM mapper and audio that isn't perfect yet; it builds with Stack against SDL2.
Links
Built by
Reviews
Loading reviews
More in Haskell
See all 4 →
arbiterPostgreSQL job queue for Haskell, with no broker and no leader- VoLCAA Life Cycle Assessment engine in Haskell: LCA databases as queryable answers
- hideA Haskell IDE in Haskell, in a terminal, a native window or a browser
- ScrodA fast Haskell documentation generator that parses modules without type checking
More in Emulators
See all 6 →
RetroTickClassic Windows and DOS programs run in the browser on a TypeScript x86 emulator
Anemoia-ESP32NES emulator running at native speed on a plain ESP32- GeckoA GameCube and Wii emulator and debugger written in Rust
- TheseusA compiler that turns DOS and Win32 executables into Rust source
- Brovanx86_64 emulator for tracing, reversing and sandboxing Windows and Linux binaries
nuPSXExperimental PlayStation 1 emulator and debugger written in Zig