2015-01-17 19:10:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|
|
|
|
{
|
|
|
|
|
public partial class GambatteLink : IDebuggable
|
|
|
|
|
{
|
|
|
|
|
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
|
|
|
|
|
{
|
|
|
|
|
var left = L.GetCpuFlagsAndRegisters()
|
|
|
|
|
.Select(reg => new KeyValuePair<string, RegisterValue>("Left " + reg.Key, reg.Value));
|
|
|
|
|
|
|
|
|
|
var right = R.GetCpuFlagsAndRegisters()
|
|
|
|
|
.Select(reg => new KeyValuePair<string, RegisterValue>("Right " + reg.Key, reg.Value));
|
|
|
|
|
|
|
|
|
|
return left.Union(right).ToList().ToDictionary(pair => pair.Key, pair => pair.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetCpuRegister(string register, int value)
|
|
|
|
|
{
|
|
|
|
|
if (register.StartsWith("Left "))
|
|
|
|
|
{
|
|
|
|
|
L.SetCpuRegister(register.Replace("Left ", ""), value);
|
|
|
|
|
}
|
|
|
|
|
else if (register.StartsWith("Right "))
|
|
|
|
|
{
|
|
|
|
|
R.SetCpuRegister(register.Replace("Right ", ""), value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IMemoryCallbackSystem MemoryCallbacks
|
|
|
|
|
{
|
|
|
|
|
get { return _memorycallbacks; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool CanStep(StepType type)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[FeatureNotImplemented]
|
|
|
|
|
public void Step(StepType type) { throw new NotImplementedException(); }
|
|
|
|
|
|
2017-01-10 01:23:05 +00:00
|
|
|
|
[FeatureNotImplemented]
|
2018-05-12 16:55:42 +00:00
|
|
|
|
public long TotalExecutedCycles
|
2017-01-10 01:23:05 +00:00
|
|
|
|
{
|
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-02 03:05:17 +00:00
|
|
|
|
private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem(new[] { "System Bus" });
|
2015-01-17 19:10:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|