BizHawk/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs

66 lines
1.5 KiB
C#
Raw Normal View History

2014-12-18 18:39:55 +00:00
using System;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.Commodore64
{
public partial class C64 : IDebuggable
{
2014-12-20 13:16:15 +00:00
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
2014-12-18 18:39:55 +00:00
{
2014-12-20 13:16:15 +00:00
return new Dictionary<string, RegisterValue>
2014-12-18 18:39:55 +00:00
{
{ "A", board.cpu.A },
{ "X", board.cpu.X },
{ "Y", board.cpu.Y },
{ "S", board.cpu.S },
{ "PC", board.cpu.PC },
{ "Flag C", board.cpu.FlagC },
{ "Flag Z", board.cpu.FlagZ },
{ "Flag I", board.cpu.FlagI },
{ "Flag D", board.cpu.FlagD },
{ "Flag B", board.cpu.FlagB },
{ "Flag V", board.cpu.FlagV },
{ "Flag N", board.cpu.FlagN },
{ "Flag T", board.cpu.FlagT }
2014-12-18 18:39:55 +00:00
};
}
public void SetCpuRegister(string register, int value)
{
switch (register)
{
default:
throw new InvalidOperationException();
case "A":
board.cpu.A = (byte)value;
break;
case "X":
board.cpu.X = (byte)value;
break;
case "Y":
board.cpu.Y = (byte)value;
break;
case "S":
board.cpu.S = (byte)value;
break;
case "PC":
board.cpu.PC = (ushort)value;
break;
}
}
public IMemoryCallbackSystem MemoryCallbacks
{
[FeatureNotImplemented]
get { throw new NotImplementedException(); }
}
[FeatureNotImplemented]
public void Step(StepType type) { throw new NotImplementedException(); }
public bool CanStep(StepType type) { return false; }
2014-12-18 18:39:55 +00:00
}
}