3 ms·
Interesting. 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
by zellyn 7y ago
Interesting. 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.