mGBA - pass core pointer to memory callback system

This commit is contained in:
adelikat 2020-02-29 15:35:00 -06:00
parent 75a991a36d
commit e44aa5d94a
3 changed files with 9 additions and 1 deletions

View File

@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
}
[FeatureNotImplemented]
public IMemoryCallbackSystem MemoryCallbacks { get; } = new MGBAMemoryCallbackSystem();
public IMemoryCallbackSystem MemoryCallbacks { get; }
public bool CanStep(StepType type) => false;

View File

@ -60,6 +60,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
};
_tracecb = new LibmGBA.TraceCallback((msg) => _tracer.Put(_traceInfo(msg)));
ser.Register(_tracer);
MemoryCallbacks = new MGBAMemoryCallbackSystem(_core);
}
catch
{

View File

@ -8,6 +8,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
{
public class MGBAMemoryCallbackSystem : IMemoryCallbackSystem
{
private readonly IntPtr _core;
public MGBAMemoryCallbackSystem(IntPtr core)
{
_core = core;
}
private readonly List<CallbackContainer> _callbacks = new List<CallbackContainer>();
public string[] AvailableScopes { get; } = { "System Bus" };