add CoreInputComm.CpuTraceEnable and CoreInputComm.CpuTraceStream, and use it in NES; set those appropriately from a gui component and you can effect user-controlled cpu tracing, if its been setup in the core he's interested in. CoreInputComm doesnt reconstruct between emulator instances, so this may not be the best way of hooking it up, but its serviceable.

This commit is contained in:
zeromus 2012-09-16 19:38:08 +00:00
parent eea2160df2
commit 4018452f21
2 changed files with 10 additions and 0 deletions

View File

@ -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();
}

View File

@ -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;
/// <summary>
/// if this is set, then the cpu should dump trace info to CpuTraceStream
/// </summary>
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;
}
}