2015-06-18 16:44:30 +00:00
|
|
|
|
using BizHawk.Emulation.Common;
|
2016-11-11 21:47:55 +00:00
|
|
|
|
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
|
|
|
|
|
{
|
2016-12-03 23:44:25 +00:00
|
|
|
|
get { return ControllerDeck.Definition; }
|
2015-06-18 16:44:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IController Controller { get; set; }
|
|
|
|
|
|
|
|
|
|
public void FrameAdvance(bool render, bool rendersound)
|
|
|
|
|
{
|
2016-11-11 22:17:35 +00:00
|
|
|
|
if (Tracer.Enabled)
|
|
|
|
|
_cpu.TraceCallback = (s) => Tracer.Put(s);
|
|
|
|
|
else
|
|
|
|
|
_cpu.TraceCallback = null;
|
|
|
|
|
|
2015-06-18 16:44:30 +00:00
|
|
|
|
Frame++;
|
2016-11-11 21:47:55 +00:00
|
|
|
|
// 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-11 21:47:55 +00:00
|
|
|
|
|
2016-11-15 15:28:09 +00:00
|
|
|
|
_cpu.AddPendingCycles(14934 - 3791 - _cpu.GetPendingCycles());
|
|
|
|
|
_stic.Sr1 = false;
|
2016-11-11 21:47:55 +00:00
|
|
|
|
_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()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-12-03 23:44:25 +00:00
|
|
|
|
}
|