3 ms·
This might seem like a roundabout way to start, but I'd recommend Code by Charles Petzold[0]. It starts out with just wires, switches, and relays, and as the b
by rpeden 8y ago
This might seem like a roundabout way to start, but I'd recommend Code by Charles Petzold[0].
It starts out with just wires, switches, and relays, and as the book progresses he goes through the process of building up a simple CPU and RAM one step at a time. The book even walks you through coming up with opcodes and assembly language.
Even if you already know this stuff, I found the book was helpful in developing an intuitive feel for how everything works and fits together.
After reading it, you'd probably have a good mental model of how you'd want to approach writing an emulator.
The Nand to Tetris courses and their accompanying textbook would probably be helpful here too[1][2].
[0] https://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319 https://www.amazon.com/Code-Language-Computer-Hardware-Softw...
[1] https://www.coursera.org/learn/build-a-computer https://www.coursera.org/learn/build-a-computer
[2] https://www.coursera.org/learn/nand2tetris2 https://www.coursera.org/learn/nand2tetris2