I found Go to be really productive for expressing machine emulators; the language is deliberately amenable to working with ints at bit level, the packaging system is effective and mostly stays out of the way, it has a flexible "switch", there's just enough abstraction so that it's easy to swap different components (memories, etc) in and out, and, of course, once you start running the things, goroutines make it easy to step machines as coroutines.
The juxtaposition between this and <a href="https://github.com/pcwalton/sprocketnes" rel="nofollow">https://github.com/pcwalton/sprocketnes</a> is neat.<p>E.g. <a href="https://github.com/pcwalton/sprocketnes/blob/master/audio.rs" rel="nofollow">https://github.com/pcwalton/sprocketnes/blob/master/audio.rs</a> compared to <a href="https://github.com/scottferg/Fergulator/blob/master/audio.go" rel="nofollow">https://github.com/scottferg/Fergulator/blob/master/audio.go</a> or <a href="https://github.com/pcwalton/sprocketnes/blob/master/disasm.rs" rel="nofollow">https://github.com/pcwalton/sprocketnes/blob/master/disasm.r...</a> compared to <a href="https://github.com/scottferg/Fergulator/blob/master/disassembler.go" rel="nofollow">https://github.com/scottferg/Fergulator/blob/master/disassem...</a>
He should consider making the emulator able to read .fcm input logs from a TAS.<p>These runs usually serve as good tests of an emulators compliance. Particularly the runs that were verified on the actual console.<p>though... there are some cartridges that have random (read: not psudo-random) behavior, and can't actually be tested. (or tased at all)
Where does one go to learn how to create an emulator? I'm interested in picking up C/Go (probably the latter nowadays) while trying to make an emulator. Is there a process people adhere by or do they seriously just figure it out?
Best part is that if you've installed Go and set up the GOPATH already, downloading and compiling fergulator is just a<p>go get github.com/scottferg/Fergulator<p>away.