BizHawk/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs

97 lines
1.8 KiB
C#

using BizHawk.Emulation.Common;
using System;
namespace BizHawk.Emulation.Cores.Intellivision
{
public sealed partial class Intellivision : IEmulator
{
public IEmulatorServiceProvider ServiceProvider { get; private set; }
[FeatureNotImplemented]
public ISoundProvider SoundProvider
{
get { return NullSound.SilenceProvider; }
}
[FeatureNotImplemented]
public ISyncSoundProvider SyncSoundProvider
{
get { return new FakeSyncSound(NullSound.SilenceProvider, 735); }
}
public bool StartAsyncSound()
{
return true;
}
public void EndAsyncSound()
{
}
public ControllerDefinition ControllerDefinition
{
get { return ControllerDeck.Definition; }
}
public IController Controller { get; set; }
public void FrameAdvance(bool render, bool rendersound)
{
if (Tracer.Enabled)
_cpu.TraceCallback = (s) => Tracer.Put(s);
else
_cpu.TraceCallback = null;
Frame++;
// read the controller state here for now
get_controller_state();
//_stic.Mobs();
_cpu.AddPendingCycles(3791);
_stic.Sr1 = true;
while (_cpu.GetPendingCycles() > 0)
{
int cycles = _cpu.Execute();
Connect();
}
_cpu.AddPendingCycles(14934 - 3791 - _cpu.GetPendingCycles());
_stic.Sr1 = false;
_stic.Background();
_stic.Mobs();
while (_cpu.GetPendingCycles() > 0)
{
int cycles = _cpu.Execute();
Connect();
}
}
public int Frame { get; private set; }
public string SystemId
{
get { return "INTV"; }
}
public bool DeterministicEmulation { get { return true; } }
[FeatureNotImplemented]
public string BoardName { get { return null; } }
public void ResetCounters()
{
Frame = 0;
}
public CoreComm CoreComm { get; private set; }
public void Dispose()
{
}
}
}