3 ms·
So, how does one guy not familiar with this low level stuff, nor with GB internals or those 8-bit processors starts writing an emulator like this? Is there any
by severino 8y ago
So, how does one guy not familiar with this low level stuff, nor with GB internals or those 8-bit processors starts writing an emulator like this? Is there any suggested road one could follow, or something like that?
- anyfoo 8y agoLearning how to program a similar 8bit processor in assembly is the first step. Z80 is closest as the Game Boy CPU is based on that (though Z80 has some more features), but any relatively common 8bit CPU such as 8080 or the different 6502 will give you enough context. If you've done assembly already, this is trivial, if not, those CPUs are a good place to start and not hard. I'd say that merely getting a feel for the basics are enough. After that, realistically, I would start looking at one of the existing GB emulator write ups, just enough to understand how things fit together. You can get pretty far on the Game Boy e.g. without even implementing interrupts (not sure, I don't think the boot ROM really needs them), so don't hesitate to experiment already. Finally, have a few references ready (like available opcode tables and the infamous Game Boy CPU pdf that's easy to find), but keeping in mind that they do contain inaccuracies. A lot of understanding will come while implementing.
- severino 8y agoThanks for your advice. Being my first computer a MSX, it's good to know the GameBoy CPU is similar to the Z80. When I read it was a custom Sharp one, I thought it was a completely different world.