Cleanup SMS.IEmulator.cs
This commit is contained in:
parent
01eb150b3d
commit
b6fc3006e9
|
@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
{
|
{
|
||||||
public sealed partial class SMS : IEmulator
|
public sealed partial class SMS : IEmulator
|
||||||
{
|
{
|
||||||
public IEmulatorServiceProvider ServiceProvider { get; private set; }
|
public IEmulatorServiceProvider ServiceProvider { get; }
|
||||||
|
|
||||||
public ControllerDefinition ControllerDefinition
|
public ControllerDefinition ControllerDefinition
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
{
|
{
|
||||||
_controller = controller;
|
_controller = controller;
|
||||||
_lagged = true;
|
_lagged = true;
|
||||||
Frame++;
|
_frame++;
|
||||||
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
||||||
Cpu.Debug = Tracer.Enabled;
|
Cpu.Debug = Tracer.Enabled;
|
||||||
if (!IsGameGear)
|
if (!IsGameGear)
|
||||||
|
@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
|
|
||||||
if (Cpu.Debug && Cpu.Logger == null) // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
|
if (Cpu.Debug && Cpu.Logger == null) // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
|
||||||
{
|
{
|
||||||
Cpu.Logger = (s) => Tracer.Put(s);
|
Cpu.Logger = s => Tracer.Put(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsGameGear == false)
|
if (IsGameGear == false)
|
||||||
|
@ -62,19 +62,23 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SystemId { get { return "SMS"; } }
|
public int Frame => _frame;
|
||||||
|
|
||||||
public bool DeterministicEmulation { get { return true; } }
|
public string SystemId => "SMS";
|
||||||
|
|
||||||
|
public bool DeterministicEmulation => true;
|
||||||
|
|
||||||
public void ResetCounters()
|
public void ResetCounters()
|
||||||
{
|
{
|
||||||
Frame = 0;
|
_frame = 0;
|
||||||
_lagCount = 0;
|
_lagCount = 0;
|
||||||
_isLag = false;
|
_isLag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoreComm CoreComm { get; private set; }
|
public CoreComm CoreComm { get; }
|
||||||
|
|
||||||
public void Dispose() { }
|
public void Dispose()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
YM2413.SyncState(ser);
|
YM2413.SyncState(ser);
|
||||||
}
|
}
|
||||||
|
|
||||||
ser.Sync("Frame", ref frame);
|
ser.Sync("Frame", ref _frame);
|
||||||
ser.Sync("LagCount", ref _lagCount);
|
ser.Sync("LagCount", ref _lagCount);
|
||||||
ser.Sync("IsLag", ref _isLag);
|
ser.Sync("IsLag", ref _isLag);
|
||||||
|
|
||||||
|
|
|
@ -193,9 +193,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
private bool HasYM2413 = false;
|
private bool HasYM2413 = false;
|
||||||
private IController _controller;
|
private IController _controller;
|
||||||
|
|
||||||
private int frame = 0;
|
private int _frame = 0;
|
||||||
|
|
||||||
public int Frame { get { return frame; } set { frame = value; } }
|
|
||||||
|
|
||||||
private byte Port01 = 0xFF;
|
private byte Port01 = 0xFF;
|
||||||
private byte Port02 = 0xFF;
|
private byte Port02 = 0xFF;
|
||||||
|
|
Loading…
Reference in New Issue