clones
clones copied to clipboard
Clojure 6502 and NES emulator
Clojure and the Immutable Emulator
Clones is an NES emulator for the gentlman (or woman) of distinguished immutable character. A core design goal is to build an entirely functional emulator.
Is this madness? Yes.
But how many cools would it be to be able to rewind and fast forward a game through states? Eleventy.
Why would you do such a thing?
Mallory is famously quoted as having replied to the question "Why do you want to climb Mount Everest?" with the retort "Because it's there"
So... you want to join the immutability cult?
Be advised that the current performance is about 1 frame per second on a new 15" Macbook Retina. Totally playable speed.
$ lein with-profile gui run [rom]

How do I test this monstrosity?
The specs test clones' internal API, state and functioning:
$ lein spec
There are also test ROMs that exercise the entire machine.
The nestest binary can be run and verified against the known-good Nintendulator debug log:
$ lein with-profile nestest run
Blargg's CPU tests can be run headlessly and report results:
$ lein with-profile blargg run [rom]