2016-02-21 22:34:14 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Common
|
2014-12-05 00:17:34 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Allows the cpu to dump trace info to a trace stream
|
|
|
|
|
/// </summary>
|
2014-12-23 01:58:12 +00:00
|
|
|
|
public interface ITraceable : IEmulatorService
|
2014-12-05 00:17:34 +00:00
|
|
|
|
{
|
2014-12-22 19:01:21 +00:00
|
|
|
|
// TODO: would it be faster (considering both disk and screen output) to keep the data as a List<string> directly?
|
|
|
|
|
|
2014-12-05 00:17:34 +00:00
|
|
|
|
bool Enabled { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The header that would be used by a trace logger
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Header { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The current log of cpu instructions
|
|
|
|
|
/// </summary>
|
2016-02-21 22:34:14 +00:00
|
|
|
|
IEnumerable<TraceInfo> Contents { get; }
|
2014-12-05 00:17:34 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes the current log of cpu instructions, when doing so, it will clear the contents from the buffer
|
|
|
|
|
/// </summary>
|
2016-02-21 22:34:14 +00:00
|
|
|
|
IEnumerable<TraceInfo> TakeContents();
|
2014-12-05 00:17:34 +00:00
|
|
|
|
|
2016-02-21 22:34:14 +00:00
|
|
|
|
void Put(TraceInfo content);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class TraceInfo
|
|
|
|
|
{
|
|
|
|
|
public string Disassembly { get; set; }
|
|
|
|
|
public string RegisterInfo { get; set; }
|
2014-12-05 00:17:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|