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

97 lines
1.8 KiB
C#
Raw Normal View History

2015-06-18 16:44:30 +00:00
using BizHawk.Emulation.Common;
using System;
2015-06-18 16:44:30 +00:00
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; }
2015-06-18 16:44:30 +00:00
}
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;
2015-06-18 16:44:30 +00:00
Frame++;
// read the controller state here for now
get_controller_state();
//_stic.Mobs();
2016-11-15 15:28:09 +00:00
_cpu.AddPendingCycles(3791);
_stic.Sr1 = true;
2015-06-18 16:44:30 +00:00
while (_cpu.GetPendingCycles() > 0)
{
int cycles = _cpu.Execute();
Connect();
}
2016-11-15 15:28:09 +00:00
_cpu.AddPendingCycles(14934 - 3791 - _cpu.GetPendingCycles());
_stic.Sr1 = false;
_stic.Background();
_stic.Mobs();
2016-11-15 15:28:09 +00:00
while (_cpu.GetPendingCycles() > 0)
{
int cycles = _cpu.Execute();
Connect();
}
2015-06-18 16:44:30 +00:00
}
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()
{
}
}
}