i8085 compatibility grid with z80 & GBZ80
The i8085 CPU is very similar to two other very popular CPUs, the z80 and the GameBoy’s LR35902 (z80-like) so I found it useful to have a chart of which opcode bytes differ between the i8085 and those two. So here it is, in SVG and other formats for anyone that may find it useful.
Also available as a hi-res PNG, an inkscape SVG , a PDF document or the original ODS document.
RIM & SIM
Opcodes RIM
and SIM
(Bytes 0x20
& 0x30
) on the i8085 correspond on both
z80 and GameBoy to two of the conditional relative jumps, namely JR NZ
and
JR NC
. This difference can be easily used to tell the z80 and the i8085 apart
at run-time.
GBZ80 opcodes (LR35902)
The GameBoy CPU Has multiple opcodes missing or moved to other locations,
trying to execute these i8085 opcodes will lock up the GameBoy CPU.
The opcodes are: OUT
IN
XTHL
CPO
XCHG
CPE
CP
CM
. The remaining
“incompatible” opcodes have a different function than the z80/i8085 and are
better described on this gbdev wiki page. Like with the RIM
/SIM
opcodes, these differences can be exploited to tell the i8085/z80/GameBoy
from each other at run-time.