From 6961e645c6d4129a278392e7d0596119a4142699 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 28 Sep 2020 20:09:14 +1000 Subject: [PATCH] Cheats: Ignore 00 code --- src/core/cheats.cpp | 6 ++++++ src/core/cheats.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/core/cheats.cpp b/src/core/cheats.cpp index 466fb71f8..c031e041b 100644 --- a/src/core/cheats.cpp +++ b/src/core/cheats.cpp @@ -392,6 +392,12 @@ void CheatCode::Apply() const const Instruction& inst = instructions[index]; switch (inst.code) { + case InstructionCode::Nop: + { + index++; + } + break; + case InstructionCode::ConstantWrite8: { CPU::SafeWriteMemoryByte(inst.address, inst.value8); diff --git a/src/core/cheats.h b/src/core/cheats.h index abf317f39..a4f7091a0 100644 --- a/src/core/cheats.h +++ b/src/core/cheats.h @@ -9,6 +9,7 @@ struct CheatCode { enum class InstructionCode : u8 { + Nop = 0x00, ConstantWrite8 = 0x30, ConstantWrite16 = 0x80, Increment16 = 0x10,