PCEngine - check if MemoryExecute callbacks exist before calling them, provides a noticeable speedup, also update the cpu generator code

This commit is contained in:
adelikat 2015-01-24 14:16:15 +00:00
parent 28cc91a0c4
commit 2d2a04f5f9
2 changed files with 4 additions and 3 deletions

View File

@ -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++);

View File

@ -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)");