Change IEmulator.GetCpuFlagsAndRegisters() to a Dictionary, fix a warning, throw NotImplemented exceptions in cores that don't implement this method rather than returning an empty list. Start Debugger UI User Controls

This commit is contained in:
adelikat 2014-04-19 22:23:13 +00:00
parent c7e37753bf
commit a61ff53d9c
29 changed files with 478 additions and 307 deletions

View File

@ -535,6 +535,12 @@
<Compile Include="tools\Cheats\Cheats.Designer.cs">
<DependentUpon>Cheats.cs</DependentUpon>
</Compile>
<Compile Include="tools\Debugger\RegisterBox.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="tools\Debugger\RegisterBox.Designer.cs">
<DependentUpon>RegisterBox.cs</DependentUpon>
</Compile>
<Compile Include="tools\GBA\GBAGPUView.cs">
<SubType>Form</SubType>
</Compile>
@ -1088,6 +1094,9 @@
<EmbeddedResource Include="tools\Cheats\Cheats.resx">
<DependentUpon>Cheats.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="tools\Debugger\RegisterBox.resx">
<DependentUpon>RegisterBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="tools\GBA\GBAGPUView.resx">
<DependentUpon>GBAGPUView.cs</DependentUpon>
</EmbeddedResource>

View File

@ -47,34 +47,34 @@ namespace BizHawk.Client.EmuHawk
public void UpdateValues()
{
var flags = _core.GetCpuFlagsAndRegisters2();
PCRegisterBox.Text = flags["PC"].ToString();
//var flags = _core.GetCpuFlagsAndRegisters();
//PCRegisterBox.Text = flags["PC"].ToString();
SPRegisterBox.Text = flags["S"].ToString();
SPRegisterHexBox.Text = string.Format("{0:X2}", flags["S"]);
SPRegisterBinaryBox.Text = ToBinStr(flags["S"]);
//SPRegisterBox.Text = flags["S"].ToString();
//SPRegisterHexBox.Text = string.Format("{0:X2}", flags["S"]);
//SPRegisterBinaryBox.Text = ToBinStr(flags["S"]);
ARegisterBox.Text = flags["A"].ToString();
ARegisterHexBox.Text = string.Format("{0:X2}", flags["A"]);
ARegisterBinaryBox.Text = ToBinStr(flags["A"]);
//ARegisterBox.Text = flags["A"].ToString();
//ARegisterHexBox.Text = string.Format("{0:X2}", flags["A"]);
//ARegisterBinaryBox.Text = ToBinStr(flags["A"]);
XRegisterBox.Text = flags["X"].ToString();
XRegisterHexBox.Text = string.Format("{0:X2}", flags["X"]);
XRegisterBinaryBox.Text = ToBinStr(flags["X"]);
//XRegisterBox.Text = flags["X"].ToString();
//XRegisterHexBox.Text = string.Format("{0:X2}", flags["X"]);
//XRegisterBinaryBox.Text = ToBinStr(flags["X"]);
YRegisterBox.Text = flags["Y"].ToString();
YRegisterHexBox.Text = string.Format("{0:X2}", flags["Y"]);
YRegisterBinaryBox.Text = ToBinStr(flags["Y"]);
//YRegisterBox.Text = flags["Y"].ToString();
//YRegisterHexBox.Text = string.Format("{0:X2}", flags["Y"]);
//YRegisterBinaryBox.Text = ToBinStr(flags["Y"]);
NFlagCheckbox.Checked = flags["Flag N"] == 1;
VFlagCheckbox.Checked = flags["Flag V"] == 1;
TFlagCheckbox.Checked = flags["Flag T"] == 1;
BFlagCheckbox.Checked = flags["Flag B"] == 1;
//NFlagCheckbox.Checked = flags["Flag N"] == 1;
//VFlagCheckbox.Checked = flags["Flag V"] == 1;
//TFlagCheckbox.Checked = flags["Flag T"] == 1;
//BFlagCheckbox.Checked = flags["Flag B"] == 1;
DFlagCheckbox.Checked = flags["Flag D"] == 1;
IFlagCheckbox.Checked = flags["Flag I"] == 1;
ZFlagCheckbox.Checked = flags["Flag Z"] == 1;
CFlagCheckbox.Checked = flags["Flag C"] == 1;
//DFlagCheckbox.Checked = flags["Flag D"] == 1;
//IFlagCheckbox.Checked = flags["Flag I"] == 1;
//ZFlagCheckbox.Checked = flags["Flag Z"] == 1;
//CFlagCheckbox.Checked = flags["Flag C"] == 1;
FrameCountBox.Text = _core.Frame.ToString();
}

View File

@ -0,0 +1,46 @@
namespace BizHawk.Client.EmuHawk
{
partial class RegisterBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// RegisterBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "RegisterBox";
this.Size = new System.Drawing.Size(316, 354);
this.Load += new System.EventHandler(this.RegisterBox_Load);
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
{
/// <summary>
/// This control shows Cpu Flags and Registers from the currently running emulator core
/// </summary>
public partial class RegisterBox : UserControl
{
public RegisterBox()
{
InitializeComponent();
}
private void RegisterBox_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -81,9 +81,9 @@ namespace BizHawk.Emulation.Common
public MemoryDomainList MemoryDomains { get { return memoryDomains; } }
public void Dispose() { }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>();
return new Dictionary<string, int>();
}
bool xmas;

View File

@ -143,7 +143,7 @@ namespace BizHawk.Emulation.Common
/// Returns a list of Cpu registers and their current state
/// </summary>
/// <returns></returns>
List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters();
Dictionary<string, int> GetCpuFlagsAndRegisters();
// ====settings interface====

View File

@ -971,40 +971,40 @@ namespace BizHawk.Emulation.Cores.Calculators
public bool PutSettings(object o) { return false; }
public bool PutSyncSettings(object o) { return false; }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("A", cpu.RegisterA),
new KeyValuePair<string, int>("AF", cpu.RegisterAF),
new KeyValuePair<string, int>("B", cpu.RegisterB),
new KeyValuePair<string, int>("BC", cpu.RegisterBC),
new KeyValuePair<string, int>("C", cpu.RegisterC),
new KeyValuePair<string, int>("D", cpu.RegisterD),
new KeyValuePair<string, int>("DE", cpu.RegisterDE),
new KeyValuePair<string, int>("E", cpu.RegisterE),
new KeyValuePair<string, int>("F", cpu.RegisterF),
new KeyValuePair<string, int>("H", cpu.RegisterH),
new KeyValuePair<string, int>("HL", cpu.RegisterHL),
new KeyValuePair<string, int>("I", cpu.RegisterI),
new KeyValuePair<string, int>("IX", cpu.RegisterIX),
new KeyValuePair<string, int>("IY", cpu.RegisterIY),
new KeyValuePair<string, int>("L", cpu.RegisterL),
new KeyValuePair<string, int>("PC", cpu.RegisterPC),
new KeyValuePair<string, int>("R", cpu.RegisterR),
new KeyValuePair<string, int>("Shadow AF", cpu.RegisterShadowAF),
new KeyValuePair<string, int>("Shadow BC", cpu.RegisterShadowBC),
new KeyValuePair<string, int>("Shadow DE", cpu.RegisterShadowDE),
new KeyValuePair<string, int>("Shadow HL", cpu.RegisterShadowHL),
new KeyValuePair<string, int>("SP", cpu.RegisterSP),
new KeyValuePair<string, int>("Flag C", cpu.RegisterF.Bit(0) ? 1 : 0),
new KeyValuePair<string, int>("Flag N", cpu.RegisterF.Bit(1) ? 1 : 0),
new KeyValuePair<string, int>("Flag P/V", cpu.RegisterF.Bit(2) ? 1 : 0),
new KeyValuePair<string, int>("Flag 3rd", cpu.RegisterF.Bit(3) ? 1 : 0),
new KeyValuePair<string, int>("Flag H", cpu.RegisterF.Bit(4) ? 1 : 0),
new KeyValuePair<string, int>("Flag 5th", cpu.RegisterF.Bit(5) ? 1 : 0),
new KeyValuePair<string, int>("Flag Z", cpu.RegisterF.Bit(6) ? 1 : 0),
new KeyValuePair<string, int>("Flag S", cpu.RegisterF.Bit(7) ? 1 : 0),
{ "A", cpu.RegisterA },
{ "AF", cpu.RegisterAF },
{ "B", cpu.RegisterB },
{ "BC", cpu.RegisterBC },
{ "C", cpu.RegisterC },
{ "D", cpu.RegisterD },
{ "DE", cpu.RegisterDE },
{ "E", cpu.RegisterE },
{ "F", cpu.RegisterF },
{ "H", cpu.RegisterH },
{ "HL", cpu.RegisterHL },
{ "I", cpu.RegisterI },
{ "IX", cpu.RegisterIX },
{ "IY", cpu.RegisterIY },
{ "L", cpu.RegisterL },
{ "PC", cpu.RegisterPC },
{ "R", cpu.RegisterR },
{ "Shadow AF", cpu.RegisterShadowAF },
{ "Shadow BC", cpu.RegisterShadowBC },
{ "Shadow DE", cpu.RegisterShadowDE },
{ "Shadow HL", cpu.RegisterShadowHL },
{ "SP", cpu.RegisterSP },
{ "Flag C", cpu.RegisterF.Bit(0) ? 1 : 0 },
{ "Flag N", cpu.RegisterF.Bit(1) ? 1 : 0 },
{ "Flag P/V", cpu.RegisterF.Bit(2) ? 1 : 0 },
{ "Flag 3rd", cpu.RegisterF.Bit(3) ? 1 : 0 },
{ "Flag H", cpu.RegisterF.Bit(4) ? 1 : 0 },
{ "Flag 5th", cpu.RegisterF.Bit(5) ? 1 : 0 },
{ "Flag Z", cpu.RegisterF.Bit(6) ? 1 : 0 },
{ "Flag S", cpu.RegisterF.Bit(7) ? 1 : 0 }
};
}
}

View File

@ -84,24 +84,23 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
//disk.HardReset();
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<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)
{ "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 ? 1 : 0 },
{ "Flag Z", board.cpu.FlagZ ? 1 : 0 },
{ "Flag I", board.cpu.FlagI ? 1 : 0 },
{ "Flag D", board.cpu.FlagD ? 1 : 0 },
{ "Flag B", board.cpu.FlagB ? 1 : 0 },
{ "Flag V", board.cpu.FlagV ? 1 : 0 },
{ "Flag N", board.cpu.FlagN ? 1 : 0 },
{ "Flag T", board.cpu.FlagT ? 1 : 0 }
};
}
}

View File

@ -144,28 +144,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
};
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
{
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)
};
}
// TODO: rewrite GetCpuFlagsAndRegisters this way
public Dictionary<string, int> GetCpuFlagsAndRegisters2()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new Dictionary<string, int>
{

View File

@ -238,12 +238,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public override void WriteMemory(ushort addr, byte value)
{
if (myWritePending && (Core.DistinctAccessCount > myNumberOfDistinctAccesses + 5))
{
int xxxx = 0;
}
if (addr < 0x1000)
{
base.WriteMemory(addr, value);

View File

@ -16,23 +16,23 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
EMU7800.Win.GameProgram GameInfo;
public byte[] hsram = new byte[2048];
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("A", theMachine.CPU.A),
new KeyValuePair<string, int>("P", theMachine.CPU.P),
new KeyValuePair<string, int>("PC", theMachine.CPU.PC),
new KeyValuePair<string, int>("S", theMachine.CPU.S),
new KeyValuePair<string, int>("X", theMachine.CPU.X),
new KeyValuePair<string, int>("Y", theMachine.CPU.Y),
new KeyValuePair<string, int>("B", theMachine.CPU.fB ? 1 : 0),
new KeyValuePair<string, int>("C", theMachine.CPU.fC ? 1 : 0),
new KeyValuePair<string, int>("D", theMachine.CPU.fD ? 1 : 0),
new KeyValuePair<string, int>("I", theMachine.CPU.fI ? 1 : 0),
new KeyValuePair<string, int>("N", theMachine.CPU.fN ? 1 : 0),
new KeyValuePair<string, int>("V", theMachine.CPU.fV ? 1 : 0),
new KeyValuePair<string, int>("Z", theMachine.CPU.fZ ? 1 : 0),
{ "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 ? 1 : 0 },
{ "Flag C", theMachine.CPU.fC ? 1 : 0 },
{ "Flag D", theMachine.CPU.fD ? 1 : 0 },
{ "Flag I", theMachine.CPU.fI ? 1 : 0 },
{ "Flag N", theMachine.CPU.fN ? 1 : 0 },
{ "Flag V", theMachine.CPU.fV ? 1 : 0 },
{ "Flag Z", theMachine.CPU.fZ ? 1 : 0 }
};
}
}

View File

@ -251,40 +251,40 @@ namespace BizHawk.Emulation.Cores.ColecoVision
}
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("A", Cpu.RegisterA),
new KeyValuePair<string, int>("AF", Cpu.RegisterAF),
new KeyValuePair<string, int>("B", Cpu.RegisterB),
new KeyValuePair<string, int>("BC", Cpu.RegisterBC),
new KeyValuePair<string, int>("C", Cpu.RegisterC),
new KeyValuePair<string, int>("D", Cpu.RegisterD),
new KeyValuePair<string, int>("DE", Cpu.RegisterDE),
new KeyValuePair<string, int>("E", Cpu.RegisterE),
new KeyValuePair<string, int>("F", Cpu.RegisterF),
new KeyValuePair<string, int>("H", Cpu.RegisterH),
new KeyValuePair<string, int>("HL", Cpu.RegisterHL),
new KeyValuePair<string, int>("I", Cpu.RegisterI),
new KeyValuePair<string, int>("IX", Cpu.RegisterIX),
new KeyValuePair<string, int>("IY", Cpu.RegisterIY),
new KeyValuePair<string, int>("L", Cpu.RegisterL),
new KeyValuePair<string, int>("PC", Cpu.RegisterPC),
new KeyValuePair<string, int>("R", Cpu.RegisterR),
new KeyValuePair<string, int>("Shadow AF", Cpu.RegisterShadowAF),
new KeyValuePair<string, int>("Shadow BC", Cpu.RegisterShadowBC),
new KeyValuePair<string, int>("Shadow DE", Cpu.RegisterShadowDE),
new KeyValuePair<string, int>("Shadow HL", Cpu.RegisterShadowHL),
new KeyValuePair<string, int>("SP", Cpu.RegisterSP),
new KeyValuePair<string, int>("Flag C", Cpu.RegisterF.Bit(0) ? 1 : 0),
new KeyValuePair<string, int>("Flag N", Cpu.RegisterF.Bit(1) ? 1 : 0),
new KeyValuePair<string, int>("Flag P/V", Cpu.RegisterF.Bit(2) ? 1 : 0),
new KeyValuePair<string, int>("Flag 3rd", Cpu.RegisterF.Bit(3) ? 1 : 0),
new KeyValuePair<string, int>("Flag H", Cpu.RegisterF.Bit(4) ? 1 : 0),
new KeyValuePair<string, int>("Flag 5th", Cpu.RegisterF.Bit(5) ? 1 : 0),
new KeyValuePair<string, int>("Flag Z", Cpu.RegisterF.Bit(6) ? 1 : 0),
new KeyValuePair<string, int>("Flag S", Cpu.RegisterF.Bit(7) ? 1 : 0),
{ "A", Cpu.RegisterA },
{ "AF", Cpu.RegisterAF },
{ "B", Cpu.RegisterB },
{ "BC", Cpu.RegisterBC },
{ "C", Cpu.RegisterC },
{ "D", Cpu.RegisterD },
{ "DE", Cpu.RegisterDE },
{ "E", Cpu.RegisterE },
{ "F", Cpu.RegisterF },
{ "H", Cpu.RegisterH },
{ "HL", Cpu.RegisterHL },
{ "I", Cpu.RegisterI },
{ "IX", Cpu.RegisterIX },
{ "IY", Cpu.RegisterIY },
{ "L", Cpu.RegisterL },
{ "PC", Cpu.RegisterPC },
{ "R", Cpu.RegisterR },
{ "Shadow AF", Cpu.RegisterShadowAF },
{ "Shadow BC", Cpu.RegisterShadowBC },
{ "Shadow DE", Cpu.RegisterShadowDE },
{ "Shadow HL", Cpu.RegisterShadowHL },
{ "SP", Cpu.RegisterSP },
{ "Flag C", Cpu.RegisterF.Bit(0) ? 1 : 0 },
{ "Flag N", Cpu.RegisterF.Bit(1) ? 1 : 0 },
{ "Flag P/V", Cpu.RegisterF.Bit(2) ? 1 : 0 },
{ "Flag 3rd", Cpu.RegisterF.Bit(3) ? 1 : 0 },
{ "Flag H", Cpu.RegisterF.Bit(4) ? 1 : 0 },
{ "Flag 5th", Cpu.RegisterF.Bit(5) ? 1 : 0 },
{ "Flag Z", Cpu.RegisterF.Bit(6) ? 1 : 0 },
{ "Flag S", Cpu.RegisterF.Bit(7) ? 1 : 0 }
};
}
}

View File

@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
STIC Stic;
PSG Psg;
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
throw new NotImplementedException();
}

View File

@ -10,13 +10,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
{
public class GBA : IEmulator, IVideoProvider, ISyncSoundProvider
{
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
var ret = new List<KeyValuePair<string, int>>();
var ret = new Dictionary<string, int>();
int[] data = new int[LibMeteor.regnames.Length];
LibMeteor.libmeteor_getregs(data);
for (int i = 0; i < data.Length; i++)
ret.Add(new KeyValuePair<string, int>(LibMeteor.regnames[i], data[i]));
ret.Add(LibMeteor.regnames[i], data[i]);
return ret;
}

View File

@ -131,22 +131,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
return CurrentButtons;
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
List<KeyValuePair<string, int>> ret = new List<KeyValuePair<string, int>>();
int[] data = new int[10];
LibGambatte.gambatte_getregs(GambatteState, data);
ret.Add(new KeyValuePair<string, int>("PC", data[(int)LibGambatte.RegIndicies.PC] & 0xffff));
ret.Add(new KeyValuePair<string, int>("SP", data[(int)LibGambatte.RegIndicies.SP] & 0xffff));
ret.Add(new KeyValuePair<string, int>("A", data[(int)LibGambatte.RegIndicies.A] & 0xff));
ret.Add(new KeyValuePair<string, int>("B", data[(int)LibGambatte.RegIndicies.B] & 0xff));
ret.Add(new KeyValuePair<string, int>("C", data[(int)LibGambatte.RegIndicies.C] & 0xff));
ret.Add(new KeyValuePair<string, int>("D", data[(int)LibGambatte.RegIndicies.D] & 0xff));
ret.Add(new KeyValuePair<string, int>("E", data[(int)LibGambatte.RegIndicies.E] & 0xff));
ret.Add(new KeyValuePair<string, int>("F", data[(int)LibGambatte.RegIndicies.F] & 0xff));
ret.Add(new KeyValuePair<string, int>("H", data[(int)LibGambatte.RegIndicies.H] & 0xff));
ret.Add(new KeyValuePair<string, int>("L", data[(int)LibGambatte.RegIndicies.L] & 0xff));
return ret;
return new Dictionary<string, int>
{
{ "PC", data[(int)LibGambatte.RegIndicies.PC] & 0xffff },
{ "SP", data[(int)LibGambatte.RegIndicies.SP] & 0xffff },
{ "A", data[(int)LibGambatte.RegIndicies.A] & 0xff },
{ "B", data[(int)LibGambatte.RegIndicies.B] & 0xff },
{ "C", data[(int)LibGambatte.RegIndicies.C] & 0xff },
{ "D", data[(int)LibGambatte.RegIndicies.D] & 0xff },
{ "E", data[(int)LibGambatte.RegIndicies.E] & 0xff },
{ "F", data[(int)LibGambatte.RegIndicies.F] & 0xff },
{ "H", data[(int)LibGambatte.RegIndicies.H] & 0xff },
{ "L", data[(int)LibGambatte.RegIndicies.L] & 0xff }
};
}
/// <summary>

View File

@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
bool disposed = false;
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
var left = L.GetCpuFlagsAndRegisters()
.Select(reg => new KeyValuePair<string, int>("Left " + reg.Key, reg.Value));
@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
var right = R.GetCpuFlagsAndRegisters()
.Select(reg => new KeyValuePair<string, int>("Right " + reg.Key, reg.Value));
return left.Union(right).ToList();
return left.Union(right).ToList().ToDictionary(pair => pair.Key, pair => pair.Value);
}
Gameboy L;

View File

@ -12,48 +12,48 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
{
public class N64 : IEmulator
{
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
//note: the approach this code takes is highly bug-prone
List<KeyValuePair<string, int>> ret = new List<KeyValuePair<string, int>>();
var ret = new Dictionary<string, int>();
byte[] data = new byte[32 * 8 + 4 + 4 + 8 + 8 + 4 + 4 + 32 * 4 + 32 * 8];
api.getRegisters(data);
for (int i = 0; i < 32; i++)
{
long reg = BitConverter.ToInt64(data, i * 8);
ret.Add(new KeyValuePair<string, int>("REG" + i + "_lo", (int)(reg)));
ret.Add(new KeyValuePair<string, int>("REG" + i + "_hi", (int)(reg>>32)));
ret.Add("REG" + i + "_lo", (int)(reg));
ret.Add("REG" + i + "_hi", (int)(reg>>32));
}
UInt32 PC = BitConverter.ToUInt32(data, 32 * 8);
ret.Add(new KeyValuePair<string, int>("PC", (int)PC));
ret.Add("PC", (int)PC);
ret.Add(new KeyValuePair<string, int>("LL", BitConverter.ToInt32(data, 32 * 8 + 4)));
ret.Add("LL", BitConverter.ToInt32(data, 32 * 8 + 4));
long Lo = BitConverter.ToInt64(data, 32 * 8 + 4 + 4);
ret.Add(new KeyValuePair<string, int>("LO_lo", (int)Lo));
ret.Add(new KeyValuePair<string, int>("LO_hi", (int)(Lo>>32)));
ret.Add("LO_lo", (int)Lo);
ret.Add("LO_hi", (int)(Lo>>32));
long Hi = BitConverter.ToInt64(data, 32 * 8 + 4 + 4 + 8);
ret.Add(new KeyValuePair<string, int>("HI_lo", (int)Hi));
ret.Add(new KeyValuePair<string, int>("HI_hi", (int)(Hi>>32)));
ret.Add("HI_lo", (int)Hi);
ret.Add("HI_hi", (int)(Hi>>32));
ret.Add(new KeyValuePair<string, int>("FCR0", BitConverter.ToInt32(data, 32 * 8 + 4 + 4 + 8 + 8)));
ret.Add(new KeyValuePair<string, int>("FCR31", BitConverter.ToInt32(data, 32 * 8 + 4 + 4 + 8 + 8 + 4)));
ret.Add("FCR0", BitConverter.ToInt32(data, 32 * 8 + 4 + 4 + 8 + 8));
ret.Add("FCR31", BitConverter.ToInt32(data, 32 * 8 + 4 + 4 + 8 + 8 + 4));
for (int i = 0; i < 32; i++)
{
uint reg_cop0 = BitConverter.ToUInt32(data, 32 * 8 + 4 + 4 + 8 + 8 + 4 + 4 + i * 4);
ret.Add(new KeyValuePair<string, int>("CP0 REG" + i, (int)reg_cop0));
ret.Add("CP0 REG" + i, (int)reg_cop0);
}
for (int i = 0; i < 32; i++)
{
long reg_cop1_fgr_64 = BitConverter.ToInt64(data, 32 * 8 + 4 + 4 + 8 + 8 + 4 + 4 + 32 * 4 + i * 8);
ret.Add(new KeyValuePair<string, int>("CP1 FGR REG" + i + "_lo", (int)reg_cop1_fgr_64));
ret.Add(new KeyValuePair<string, int>("CP1 FGR REG" + i + "_hi", (int)(reg_cop1_fgr_64>>32)));
ret.Add("CP1 FGR REG" + i + "_lo", (int)reg_cop1_fgr_64);
ret.Add("CP1 FGR REG" + i + "_hi", (int)(reg_cop1_fgr_64>>32));
}
return ret;

View File

@ -812,24 +812,23 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public bool BinarySaveStatesPreferred { get { return false; } }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<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)
{ "A", cpu.A },
{ "X", cpu.X },
{ "Y", cpu.Y },
{ "S", cpu.S },
{ "PC", cpu.PC },
{ "Flag C", cpu.FlagC ? 1 : 0 },
{ "Flag Z", cpu.FlagZ ? 1 : 0 },
{ "Flag I", cpu.FlagI ? 1 : 0 },
{ "Flag D", cpu.FlagD ? 1 : 0 },
{ "Flag B", cpu.FlagB ? 1 : 0 },
{ "Flag V", cpu.FlagV ? 1 : 0 },
{ "Flag N", cpu.FlagN ? 1 : 0 },
{ "Flag T", cpu.FlagT ? 1 : 0 }
};
}

View File

@ -361,9 +361,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
public MemoryDomainList MemoryDomains { get; private set; }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>();
throw new NotImplementedException();
}
#endregion

View File

@ -78,10 +78,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
api.Dispose();
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
var ret = new List<KeyValuePair<string, int>>();
LibsnesApi.CpuRegs regs;
api.QUERY_peek_cpu_regs(out regs);
@ -94,31 +92,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
bool fz = (regs.p & 0x02)!=0;
bool fc = (regs.p & 0x01)!=0;
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("PC", (int)regs.pc),
new KeyValuePair<string, int>("A", (int)regs.a),
new KeyValuePair<string, int>("X", (int)regs.x),
new KeyValuePair<string, int>("Y", (int)regs.y),
new KeyValuePair<string, int>("Z", (int)regs.z),
new KeyValuePair<string, int>("S", (int)regs.s),
new KeyValuePair<string, int>("D", (int)regs.d),
new KeyValuePair<string, int>("Vector", (int)regs.vector),
new KeyValuePair<string, int>("P", (int)regs.p),
new KeyValuePair<string, int>("AA", (int)regs.aa),
new KeyValuePair<string, int>("RD", (int)regs.rd),
new KeyValuePair<string, int>("SP", (int)regs.sp),
new KeyValuePair<string, int>("DP", (int)regs.dp),
new KeyValuePair<string, int>("DB", (int)regs.db),
new KeyValuePair<string, int>("MDR", (int)regs.mdr),
new KeyValuePair<string, int>("Flag N", fn?1:0),
new KeyValuePair<string, int>("Flag V", fv?1:0),
new KeyValuePair<string, int>("Flag M", fm?1:0),
new KeyValuePair<string, int>("Flag X", fx?1:0),
new KeyValuePair<string, int>("Flag D", fd?1:0),
new KeyValuePair<string, int>("Flag I", fi?1:0),
new KeyValuePair<string, int>("Flag Z", fz?1:0),
new KeyValuePair<string, int>("Flag C", fc?1:0),
{ "PC", (int)regs.pc },
{ "A", (int)regs.a },
{ "X", (int)regs.x },
{ "Y", (int)regs.y },
{ "Z", (int)regs.z },
{ "S", (int)regs.s },
{ "D", (int)regs.d },
{ "Vector", (int)regs.vector },
{ "P", (int)regs.p },
{ "AA", (int)regs.aa },
{ "RD", (int)regs.rd },
{ "SP", (int)regs.sp },
{ "DP", (int)regs.dp },
{ "DB", (int)regs.db },
{ "MDR", (int)regs.mdr },
{ "Flag N", fn?1:0 },
{ "Flag V", fv?1:0 },
{ "Flag M", fm?1:0 },
{ "Flag X", fx?1:0 },
{ "Flag D", fd?1:0 },
{ "Flag I", fi?1:0 },
{ "Flag Z", fz?1:0 },
{ "Flag C", fc?1:0 },
};
}

View File

@ -520,23 +520,23 @@ namespace BizHawk.Emulation.Cores.PCEngine
MemoryDomainList memoryDomains;
public MemoryDomainList MemoryDomains { get { return memoryDomains; } }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<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>("PC", Cpu.PC),
new KeyValuePair<string, int>("S", Cpu.S),
new KeyValuePair<string, int>("MPR-0", Cpu.MPR[0]),
new KeyValuePair<string, int>("MPR-1", Cpu.MPR[1]),
new KeyValuePair<string, int>("MPR-2", Cpu.MPR[2]),
new KeyValuePair<string, int>("MPR-3", Cpu.MPR[3]),
new KeyValuePair<string, int>("MPR-4", Cpu.MPR[4]),
new KeyValuePair<string, int>("MPR-5", Cpu.MPR[5]),
new KeyValuePair<string, int>("MPR-6", Cpu.MPR[6]),
new KeyValuePair<string, int>("MPR-7", Cpu.MPR[7]),
{ "A", Cpu.A },
{ "X", Cpu.X },
{ "Y", Cpu.Y },
{ "PC", Cpu.PC },
{ "S", Cpu.S },
{ "MPR-0", Cpu.MPR[0] },
{ "MPR-1", Cpu.MPR[1] },
{ "MPR-2", Cpu.MPR[2] },
{ "MPR-3", Cpu.MPR[3] },
{ "MPR-4", Cpu.MPR[4] },
{ "MPR-5", Cpu.MPR[5] },
{ "MPR-6", Cpu.MPR[6] },
{ "MPR-7", Cpu.MPR[7] }
};
}

View File

@ -241,35 +241,35 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis
#endif
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("A-0", MainCPU.A[0].s32),
new KeyValuePair<string, int>("A-1", MainCPU.A[1].s32),
new KeyValuePair<string, int>("A-2", MainCPU.A[2].s32),
new KeyValuePair<string, int>("A-3", MainCPU.A[3].s32),
new KeyValuePair<string, int>("A-4", MainCPU.A[4].s32),
new KeyValuePair<string, int>("A-5", MainCPU.A[5].s32),
new KeyValuePair<string, int>("A-6", MainCPU.A[6].s32),
new KeyValuePair<string, int>("A-7", MainCPU.A[7].s32),
{ "A-0", MainCPU.A[0].s32 },
{ "A-1", MainCPU.A[1].s32 },
{ "A-2", MainCPU.A[2].s32 },
{ "A-3", MainCPU.A[3].s32 },
{ "A-4", MainCPU.A[4].s32 },
{ "A-5", MainCPU.A[5].s32 },
{ "A-6", MainCPU.A[6].s32 },
{ "A-7", MainCPU.A[7].s32 },
new KeyValuePair<string, int>("D-0", MainCPU.D[0].s32),
new KeyValuePair<string, int>("D-1", MainCPU.D[1].s32),
new KeyValuePair<string, int>("D-2", MainCPU.D[2].s32),
new KeyValuePair<string, int>("D-3", MainCPU.D[3].s32),
new KeyValuePair<string, int>("D-4", MainCPU.D[4].s32),
new KeyValuePair<string, int>("D-5", MainCPU.D[5].s32),
new KeyValuePair<string, int>("D-6", MainCPU.D[6].s32),
new KeyValuePair<string, int>("D-7", MainCPU.D[7].s32),
{ "D-0", MainCPU.D[0].s32 },
{ "D-1", MainCPU.D[1].s32 },
{ "D-2", MainCPU.D[2].s32 },
{ "D-3", MainCPU.D[3].s32 },
{ "D-4", MainCPU.D[4].s32 },
{ "D-5", MainCPU.D[5].s32 },
{ "D-6", MainCPU.D[6].s32 },
{ "D-7", MainCPU.D[7].s32 },
new KeyValuePair<string, int>("SR", MainCPU.SR),
{ "SR", MainCPU.SR },
new KeyValuePair<string, int>("Flag X", MainCPU.X ? 1 : 0),
new KeyValuePair<string, int>("Flag N", MainCPU.N ? 1 : 0),
new KeyValuePair<string, int>("Flag Z", MainCPU.Z ? 1 : 0),
new KeyValuePair<string, int>("Flag V", MainCPU.V ? 1 : 0),
new KeyValuePair<string, int>("Flag C", MainCPU.C ? 1 : 0)
{ "Flag X", MainCPU.X ? 1 : 0 },
{ "Flag N", MainCPU.N ? 1 : 0 },
{ "Flag Z", MainCPU.Z ? 1 : 0 },
{ "Flag V", MainCPU.V ? 1 : 0 },
{ "Flag C", MainCPU.C ? 1 : 0 }
};
}

View File

@ -467,40 +467,40 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
public MemoryDomainList MemoryDomains { get { return memoryDomains; } }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>
return new Dictionary<string, int>
{
new KeyValuePair<string, int>("A", Cpu.RegisterA),
new KeyValuePair<string, int>("AF", Cpu.RegisterAF),
new KeyValuePair<string, int>("B", Cpu.RegisterB),
new KeyValuePair<string, int>("BC", Cpu.RegisterBC),
new KeyValuePair<string, int>("C", Cpu.RegisterC),
new KeyValuePair<string, int>("D", Cpu.RegisterD),
new KeyValuePair<string, int>("DE", Cpu.RegisterDE),
new KeyValuePair<string, int>("E", Cpu.RegisterE),
new KeyValuePair<string, int>("F", Cpu.RegisterF),
new KeyValuePair<string, int>("H", Cpu.RegisterH),
new KeyValuePair<string, int>("HL", Cpu.RegisterHL),
new KeyValuePair<string, int>("I", Cpu.RegisterI),
new KeyValuePair<string, int>("IX", Cpu.RegisterIX),
new KeyValuePair<string, int>("IY", Cpu.RegisterIY),
new KeyValuePair<string, int>("L", Cpu.RegisterL),
new KeyValuePair<string, int>("PC", Cpu.RegisterPC),
new KeyValuePair<string, int>("R", Cpu.RegisterR),
new KeyValuePair<string, int>("Shadow AF", Cpu.RegisterShadowAF),
new KeyValuePair<string, int>("Shadow BC", Cpu.RegisterShadowBC),
new KeyValuePair<string, int>("Shadow DE", Cpu.RegisterShadowDE),
new KeyValuePair<string, int>("Shadow HL", Cpu.RegisterShadowHL),
new KeyValuePair<string, int>("SP", Cpu.RegisterSP),
new KeyValuePair<string, int>("Flag C", Cpu.RegisterF.Bit(0) ? 1 : 0),
new KeyValuePair<string, int>("Flag N", Cpu.RegisterF.Bit(1) ? 1 : 0),
new KeyValuePair<string, int>("Flag P/V", Cpu.RegisterF.Bit(2) ? 1 : 0),
new KeyValuePair<string, int>("Flag 3rd", Cpu.RegisterF.Bit(3) ? 1 : 0),
new KeyValuePair<string, int>("Flag H", Cpu.RegisterF.Bit(4) ? 1 : 0),
new KeyValuePair<string, int>("Flag 5th", Cpu.RegisterF.Bit(5) ? 1 : 0),
new KeyValuePair<string, int>("Flag Z", Cpu.RegisterF.Bit(6) ? 1 : 0),
new KeyValuePair<string, int>("Flag S", Cpu.RegisterF.Bit(7) ? 1 : 0),
{ "A", Cpu.RegisterA },
{ "AF", Cpu.RegisterAF },
{ "B", Cpu.RegisterB },
{ "BC", Cpu.RegisterBC },
{ "C", Cpu.RegisterC },
{ "D", Cpu.RegisterD },
{ "DE", Cpu.RegisterDE },
{ "E", Cpu.RegisterE },
{ "F", Cpu.RegisterF },
{ "H", Cpu.RegisterH },
{ "HL", Cpu.RegisterHL },
{ "I", Cpu.RegisterI },
{ "IX", Cpu.RegisterIX },
{ "IY", Cpu.RegisterIY },
{ "L", Cpu.RegisterL },
{ "PC", Cpu.RegisterPC },
{ "R", Cpu.RegisterR },
{ "Shadow AF", Cpu.RegisterShadowAF },
{ "Shadow BC", Cpu.RegisterShadowBC },
{ "Shadow DE", Cpu.RegisterShadowDE },
{ "Shadow HL", Cpu.RegisterShadowHL },
{ "SP", Cpu.RegisterSP },
{ "Flag C", Cpu.RegisterF.Bit(0) ? 1 : 0 },
{ "Flag N", Cpu.RegisterF.Bit(1) ? 1 : 0 },
{ "Flag P/V", Cpu.RegisterF.Bit(2) ? 1 : 0 },
{ "Flag 3rd", Cpu.RegisterF.Bit(3) ? 1 : 0 },
{ "Flag H", Cpu.RegisterF.Bit(4) ? 1 : 0 },
{ "Flag 5th", Cpu.RegisterF.Bit(5) ? 1 : 0 },
{ "Flag Z", Cpu.RegisterF.Bit(6) ? 1 : 0 },
{ "Flag S", Cpu.RegisterF.Bit(7) ? 1 : 0 },
};
}

View File

@ -109,7 +109,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
public IController Controller { get; set; }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
throw new NotImplementedException();
}

View File

@ -574,9 +574,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>();
throw new NotImplementedException();
}
public void UpdateVDPViewContext(LibGPGX.VDPView view)

View File

@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP
}
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
throw new NotImplementedException();
}

View File

@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
public bool StartAsyncSound() { return true; }
public void EndAsyncSound() { }
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
throw new NotImplementedException();
}

View File

@ -371,16 +371,13 @@ namespace BizHawk.Emulation.Cores
void SetupDebuggingStuff()
{
MemoryDomains = MemoryDomainList.GetDummyList();
_cpufake = new List<KeyValuePair<string, int>>();
}
public MemoryDomainList MemoryDomains { get; private set; }
List<KeyValuePair<string, int>> _cpufake;
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
public Dictionary<string, int> GetCpuFlagsAndRegisters()
{
return _cpufake;
throw new NotImplementedException();
}
#endregion