Hacker News new | ask | show | jobs
by metasaval 2577 days ago
Unrelated question: what resources did you use to write your CHIP-8 emulator? I've also been wanting to write one in Python for educational purposes, but haven't found any great resources yet in Python. Granted there are a few in C that I could try to translate over, but I'm curious to know what you used.
1 comments

I looked at the Wikipedia page and a couple PDFs from Google front page.

I stole a collection of games from someone else's project to use for testing.

My goal was to get in the door so I picked a language I knew well and set some constraints:

1. Doesn't have to be fast. Just has to run.

2. Write opcodes as pure functions, passing in an array of memory and returning a new array of memory. This made it easy to test and debug. But also made it super slow.

3. DO NOT look at someone else's code. This forced me down a way slower path where I learned a whole lot more than I would have if I just reimplemented others' work.