Implemented AppleII.SetCpuRegister
This commit is contained in:
parent
f2bcbf8502
commit
4b1547384b
|
@ -8,7 +8,6 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
|
|||
{
|
||||
public partial class AppleII : IDebuggable
|
||||
{
|
||||
[FeatureNotImplemented]
|
||||
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
|
||||
{
|
||||
var regs = _machine.GetCpuFlagsAndRegisters();
|
||||
|
@ -27,10 +26,52 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
|
|||
return dic;
|
||||
}
|
||||
|
||||
[FeatureNotImplemented]
|
||||
public void SetCpuRegister(string register, int value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
switch (register)
|
||||
{
|
||||
default:
|
||||
throw new InvalidOperationException();
|
||||
case "A":
|
||||
_machine.Cpu.RA = (byte)value;
|
||||
break;
|
||||
case "X":
|
||||
_machine.Cpu.RX = (byte)value;
|
||||
break;
|
||||
case "Y":
|
||||
_machine.Cpu.RY = (byte)value;
|
||||
break;
|
||||
case "S":
|
||||
_machine.Cpu.RS = (byte)value;
|
||||
break;
|
||||
case "PC":
|
||||
_machine.Cpu.RPC = (ushort)value;
|
||||
break;
|
||||
case "Flag C":
|
||||
_machine.Cpu.FlagC = value > 0;
|
||||
break;
|
||||
case "Flag Z":
|
||||
_machine.Cpu.FlagZ = value > 0;
|
||||
break;
|
||||
case "Flag I":
|
||||
_machine.Cpu.FlagI = value > 0;
|
||||
break;
|
||||
case "Flag D":
|
||||
_machine.Cpu.FlagD = value > 0;
|
||||
break;
|
||||
case "Flag B":
|
||||
_machine.Cpu.FlagB = value > 0;
|
||||
break;
|
||||
case "Flag T":
|
||||
_machine.Cpu.FlagT = value > 0;
|
||||
break;
|
||||
case "Flag V":
|
||||
_machine.Cpu.FlagV = value > 0;
|
||||
break;
|
||||
case "Flag N":
|
||||
_machine.Cpu.FlagV = value > 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanStep(StepType type) { return false; }
|
||||
|
|
|
@ -3206,12 +3206,12 @@ namespace Jellyfish.Virtu
|
|||
public bool IsThrottled { get; set; }
|
||||
public int Multiplier { get; set; }
|
||||
|
||||
public int RA { get; private set; }
|
||||
public int RX { get; private set; }
|
||||
public int RY { get; private set; }
|
||||
public int RS { get; private set; }
|
||||
public int RP { get; private set; }
|
||||
public int RPC { get; private set; }
|
||||
public int RA { get; set; }
|
||||
public int RX { get; set; }
|
||||
public int RY { get; set; }
|
||||
public int RS { get; set; }
|
||||
public int RP { get; set; }
|
||||
public int RPC { get; set; }
|
||||
public int EA { get; private set; }
|
||||
public int CC { get; private set; }
|
||||
public int OpCode { get; private set; }
|
||||
|
@ -3222,12 +3222,12 @@ namespace Jellyfish.Virtu
|
|||
private bool _is65C02;
|
||||
private Action[] _executeOpCode;
|
||||
|
||||
/// <summary>Carry Flag</summary>
|
||||
/// <summary>Carry Flag</summary>
|
||||
[JsonIgnore]
|
||||
public bool FlagC
|
||||
{
|
||||
get { return (RP & 0x01) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x01) | (value ? 0x01 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x01) | (value ? 0x01 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>Zero Flag</summary>
|
||||
|
@ -3235,7 +3235,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagZ
|
||||
{
|
||||
get { return (RP & 0x02) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x02) | (value ? 0x02 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x02) | (value ? 0x02 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>Interrupt Disable Flag</summary>
|
||||
|
@ -3251,7 +3251,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagD
|
||||
{
|
||||
get { return (RP & 0x08) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x08) | (value ? 0x08 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x08) | (value ? 0x08 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>Break Flag</summary>
|
||||
|
@ -3259,7 +3259,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagB
|
||||
{
|
||||
get { return (RP & 0x10) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x10) | (value ? 0x10 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x10) | (value ? 0x10 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>T... Flag</summary>
|
||||
|
@ -3267,7 +3267,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagT
|
||||
{
|
||||
get { return (RP & 0x20) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x20) | (value ? 0x20 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x20) | (value ? 0x20 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>Overflow Flag</summary>
|
||||
|
@ -3275,7 +3275,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagV
|
||||
{
|
||||
get { return (RP & 0x40) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x40) | (value ? 0x40 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x40) | (value ? 0x40 : 0x00)); }
|
||||
}
|
||||
|
||||
/// <summary>Negative Flag</summary>
|
||||
|
@ -3283,7 +3283,7 @@ namespace Jellyfish.Virtu
|
|||
public bool FlagN
|
||||
{
|
||||
get { return (RP & 0x80) != 0; }
|
||||
private set { RP = (byte)((RP & ~0x80) | (value ? 0x80 : 0x00)); }
|
||||
set { RP = (byte)((RP & ~0x80) | (value ? 0x80 : 0x00)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue