2014-11-23 17:14:40 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|
|
|
|
{
|
|
|
|
|
public partial class Atari2600 : IDebuggable
|
|
|
|
|
{
|
2014-12-20 13:16:15 +00:00
|
|
|
|
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
|
2014-11-23 17:14:40 +00:00
|
|
|
|
{
|
2014-12-20 13:16:15 +00:00
|
|
|
|
return new Dictionary<string, RegisterValue>
|
2014-11-23 17:14:40 +00:00
|
|
|
|
{
|
2017-04-25 13:28:06 +00:00
|
|
|
|
["A"] = Cpu.A,
|
|
|
|
|
["X"] = Cpu.X,
|
|
|
|
|
["Y"] = Cpu.Y,
|
|
|
|
|
["S"] = Cpu.S,
|
|
|
|
|
["PC"] = Cpu.PC,
|
2014-11-23 17:14:40 +00:00
|
|
|
|
|
2017-04-25 13:28:06 +00:00
|
|
|
|
["Flag C"] = Cpu.FlagC,
|
|
|
|
|
["Flag Z"] = Cpu.FlagZ,
|
|
|
|
|
["Flag I"] = Cpu.FlagI,
|
|
|
|
|
["Flag D"] = Cpu.FlagD,
|
2014-11-23 17:14:40 +00:00
|
|
|
|
|
2017-04-25 13:28:06 +00:00
|
|
|
|
["Flag B"] = Cpu.FlagB,
|
|
|
|
|
["Flag V"] = Cpu.FlagV,
|
|
|
|
|
["Flag N"] = Cpu.FlagN,
|
|
|
|
|
["Flag T"] = Cpu.FlagT
|
2014-11-23 17:14:40 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetCpuRegister(string register, int value)
|
|
|
|
|
{
|
|
|
|
|
switch (register)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
throw new InvalidOperationException();
|
|
|
|
|
case "A":
|
|
|
|
|
Cpu.A = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "X":
|
|
|
|
|
Cpu.X = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "Y":
|
|
|
|
|
Cpu.Y = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "S":
|
|
|
|
|
Cpu.S = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "PC":
|
|
|
|
|
Cpu.PC = (ushort)value;
|
|
|
|
|
break;
|
|
|
|
|
case "Flag I":
|
|
|
|
|
Cpu.FlagI = value > 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-12-05 00:05:40 +00:00
|
|
|
|
|
2017-08-02 03:05:17 +00:00
|
|
|
|
public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" });
|
2014-12-14 18:58:16 +00:00
|
|
|
|
|
2014-12-20 13:29:57 +00:00
|
|
|
|
public bool CanStep(StepType type)
|
|
|
|
|
{
|
2017-09-20 14:27:27 +00:00
|
|
|
|
return false;
|
2014-12-20 13:29:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-12-14 18:58:16 +00:00
|
|
|
|
[FeatureNotImplemented]
|
2014-12-18 18:48:37 +00:00
|
|
|
|
public void Step(StepType type)
|
|
|
|
|
{
|
2017-09-20 14:27:27 +00:00
|
|
|
|
throw new NotImplementedException();
|
2014-12-18 18:48:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-05-12 16:55:42 +00:00
|
|
|
|
public long TotalExecutedCycles => Cpu.TotalExecutedCycles;
|
2014-11-23 17:14:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|