dual gameboy memorycallback stuff
This commit is contained in:
parent
1f9b4d23fe
commit
923b5e2543
|
@ -641,9 +641,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
LibGambatte.MemoryCallback writecb;
|
LibGambatte.MemoryCallback writecb;
|
||||||
LibGambatte.MemoryCallback execcb;
|
LibGambatte.MemoryCallback execcb;
|
||||||
|
|
||||||
private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem();
|
private MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem();
|
||||||
public IMemoryCallbackSystem MemoryCallbacks { get { return _memorycallbacks; } }
|
public IMemoryCallbackSystem MemoryCallbacks { get { return _memorycallbacks; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// for use in dual core
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ics"></param>
|
||||||
|
public void ConnectMemoryCallbackSystem(MemoryCallbackSystem mcs)
|
||||||
|
{
|
||||||
|
_memorycallbacks = mcs;
|
||||||
|
}
|
||||||
|
|
||||||
void InitMemoryCallbacks()
|
void InitMemoryCallbacks()
|
||||||
{
|
{
|
||||||
readcb = (addr) => MemoryCallbacks.CallRead(addr);
|
readcb = (addr) => MemoryCallbacks.CallRead(addr);
|
||||||
|
|
|
@ -60,6 +60,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
R.Controller = RCont;
|
R.Controller = RCont;
|
||||||
L.ConnectInputCallbackSystem(_inputCallbacks);
|
L.ConnectInputCallbackSystem(_inputCallbacks);
|
||||||
R.ConnectInputCallbackSystem(_inputCallbacks);
|
R.ConnectInputCallbackSystem(_inputCallbacks);
|
||||||
|
L.ConnectMemoryCallbackSystem(_memorycallbacks);
|
||||||
|
R.ConnectMemoryCallbackSystem(_memorycallbacks);
|
||||||
|
|
||||||
comm.VsyncNum = L.CoreComm.VsyncNum;
|
comm.VsyncNum = L.CoreComm.VsyncNum;
|
||||||
comm.VsyncDen = L.CoreComm.VsyncDen;
|
comm.VsyncDen = L.CoreComm.VsyncDen;
|
||||||
|
@ -86,6 +88,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
|
|
||||||
private InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
private InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||||
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
|
public IInputCallbackSystem InputCallbacks { get { return _inputCallbacks; } }
|
||||||
|
private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem();
|
||||||
|
public IMemoryCallbackSystem MemoryCallbacks { get { return _memorycallbacks; } }
|
||||||
|
|
||||||
public ITracer Tracer
|
public ITracer Tracer
|
||||||
{
|
{
|
||||||
|
@ -93,12 +97,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
get { throw new NotImplementedException(); }
|
get { throw new NotImplementedException(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMemoryCallbackSystem MemoryCallbacks
|
|
||||||
{
|
|
||||||
[FeatureNotImplemented]
|
|
||||||
get { throw new NotImplementedException(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public IVideoProvider VideoProvider { get { return this; } }
|
public IVideoProvider VideoProvider { get { return this; } }
|
||||||
public ISoundProvider SoundProvider { get { return null; } }
|
public ISoundProvider SoundProvider { get { return null; } }
|
||||||
public ISyncSoundProvider SyncSoundProvider { get { return this; } }
|
public ISyncSoundProvider SyncSoundProvider { get { return this; } }
|
||||||
|
|
Loading…
Reference in New Issue