Game Boy Emulator: Designing the CPU
In we learned how to write an instruction decoder and disassembler. It’s an important first step towards writing a Game Boy emulator. Assembly language – or the binary machine code form of it anyway – is the language of the CPU, and so we must represent, in software, a facsimile of a real CPU that can execute these machine code instructions for us.
So let’s start off with a quick overview of what exactly a CPU is and does, and how we’ll emulate it.