diff --git a/BizHawk.Emulation.Cores/CPUs/HuC6280/Execute.cs b/BizHawk.Emulation.Cores/CPUs/HuC6280/Execute.cs index 3b918732fa..73046df20c 100644 --- a/BizHawk.Emulation.Cores/CPUs/HuC6280/Execute.cs +++ b/BizHawk.Emulation.Cores/CPUs/HuC6280/Execute.cs @@ -59,7 +59,8 @@ namespace BizHawk.Emulation.Cores.Components.H6280 LagIFlag = FlagI; if (Debug) Logger(State()); - Core.MemoryCallbacks.CallExecutes(PC); + if (Core.MemoryCallbacks.HasExecutes) { Core.MemoryCallbacks.CallExecutes(PC); } + if (CDLLoggingActive) CDLOpcode(); byte opcode = ReadMemory(PC++); diff --git a/CpuCoreGenerator/HuC6280/CoreGenerator.cs b/CpuCoreGenerator/HuC6280/CoreGenerator.cs index f5713075cd..1793f2c2b9 100644 --- a/CpuCoreGenerator/HuC6280/CoreGenerator.cs +++ b/CpuCoreGenerator/HuC6280/CoreGenerator.cs @@ -494,8 +494,8 @@ namespace HuC6280 w.WriteLine(" LagIFlag = FlagI;"); w.WriteLine(); w.WriteLine(" if (Debug) Logger(State());"); - w.WriteLine(" CoreComm.MemoryCallbackSystem.CallExecute(PC);"); - w.WriteLine(" if (CDLLoggingActive) CDLOpcode();"); + w.WriteLine(" if (Core.MemoryCallbacks.HasExecutes) { Core.MemoryCallbacks.CallExecutes(PC); }"); + w.WriteLine(" if (CDLLoggingActive) CDLOpcode();"); w.WriteLine(); w.WriteLine(" byte opcode = ReadMemory(PC++);"); w.WriteLine(" switch (opcode)");