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
|
|
|
|
{
|
2014-04-19 22:23:13 +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 },
|
2014-12-20 03:19:33 +00:00
|
|
|
|
{ "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":
|
|
|
|
|
theMachine.CPU.A = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "P":
|
|
|
|
|
theMachine.CPU.P = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "PC":
|
2014-05-31 18:25:36 +00:00
|
|
|
|
theMachine.CPU.PC = (ushort)value;
|
2014-05-31 17:03:21 +00:00
|
|
|
|
break;
|
|
|
|
|
case "S":
|
|
|
|
|
theMachine.CPU.S = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "X":
|
|
|
|
|
theMachine.CPU.X = (byte)value;
|
|
|
|
|
break;
|
|
|
|
|
case "Y":
|
|
|
|
|
theMachine.CPU.Y = (byte)value;
|
|
|
|
|
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
|
|
|
|
|
2014-12-20 13:29:57 +00:00
|
|
|
|
public bool CanStep(StepType type) { return false; }
|
|
|
|
|
|
2014-12-14 18:58:16 +00:00
|
|
|
|
[FeatureNotImplemented]
|
2014-12-15 22:19:10 +00:00
|
|
|
|
public void Step(StepType type) { throw new NotImplementedException(); }
|
2012-10-23 03:33:57 +00:00
|
|
|
|
}
|
|
|
|
|
}
|