From a7703ab84234b78940331b288e256ba4dd87dbf3 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 9 Jul 2024 01:07:18 -0500 Subject: [PATCH] Add magic breakpoint instruction --- src/cpu.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpu.rs b/src/cpu.rs index 28dcd69..965e967 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -822,6 +822,10 @@ impl CPU { Insn::Stop => self.stop(), Insn::Halt => self.halt(), + Insn::Ld(R8::B, R8::B) => { + let _ = self.ld(R8::B, R8::B, bus); + Err(Error { kind: HitBreak(self.pc(), self.m_cycles + 1) }) + } Insn::Ld(dst, src) => self.ld(dst, src, bus), Insn::LdImm(dst) => self.ld_imm(dst, bus), Insn::LdImm16(dst) => self.ld_imm16(dst, bus),