BizHawk/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs

66 lines
1.3 KiB
C#
Raw Normal View History

using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Calculators
{
public partial class TI83 : IEmulator
{
public IEmulatorServiceProvider ServiceProvider { get; private set; }
public ControllerDefinition ControllerDefinition
{
get { return TI83Controller; }
}
public void FrameAdvance(IController controller, bool render, bool rendersound)
{
_controller = controller;
_lagged = true;
2016-02-28 13:07:22 +00:00
Cpu.Debug = Tracer.Enabled;
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);
//I eyeballed this speed
for (int i = 0; i < 5; i++)
{
_onPressed = controller.IsPressed("ON");
//and this was derived from other emus
Cpu.ExecuteCycles(10000);
Cpu.Interrupt = true;
}
Frame++;
if (_lagged)
{
_lagCount++;
}
_isLag = _lagged;
}
public int Frame
{
get { return _frame; }
set { _frame = value; }
}
public string SystemId { get { return "TI83"; } }
public bool DeterministicEmulation { get { return true; } }
public void ResetCounters()
{
Frame = 0;
_lagCount = 0;
_isLag = false;
}
public CoreComm CoreComm { get; private set; }
public void Dispose() { }
}
}