diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs index c13cbb2938..dc00ed397c 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Globalization; using System.IO; using System.Collections.Generic; +using System.Runtime.CompilerServices; using BizHawk.Emulation.CPUs.M6502; #pragma warning disable 162 @@ -299,6 +300,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo static ByteBuffer cpu_sequence_NTSC = new ByteBuffer(new byte[]{3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}); static ByteBuffer cpu_sequence_PAL = new ByteBuffer(new byte[]{4,3,3,3,3,4,3,3,3,3,4,3,3,3,3,4,3,3,3,3,4,3,3,3,3,4,3,3,3,3,4,3,3,3,3,4,3,3,3,3}); public int cpu_step, cpu_stepcounter, cpu_deadcounter; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] protected void RunCpuOne() { cpu_stepcounter++; @@ -333,6 +336,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte ReadReg(int addr) { switch (addr) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/PPU.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/PPU.cs index 113f1cf1b4..dfc7c30380 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/PPU.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/PPU.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; using System.IO; using System.Collections.Generic; +using System.Runtime.CompilerServices; using BizHawk.Emulation.CPUs.M6502; @@ -143,6 +144,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo idleSynch = true; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] void TriggerNMI() { nes.cpu.NMI = true; @@ -163,6 +165,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] void runppu(int x) { //run one ppu cycle at a time so we can interact with the ppu and clockPPU at high granularity