3 ms·
I was under the impression the gameboy cpu was a standard z80, but it seems that's not the case? What did they add to it?
by mysterydip 5y ago
I was under the impression the gameboy cpu was a standard z80, but it seems that's not the case? What did they add to it?
- aappleby 5y agoThey removed some instructions and added some instructions. Check the pandocs - https://gbdev.io/pandocs/ https://gbdev.io/pandocs/
- ekimekim 5y agoThe Gameboy CPU is signifigantly less capable than a full z80. It's missing key features like the IX and IY registers (and thus addressing modes), most of the 16-bit ALU, the second set of "shadow" registers intended for interrupt handling (instead, almost all gameboy interrupt routines start by pushing all the current registers onto the stack), and a bunch of other things I forget. There's also some stuff it adds, such as the swap instruction (swapping the upper and lower nibbles of a byte) and the stop instruction (puts the gameboy into a low-power state until it is woken by a keypress).
- userbinator 5y agohttps://gbdev.gg8.se/wiki/articles/CPU_Comparision_with_Z80 https://gbdev.gg8.se/wiki/articles/CPU_Comparision_with_Z80 They added/changed/removed instructions to fit the system more closely, e.g. IN/OUT is now done through MMIO in the FFxx area and thus there are dedicated instructions to access that address range.