4 ms·
I wrote an emulator in Python in college and recently redesigned and rewrote it in rust. It was a pretty fulfilling experience. I spent several weeks writing a
by 63 2y ago
I wrote an emulator in Python in college and recently redesigned and rewrote it in rust. It was a pretty fulfilling experience. I spent several weeks writing a long program just to get data to sufficiently test performance. After all was said and done, my rust emulator still ran the program so fast I could barely get enough samples for a flame graph.
If anyone reading is working on a chip-8 emulator for the first time, a word of warning: for instructions that affect the vF register, be sure to check whether the register should be set before running the instruction but actually set it after. This is subtle but affects several popular roms.
My test program if anyone wants to marvel at my inefficient assembly:
https://github.com/dreary-dugong/fib8_benchmark https://github.com/dreary-dugong/fib8_benchmark
There's some fun stuff in there though, animated graphics and self modifying code. Highly recommend hacking on chip-8.