Lua emu.getregister(s) - add NES support for PC register, add support for A2600 and C64
This commit is contained in:
parent
fb78215590
commit
acf5c19a58
|
@ -90,7 +90,23 @@ namespace BizHawk.Emulation.Computers.Commodore64
|
|||
|
||||
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return new List<KeyValuePair<string, int>>
|
||||
{
|
||||
new KeyValuePair<string, int>("A", board.cpu.A),
|
||||
new KeyValuePair<string, int>("X", board.cpu.X),
|
||||
new KeyValuePair<string, int>("Y", board.cpu.Y),
|
||||
new KeyValuePair<string, int>("S", board.cpu.S),
|
||||
new KeyValuePair<string, int>("PC", board.cpu.PC),
|
||||
new KeyValuePair<string, int>("Flag C", board.cpu.FlagC ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag Z", board.cpu.FlagZ ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag I", board.cpu.FlagI ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag D", board.cpu.FlagD ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag B", board.cpu.FlagB ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag V", board.cpu.FlagV ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag N", board.cpu.FlagN ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag T", board.cpu.FlagT ? 1 : 0)
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,35 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
|
|||
}
|
||||
}
|
||||
|
||||
public byte A
|
||||
{
|
||||
get { return cpu.A; } set { cpu.A = value; }
|
||||
}
|
||||
|
||||
public byte X
|
||||
{
|
||||
get { return cpu.X; } set { cpu.X = value; }
|
||||
}
|
||||
|
||||
public byte Y
|
||||
{
|
||||
get { return cpu.Y; } set { cpu.Y = value; }
|
||||
}
|
||||
|
||||
public byte S
|
||||
{
|
||||
get { return cpu.S; } set { cpu.S = value; }
|
||||
}
|
||||
|
||||
public bool FlagC { get { return cpu.FlagC; } }
|
||||
public bool FlagZ { get { return cpu.FlagZ; } }
|
||||
public bool FlagI { get { return cpu.FlagI; } }
|
||||
public bool FlagD { get { return cpu.FlagD; } }
|
||||
public bool FlagB { get { return cpu.FlagB; } }
|
||||
public bool FlagV { get { return cpu.FlagV; } }
|
||||
public bool FlagN { get { return cpu.FlagN; } }
|
||||
public bool FlagT { get { return cpu.FlagT; } }
|
||||
|
||||
public byte Peek(int addr)
|
||||
{
|
||||
if (addr == 0x0000)
|
||||
|
|
|
@ -43,7 +43,23 @@ namespace BizHawk
|
|||
|
||||
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return new List<KeyValuePair<string, int>>
|
||||
{
|
||||
new KeyValuePair<string, int>("A", cpu.A),
|
||||
new KeyValuePair<string, int>("X", cpu.X),
|
||||
new KeyValuePair<string, int>("Y", cpu.Y),
|
||||
new KeyValuePair<string, int>("S", cpu.S),
|
||||
new KeyValuePair<string, int>("PC", cpu.PC),
|
||||
new KeyValuePair<string, int>("Flag C", cpu.FlagC ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag Z", cpu.FlagZ ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag I", cpu.FlagI ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag D", cpu.FlagD ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag B", cpu.FlagB ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag V", cpu.FlagV ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag N", cpu.FlagN ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag T", cpu.FlagT ? 1 : 0)
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public void ResetCounters()
|
||||
|
|
|
@ -890,6 +890,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
new KeyValuePair<string, int>("X", cpu.X),
|
||||
new KeyValuePair<string, int>("Y", cpu.Y),
|
||||
new KeyValuePair<string, int>("S", cpu.S),
|
||||
new KeyValuePair<string, int>("PC", cpu.PC),
|
||||
new KeyValuePair<string, int>("Flag C", cpu.FlagC ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag Z", cpu.FlagZ ? 1 : 0),
|
||||
new KeyValuePair<string, int>("Flag I", cpu.FlagI ? 1 : 0),
|
||||
|
|
Loading…
Reference in New Issue