diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs index 2a2c18c4b4..47c58551ea 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs @@ -129,6 +129,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo else { cpu.IRQ = _irq_apu || board.IRQSignal; + if (CoreInputComm.CpuTraceEnable) + CoreInputComm.CpuTraceStream.WriteLine(cpu.State()); cpu.ExecuteOne(); } diff --git a/BizHawk.Emulation/Interfaces/CoreComms.cs b/BizHawk.Emulation/Interfaces/CoreComms.cs index 63e7f062b7..1910a76039 100644 --- a/BizHawk.Emulation/Interfaces/CoreComms.cs +++ b/BizHawk.Emulation/Interfaces/CoreComms.cs @@ -11,6 +11,12 @@ public bool SNES_ShowBG1_0, SNES_ShowBG2_0, SNES_ShowBG3_0, SNES_ShowBG4_0; public bool SNES_ShowBG1_1, SNES_ShowBG2_1, SNES_ShowBG3_1, SNES_ShowBG4_1; public bool SNES_ShowOBJ_0, SNES_ShowOBJ_1, SNES_ShowOBJ_2, SNES_ShowOBJ_3; + + /// + /// if this is set, then the cpu should dump trace info to CpuTraceStream + /// + public bool CpuTraceEnable; + public System.IO.StreamWriter CpuTraceStream; } public class CoreOutputComm @@ -26,5 +32,7 @@ public int VsyncDen = 1; public string RomStatusAnnotation; public string RomStatusDetails; + + } }