From c4ccbecaf7f9a1327ce87620f078e9c092e415f1 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sun, 28 Aug 2022 16:24:55 +0200 Subject: [PATCH] Emulator: Add warning for illegal opcodes --- src/cpu.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/cpu.cpp b/src/cpu.cpp index 995ef1e..d35a179 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -226,6 +226,19 @@ void CPU::update() case 0xfe: cp(); break; case 0xff: rst(); break; + case 0xd3: + case 0xdb: + case 0xdd: + case 0xe3: + case 0xe4: + case 0xeb: + case 0xec: + case 0xed: + case 0xf4: + case 0xfc: + case 0xfd: + print("illegal opcode\n"); + VERIFY_NOT_REACHED(); default: print("opcode {:#x} not implemented\n", opcode); print("immediate: {:#04x}\n", pcRead());