Fix GPGX one off hack to fix trace logger, and instead do a less bad hack in CallbackBasedTraceBuffer
This commit is contained in:
parent
05801dc2c5
commit
71aaf349b5
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Linq;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
|
||||
namespace BizHawk.Emulation.Common
|
||||
|
@ -71,7 +71,8 @@ namespace BizHawk.Emulation.Common
|
|||
|
||||
if (_sink != null)
|
||||
{
|
||||
DebuggableCore.MemoryCallbacks.Add(new TracingMemoryCallback(TraceFromCallback));
|
||||
var scope = DebuggableCore.MemoryCallbacks.AvailableScopes.First(); // This will be an issue when cores use this trace buffer and utilize multiple scopes
|
||||
DebuggableCore.MemoryCallbacks.Add(new TracingMemoryCallback(TraceFromCallback, scope));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,9 +81,10 @@ namespace BizHawk.Emulation.Common
|
|||
|
||||
public class TracingMemoryCallback : IMemoryCallback
|
||||
{
|
||||
public TracingMemoryCallback(MemoryCallbackDelegate callback)
|
||||
public TracingMemoryCallback(MemoryCallbackDelegate callback, string scope)
|
||||
{
|
||||
Callback = callback;
|
||||
Scope = scope;
|
||||
}
|
||||
|
||||
public MemoryCallbackType Type => MemoryCallbackType.Execute;
|
||||
|
@ -95,7 +97,7 @@ namespace BizHawk.Emulation.Common
|
|||
|
||||
public uint? AddressMask => null;
|
||||
|
||||
public string Scope => ""; // This will be relevant if/when the trace logger can trace anything other than the system bus
|
||||
public string Scope { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IMemoryCallbackSystem MemoryCallbacks
|
||||
{
|
||||
get { return _memoryCallbacks; }
|
||||
}
|
||||
public IMemoryCallbackSystem MemoryCallbacks => _memoryCallbacks;
|
||||
|
||||
public bool CanStep(StepType type) { return false; }
|
||||
|
||||
|
@ -47,12 +44,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
public void Step(StepType type) { throw new NotImplementedException(); }
|
||||
|
||||
[FeatureNotImplemented]
|
||||
public long TotalExecutedCycles
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
public long TotalExecutedCycles => throw new NotImplementedException();
|
||||
|
||||
private readonly MemoryCallbackSystem _memoryCallbacks = new MemoryCallbackSystem(new[] { "M68K BUS", "" });
|
||||
private readonly MemoryCallbackSystem _memoryCallbacks = new MemoryCallbackSystem(new[] { "M68K BUS" });
|
||||
|
||||
private LibGPGX.mem_cb ExecCallback;
|
||||
private LibGPGX.mem_cb ReadCallback;
|
||||
|
|
Loading…
Reference in New Issue