4 ms·
Sort of related, there's a great cycle-accurate (well, that's the goal I think) emulator project for the 6502 recently discussed here: https://floooh.github.io
by binarycrusader 7y ago
Sort of related, there's a great cycle-accurate (well, that's the goal I think) emulator project for the 6502 recently discussed here:
https://floooh.github.io/2019/12/13/cycle-stepped-6502.html https://floooh.github.io/2019/12/13/cycle-stepped-6502.html
- zellyn 7y agoInteresting. I see they unrolled their switch statement to include a cycle count. I just called a "tick" function at the end of each cycle, which is definitely slower: https://github.com/zellyn/go6502/blob/master/cpu/opcodeinstructions.go#L53 https://github.com/zellyn/go6502/blob/master/cpu/opcodeinstr... I didn't get to the point of caring about interrupt correctness, but I did port the gate-level 6502 emulation to Go, and run Klauss Dormann's fairly comprehensive test suite on both in parallel, checking that all memory reads and writes matched.