diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
index e2fa3e6d45..512cfd0344 100644
--- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
+++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
@@ -535,6 +535,12 @@
Cheats.cs
+
+ UserControl
+
+
+ RegisterBox.cs
+
Form
@@ -1088,6 +1094,9 @@
Cheats.cs
+
+ RegisterBox.cs
+
GBAGPUView.cs
diff --git a/BizHawk.Client.EmuHawk/tools/Atari2600/Atari2600Debugger.cs b/BizHawk.Client.EmuHawk/tools/Atari2600/Atari2600Debugger.cs
index bb8292e4c1..931cdcb670 100644
--- a/BizHawk.Client.EmuHawk/tools/Atari2600/Atari2600Debugger.cs
+++ b/BizHawk.Client.EmuHawk/tools/Atari2600/Atari2600Debugger.cs
@@ -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();
}
diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.Designer.cs b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.Designer.cs
new file mode 100644
index 0000000000..3fcfab90e1
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.Designer.cs
@@ -0,0 +1,46 @@
+namespace BizHawk.Client.EmuHawk
+{
+ partial class RegisterBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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
+ }
+}
diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.cs b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.cs
new file mode 100644
index 0000000000..037b168545
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.cs
@@ -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
+{
+ ///
+ /// This control shows Cpu Flags and Registers from the currently running emulator core
+ ///
+ public partial class RegisterBox : UserControl
+ {
+ public RegisterBox()
+ {
+ InitializeComponent();
+ }
+
+ private void RegisterBox_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.resx b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.resx
new file mode 100644
index 0000000000..29dcb1b3a3
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBox.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs b/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs
index e8c99b5da9..ea76de20e8 100644
--- a/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs
+++ b/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs
@@ -81,9 +81,9 @@ namespace BizHawk.Emulation.Common
public MemoryDomainList MemoryDomains { get { return memoryDomains; } }
public void Dispose() { }
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>();
+ return new Dictionary();
}
bool xmas;
diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs
index 47904b2d29..7ca2caca1b 100644
--- a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs
+++ b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs
@@ -143,7 +143,7 @@ namespace BizHawk.Emulation.Common
/// Returns a list of Cpu registers and their current state
///
///
- List> GetCpuFlagsAndRegisters();
+ Dictionary GetCpuFlagsAndRegisters();
// ====settings interface====
diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.cs b/BizHawk.Emulation.Cores/Calculator/TI83.cs
index 40dd73b376..231d1cb68d 100644
--- a/BizHawk.Emulation.Cores/Calculator/TI83.cs
+++ b/BizHawk.Emulation.Cores/Calculator/TI83.cs
@@ -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> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", cpu.RegisterA),
- new KeyValuePair("AF", cpu.RegisterAF),
- new KeyValuePair("B", cpu.RegisterB),
- new KeyValuePair("BC", cpu.RegisterBC),
- new KeyValuePair("C", cpu.RegisterC),
- new KeyValuePair("D", cpu.RegisterD),
- new KeyValuePair("DE", cpu.RegisterDE),
- new KeyValuePair("E", cpu.RegisterE),
- new KeyValuePair("F", cpu.RegisterF),
- new KeyValuePair("H", cpu.RegisterH),
- new KeyValuePair("HL", cpu.RegisterHL),
- new KeyValuePair("I", cpu.RegisterI),
- new KeyValuePair("IX", cpu.RegisterIX),
- new KeyValuePair("IY", cpu.RegisterIY),
- new KeyValuePair("L", cpu.RegisterL),
- new KeyValuePair("PC", cpu.RegisterPC),
- new KeyValuePair("R", cpu.RegisterR),
- new KeyValuePair("Shadow AF", cpu.RegisterShadowAF),
- new KeyValuePair("Shadow BC", cpu.RegisterShadowBC),
- new KeyValuePair("Shadow DE", cpu.RegisterShadowDE),
- new KeyValuePair("Shadow HL", cpu.RegisterShadowHL),
- new KeyValuePair("SP", cpu.RegisterSP),
- new KeyValuePair("Flag C", cpu.RegisterF.Bit(0) ? 1 : 0),
- new KeyValuePair("Flag N", cpu.RegisterF.Bit(1) ? 1 : 0),
- new KeyValuePair("Flag P/V", cpu.RegisterF.Bit(2) ? 1 : 0),
- new KeyValuePair("Flag 3rd", cpu.RegisterF.Bit(3) ? 1 : 0),
- new KeyValuePair("Flag H", cpu.RegisterF.Bit(4) ? 1 : 0),
- new KeyValuePair("Flag 5th", cpu.RegisterF.Bit(5) ? 1 : 0),
- new KeyValuePair("Flag Z", cpu.RegisterF.Bit(6) ? 1 : 0),
- new KeyValuePair("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 }
};
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs
index 00279d62fd..fee8252eab 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs
@@ -84,24 +84,23 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
//disk.HardReset();
}
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", board.cpu.A),
- new KeyValuePair("X", board.cpu.X),
- new KeyValuePair("Y", board.cpu.Y),
- new KeyValuePair("S", board.cpu.S),
- new KeyValuePair("PC", board.cpu.PC),
- new KeyValuePair("Flag C", board.cpu.FlagC ? 1 : 0),
- new KeyValuePair("Flag Z", board.cpu.FlagZ ? 1 : 0),
- new KeyValuePair("Flag I", board.cpu.FlagI ? 1 : 0),
- new KeyValuePair("Flag D", board.cpu.FlagD ? 1 : 0),
- new KeyValuePair("Flag B", board.cpu.FlagB ? 1 : 0),
- new KeyValuePair("Flag V", board.cpu.FlagV ? 1 : 0),
- new KeyValuePair("Flag N", board.cpu.FlagN ? 1 : 0),
- new KeyValuePair("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 }
};
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs
index 403117b124..a80d437d67 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs
@@ -144,28 +144,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
};
}
- public List> GetCpuFlagsAndRegisters()
- {
- return new List>
- {
- new KeyValuePair("A", Cpu.A),
- new KeyValuePair("X", Cpu.X),
- new KeyValuePair("Y", Cpu.Y),
- new KeyValuePair("S", Cpu.S),
- new KeyValuePair("PC", Cpu.PC),
- new KeyValuePair("Flag C", Cpu.FlagC ? 1 : 0),
- new KeyValuePair("Flag Z", Cpu.FlagZ ? 1 : 0),
- new KeyValuePair("Flag I", Cpu.FlagI ? 1 : 0),
- new KeyValuePair("Flag D", Cpu.FlagD ? 1 : 0),
- new KeyValuePair("Flag B", Cpu.FlagB ? 1 : 0),
- new KeyValuePair("Flag V", Cpu.FlagV ? 1 : 0),
- new KeyValuePair("Flag N", Cpu.FlagN ? 1 : 0),
- new KeyValuePair("Flag T", Cpu.FlagT ? 1 : 0)
- };
- }
-
// TODO: rewrite GetCpuFlagsAndRegisters this way
- public Dictionary GetCpuFlagsAndRegisters2()
+ public Dictionary GetCpuFlagsAndRegisters()
{
return new Dictionary
{
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs
index cc44ed989b..508290c0e9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/mAR.cs
@@ -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);
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs
index c7ca4abe69..7bf67503a4 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs
@@ -16,23 +16,23 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
EMU7800.Win.GameProgram GameInfo;
public byte[] hsram = new byte[2048];
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", theMachine.CPU.A),
- new KeyValuePair("P", theMachine.CPU.P),
- new KeyValuePair("PC", theMachine.CPU.PC),
- new KeyValuePair("S", theMachine.CPU.S),
- new KeyValuePair("X", theMachine.CPU.X),
- new KeyValuePair("Y", theMachine.CPU.Y),
- new KeyValuePair("B", theMachine.CPU.fB ? 1 : 0),
- new KeyValuePair("C", theMachine.CPU.fC ? 1 : 0),
- new KeyValuePair("D", theMachine.CPU.fD ? 1 : 0),
- new KeyValuePair("I", theMachine.CPU.fI ? 1 : 0),
- new KeyValuePair("N", theMachine.CPU.fN ? 1 : 0),
- new KeyValuePair("V", theMachine.CPU.fV ? 1 : 0),
- new KeyValuePair("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 }
};
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs
index 4ae3ed0072..c3b7ec65cf 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs
@@ -251,40 +251,40 @@ namespace BizHawk.Emulation.Cores.ColecoVision
}
}
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", Cpu.RegisterA),
- new KeyValuePair("AF", Cpu.RegisterAF),
- new KeyValuePair("B", Cpu.RegisterB),
- new KeyValuePair("BC", Cpu.RegisterBC),
- new KeyValuePair("C", Cpu.RegisterC),
- new KeyValuePair("D", Cpu.RegisterD),
- new KeyValuePair("DE", Cpu.RegisterDE),
- new KeyValuePair("E", Cpu.RegisterE),
- new KeyValuePair("F", Cpu.RegisterF),
- new KeyValuePair("H", Cpu.RegisterH),
- new KeyValuePair("HL", Cpu.RegisterHL),
- new KeyValuePair("I", Cpu.RegisterI),
- new KeyValuePair("IX", Cpu.RegisterIX),
- new KeyValuePair("IY", Cpu.RegisterIY),
- new KeyValuePair("L", Cpu.RegisterL),
- new KeyValuePair("PC", Cpu.RegisterPC),
- new KeyValuePair("R", Cpu.RegisterR),
- new KeyValuePair("Shadow AF", Cpu.RegisterShadowAF),
- new KeyValuePair("Shadow BC", Cpu.RegisterShadowBC),
- new KeyValuePair("Shadow DE", Cpu.RegisterShadowDE),
- new KeyValuePair("Shadow HL", Cpu.RegisterShadowHL),
- new KeyValuePair("SP", Cpu.RegisterSP),
- new KeyValuePair("Flag C", Cpu.RegisterF.Bit(0) ? 1 : 0),
- new KeyValuePair("Flag N", Cpu.RegisterF.Bit(1) ? 1 : 0),
- new KeyValuePair("Flag P/V", Cpu.RegisterF.Bit(2) ? 1 : 0),
- new KeyValuePair("Flag 3rd", Cpu.RegisterF.Bit(3) ? 1 : 0),
- new KeyValuePair("Flag H", Cpu.RegisterF.Bit(4) ? 1 : 0),
- new KeyValuePair("Flag 5th", Cpu.RegisterF.Bit(5) ? 1 : 0),
- new KeyValuePair("Flag Z", Cpu.RegisterF.Bit(6) ? 1 : 0),
- new KeyValuePair("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 }
};
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs
index 47294fcc8f..ee156eae89 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs
@@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
STIC Stic;
PSG Psg;
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
throw new NotImplementedException();
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs
index ecaff46e30..b58a5926cc 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs
@@ -10,13 +10,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
{
public class GBA : IEmulator, IVideoProvider, ISyncSoundProvider
{
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- var ret = new List>();
+ var ret = new Dictionary();
int[] data = new int[LibMeteor.regnames.Length];
LibMeteor.libmeteor_getregs(data);
for (int i = 0; i < data.Length; i++)
- ret.Add(new KeyValuePair(LibMeteor.regnames[i], data[i]));
+ ret.Add(LibMeteor.regnames[i], data[i]);
return ret;
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
index fc59de3fe8..d445446aa6 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
@@ -131,22 +131,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
return CurrentButtons;
}
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- List> ret = new List>();
int[] data = new int[10];
LibGambatte.gambatte_getregs(GambatteState, data);
- ret.Add(new KeyValuePair("PC", data[(int)LibGambatte.RegIndicies.PC] & 0xffff));
- ret.Add(new KeyValuePair("SP", data[(int)LibGambatte.RegIndicies.SP] & 0xffff));
- ret.Add(new KeyValuePair("A", data[(int)LibGambatte.RegIndicies.A] & 0xff));
- ret.Add(new KeyValuePair("B", data[(int)LibGambatte.RegIndicies.B] & 0xff));
- ret.Add(new KeyValuePair("C", data[(int)LibGambatte.RegIndicies.C] & 0xff));
- ret.Add(new KeyValuePair("D", data[(int)LibGambatte.RegIndicies.D] & 0xff));
- ret.Add(new KeyValuePair("E", data[(int)LibGambatte.RegIndicies.E] & 0xff));
- ret.Add(new KeyValuePair("F", data[(int)LibGambatte.RegIndicies.F] & 0xff));
- ret.Add(new KeyValuePair("H", data[(int)LibGambatte.RegIndicies.H] & 0xff));
- ret.Add(new KeyValuePair("L", data[(int)LibGambatte.RegIndicies.L] & 0xff));
- return ret;
+
+ return new Dictionary
+ {
+ { "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 }
+ };
}
///
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
index af052f70ab..ad51cc0b06 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
@@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
bool disposed = false;
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
var left = L.GetCpuFlagsAndRegisters()
.Select(reg => new KeyValuePair("Left " + reg.Key, reg.Value));
@@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
var right = R.GetCpuFlagsAndRegisters()
.Select(reg => new KeyValuePair("Right " + reg.Key, reg.Value));
- return left.Union(right).ToList();
+ return left.Union(right).ToList().ToDictionary(pair => pair.Key, pair => pair.Value);
}
Gameboy L;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs
index 29e8e23f05..ecd45faa42 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs
@@ -12,48 +12,48 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
{
public class N64 : IEmulator
{
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
//note: the approach this code takes is highly bug-prone
- List> ret = new List>();
+ var ret = new Dictionary();
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("REG" + i + "_lo", (int)(reg)));
- ret.Add(new KeyValuePair("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("PC", (int)PC));
+ ret.Add("PC", (int)PC);
- ret.Add(new KeyValuePair("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("LO_lo", (int)Lo));
- ret.Add(new KeyValuePair("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("HI_lo", (int)Hi));
- ret.Add(new KeyValuePair("HI_hi", (int)(Hi>>32)));
+ ret.Add("HI_lo", (int)Hi);
+ ret.Add("HI_hi", (int)(Hi>>32));
- ret.Add(new KeyValuePair("FCR0", BitConverter.ToInt32(data, 32 * 8 + 4 + 4 + 8 + 8)));
- ret.Add(new KeyValuePair("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("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("CP1 FGR REG" + i + "_lo", (int)reg_cop1_fgr_64));
- ret.Add(new KeyValuePair("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;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs
index 6afefe20da..041afffd9c 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs
@@ -812,24 +812,23 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public bool BinarySaveStatesPreferred { get { return false; } }
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", cpu.A),
- new KeyValuePair("X", cpu.X),
- new KeyValuePair("Y", cpu.Y),
- new KeyValuePair("S", cpu.S),
- new KeyValuePair("PC", cpu.PC),
- new KeyValuePair("Flag C", cpu.FlagC ? 1 : 0),
- new KeyValuePair("Flag Z", cpu.FlagZ ? 1 : 0),
- new KeyValuePair("Flag I", cpu.FlagI ? 1 : 0),
- new KeyValuePair("Flag D", cpu.FlagD ? 1 : 0),
- new KeyValuePair("Flag B", cpu.FlagB ? 1 : 0),
- new KeyValuePair("Flag V", cpu.FlagV ? 1 : 0),
- new KeyValuePair("Flag N", cpu.FlagN ? 1 : 0),
- new KeyValuePair("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 }
};
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
index a8eb3de11a..ca29262a2d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs
@@ -361,9 +361,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
public MemoryDomainList MemoryDomains { get; private set; }
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>();
+ throw new NotImplementedException();
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs
index b8c2b80837..29c91eee66 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs
@@ -78,10 +78,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
api.Dispose();
}
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- var ret = new List>();
-
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>
+ return new Dictionary
{
- new KeyValuePair("PC", (int)regs.pc),
- new KeyValuePair("A", (int)regs.a),
- new KeyValuePair("X", (int)regs.x),
- new KeyValuePair("Y", (int)regs.y),
- new KeyValuePair("Z", (int)regs.z),
- new KeyValuePair("S", (int)regs.s),
- new KeyValuePair("D", (int)regs.d),
- new KeyValuePair("Vector", (int)regs.vector),
- new KeyValuePair("P", (int)regs.p),
- new KeyValuePair("AA", (int)regs.aa),
- new KeyValuePair("RD", (int)regs.rd),
- new KeyValuePair("SP", (int)regs.sp),
- new KeyValuePair("DP", (int)regs.dp),
- new KeyValuePair("DB", (int)regs.db),
- new KeyValuePair("MDR", (int)regs.mdr),
- new KeyValuePair("Flag N", fn?1:0),
- new KeyValuePair("Flag V", fv?1:0),
- new KeyValuePair("Flag M", fm?1:0),
- new KeyValuePair("Flag X", fx?1:0),
- new KeyValuePair("Flag D", fd?1:0),
- new KeyValuePair("Flag I", fi?1:0),
- new KeyValuePair("Flag Z", fz?1:0),
- new KeyValuePair("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 },
};
}
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
index c30fd317bb..a66aee7152 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
@@ -520,23 +520,23 @@ namespace BizHawk.Emulation.Cores.PCEngine
MemoryDomainList memoryDomains;
public MemoryDomainList MemoryDomains { get { return memoryDomains; } }
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A", Cpu.A),
- new KeyValuePair("X", Cpu.X),
- new KeyValuePair("Y", Cpu.Y),
- new KeyValuePair("PC", Cpu.PC),
- new KeyValuePair("S", Cpu.S),
- new KeyValuePair("MPR-0", Cpu.MPR[0]),
- new KeyValuePair("MPR-1", Cpu.MPR[1]),
- new KeyValuePair("MPR-2", Cpu.MPR[2]),
- new KeyValuePair("MPR-3", Cpu.MPR[3]),
- new KeyValuePair("MPR-4", Cpu.MPR[4]),
- new KeyValuePair("MPR-5", Cpu.MPR[5]),
- new KeyValuePair("MPR-6", Cpu.MPR[6]),
- new KeyValuePair("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] }
};
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs
index 47995f1fb6..6e9aa2ab70 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs
@@ -241,35 +241,35 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis
#endif
}
- public List> GetCpuFlagsAndRegisters()
+ public Dictionary GetCpuFlagsAndRegisters()
{
- return new List>
+ return new Dictionary
{
- new KeyValuePair("A-0", MainCPU.A[0].s32),
- new KeyValuePair("A-1", MainCPU.A[1].s32),
- new KeyValuePair("A-2", MainCPU.A[2].s32),
- new KeyValuePair("A-3", MainCPU.A[3].s32),
- new KeyValuePair("A-4", MainCPU.A[4].s32),
- new KeyValuePair("A-5", MainCPU.A[5].s32),
- new KeyValuePair("A-6", MainCPU.A[6].s32),
- new KeyValuePair("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("D-0", MainCPU.D[0].s32),
- new KeyValuePair("D-1", MainCPU.D[1].s32),
- new KeyValuePair("D-2", MainCPU.D[2].s32),
- new KeyValuePair("D-3", MainCPU.D[3].s32),
- new KeyValuePair("D-4", MainCPU.D[4].s32),
- new KeyValuePair("D-5", MainCPU.D[5].s32),
- new KeyValuePair