2013-11-11 03:20:33 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2014-11-30 16:01:01 +00:00
|
|
|
|
|
|
|
|
|
using BizHawk.Emulation.Common;
|
2012-10-23 03:33:57 +00:00
|
|
|
|
|
2013-11-13 03:32:25 +00:00
|
|
|
|
namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
2012-10-23 03:33:57 +00:00
|
|
|
|
{
|
2014-11-30 16:01:01 +00:00
|
|
|
|
public partial class Atari7800 : IDebuggable
|
2012-10-23 03:33:57 +00:00
|
|
|
|
{
|
2014-12-20 13:16:15 +00:00
|
|
|
|
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
|
2013-11-11 03:20:33 +00:00
|
|
|
|
{
|
2014-12-20 13:16:15 +00:00
|
|
|
|
return new Dictionary<string, RegisterValue>
|
2013-11-11 16:55:08 +00:00
|
|
|
|
{
|
2017-05-05 19:20:28 +00:00
|
|
|
|
["A"] = _theMachine.CPU.A,
|
|
|
|
|
["P"] = _theMachine.CPU.P,
|
|
|
|
|
["PC"] = _theMachine.CPU.PC,
|
|
|
|
|
["S"] = _theMachine.CPU.S,
|
|
|
|
|
["X"] = _theMachine.CPU.X,
|
|
|
|
|
["Y"] = _theMachine.CPU.Y,
|
|
|
|
|
["Flag B"] = _theMachine.CPU.fB,
|
|
|
|
|
["Flag C"] = _theMachine.CPU.fC,
|
|
|
|
|
["Flag D"] = _theMachine.CPU.fD,
|
|
|
|
|
["Flag I"] = _theMachine.CPU.fI,
|
|
|
|
|
["Flag N"] = _theMachine.CPU.fN,
|
|
|
|
|
["Flag V"] = _theMachine.CPU.fV,
|
|
|
|
|
["Flag Z"] = _theMachine.CPU.fZ
|
2013-11-11 16:55:08 +00:00
|
|
|
|
};
|
2013-11-11 03:20:33 +00:00
|
|
|
|
}
|
2014-05-31 17:03:21 +00:00
|
|
|
|
|
|
|
|
|
public void SetCpuRegister(string register, int value)
|
|
|
|
|
{
|
|
|
|
|
switch (register)
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
throw new InvalidOperationException();
|
|
|
|
|
case "A":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.A = (byte)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "P":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.P = (byte)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "PC":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.PC = (ushort)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "S":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.S = (byte)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "X":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.X = (byte)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "Y":
|
2017-05-05 19:20:28 +00:00
|
|
|
|
_theMachine.CPU.Y = (byte)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-12-05 00:05:40 +00:00
|
|
|
|
|
2014-12-05 01:56:45 +00:00
|
|
|
|
public IMemoryCallbackSystem MemoryCallbacks
|
|
|
|
|
{
|
|
|
|
|
[FeatureNotImplemented]
|
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
|
}
|
2014-12-14 18:58:16 +00:00
|
|
|
|
|
2017-04-24 15:32:45 +00:00
|
|
|
|
public bool CanStep(StepType type)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2014-12-20 13:29:57 +00:00
|
|
|
|
|
2014-12-14 18:58:16 +00:00
|
|
|
|
[FeatureNotImplemented]
|
2017-04-24 15:32:45 +00:00
|
|
|
|
public void Step(StepType type)
|
2017-01-10 01:23:05 +00:00
|
|
|
|
{
|
2017-04-24 15:32:45 +00:00
|
|
|
|
throw new NotImplementedException();
|
2017-01-10 01:23:05 +00:00
|
|
|
|
}
|
2017-04-24 15:32:45 +00:00
|
|
|
|
|
2017-05-05 19:20:28 +00:00
|
|
|
|
public int TotalExecutedCycles => (int)_theMachine.CPU.Clock;
|
2012-10-23 03:33:57 +00:00
|
|
|
|
}
|
|
|
|
|
}
|