diff --git a/GUI.NET/Config/DebugInfo.cs b/GUI.NET/Config/DebugInfo.cs
index 35d77841..82be57be 100644
--- a/GUI.NET/Config/DebugInfo.cs
+++ b/GUI.NET/Config/DebugInfo.cs
@@ -136,6 +136,14 @@ namespace Mesen.GUI.Config
public bool RamHighlightChrReadBytes = false;
public bool RamHighlightCodeBytes = false;
public bool RamHighlightDataBytes = false;
+ public XmlColor RamReadColor = Color.Blue;
+ public XmlColor RamWriteColor = Color.Red;
+ public XmlColor RamExecColor = Color.Green;
+ public XmlColor RamCodeByteColor = Color.DarkSeaGreen;
+ public XmlColor RamDataByteColor = Color.LightSteelBlue;
+ public XmlColor RamChrDrawnByteColor = Color.DarkSeaGreen;
+ public XmlColor RamChrReadByteColor = Color.LightSteelBlue;
+
public Size MemoryViewerSize = new Size(0, 0);
public int WindowWidth = -1;
diff --git a/GUI.NET/Debugger/ByteColorProvider.cs b/GUI.NET/Debugger/ByteColorProvider.cs
index 2cb7f5a3..fb3ff104 100644
--- a/GUI.NET/Debugger/ByteColorProvider.cs
+++ b/GUI.NET/Debugger/ByteColorProvider.cs
@@ -1,6 +1,7 @@
using System;
using System.Drawing;
using Be.Windows.Forms;
+using Mesen.GUI.Config;
namespace Mesen.GUI.Debugger
{
@@ -108,21 +109,21 @@ namespace Mesen.GUI.Debugger
if(_cdlData != null) {
if((_cdlData[index] & 0x01) != 0 && _highlightCodeBytes) {
//Code
- bgColor = Color.DarkSeaGreen;
+ bgColor = ConfigManager.Config.DebugInfo.RamCodeByteColor;
} else if((_cdlData[index] & 0x02) != 0 && _highlightDataBytes) {
//Data
- bgColor = Color.LightSteelBlue;
+ bgColor = ConfigManager.Config.DebugInfo.RamDataByteColor;
}
}
if(_freezeState != null && _freezeState[index]) {
return Color.Magenta;
} else if(_showExec && _execStamps[index] != 0 && framesSinceExec >= 0 && (framesSinceExec < _framesToFade || _framesToFade == 0)) {
- return Color.FromArgb(alpha, DarkerColor(Color.Green, (_framesToFade - framesSinceExec) / _framesToFade));
+ return Color.FromArgb(alpha, DarkerColor(ConfigManager.Config.DebugInfo.RamExecColor, (_framesToFade - framesSinceExec) / _framesToFade));
} else if(_showWrite && _writeStamps[index] != 0 && framesSinceWrite >= 0 && (framesSinceWrite < _framesToFade || _framesToFade == 0)) {
- return Color.FromArgb(alpha, DarkerColor(Color.Red, (_framesToFade - framesSinceWrite) / _framesToFade));
+ return Color.FromArgb(alpha, DarkerColor(ConfigManager.Config.DebugInfo.RamWriteColor, (_framesToFade - framesSinceWrite) / _framesToFade));
} else if(_showRead && _readStamps[index] != 0 && framesSinceRead >= 0 && (framesSinceRead < _framesToFade || _framesToFade == 0)) {
- return Color.FromArgb(alpha, DarkerColor(Color.Blue, (_framesToFade - framesSinceRead) / _framesToFade));
+ return Color.FromArgb(alpha, DarkerColor(ConfigManager.Config.DebugInfo.RamReadColor, (_framesToFade - framesSinceRead) / _framesToFade));
}
return Color.FromArgb(alpha, Color.Black);
diff --git a/GUI.NET/Debugger/ChrByteColorProvider.cs b/GUI.NET/Debugger/ChrByteColorProvider.cs
index f5ff6eb3..077963c8 100644
--- a/GUI.NET/Debugger/ChrByteColorProvider.cs
+++ b/GUI.NET/Debugger/ChrByteColorProvider.cs
@@ -1,6 +1,7 @@
using System;
using System.Drawing;
using Be.Windows.Forms;
+using Mesen.GUI.Config;
namespace Mesen.GUI.Debugger
{
@@ -35,10 +36,10 @@ namespace Mesen.GUI.Debugger
if(_cdlData != null) {
if((_cdlData[index] & 0x01) != 0 && _highlightDrawnBytes) {
//Drawn (CHR ROM)
- bgColor = Color.DarkSeaGreen;
+ bgColor = ConfigManager.Config.DebugInfo.RamChrDrawnByteColor;
} else if((_cdlData[index] & 0x02) != 0 && _highlightReadBytes) {
//Read (CHR ROM)
- bgColor = Color.LightSteelBlue;
+ bgColor = ConfigManager.Config.DebugInfo.RamChrReadByteColor;
}
}
diff --git a/GUI.NET/Debugger/frmAssembler.cs b/GUI.NET/Debugger/frmAssembler.cs
index 606b92b7..9bcbf57d 100644
--- a/GUI.NET/Debugger/frmAssembler.cs
+++ b/GUI.NET/Debugger/frmAssembler.cs
@@ -355,7 +355,7 @@ namespace Mesen.GUI.Debugger
private void mnuConfigureColors_Click(object sender, EventArgs e)
{
using(frmAssemblerColors frm = new frmAssemblerColors()) {
- if(frm.ShowDialog() == DialogResult.OK) {
+ if(frm.ShowDialog(this, this) == DialogResult.OK) {
UpdateCodeHighlighting();
}
}
diff --git a/GUI.NET/Debugger/frmAssemblerColors.Designer.cs b/GUI.NET/Debugger/frmAssemblerColors.Designer.cs
index 97687206..a9c34f5d 100644
--- a/GUI.NET/Debugger/frmAssemblerColors.Designer.cs
+++ b/GUI.NET/Debugger/frmAssemblerColors.Designer.cs
@@ -38,6 +38,8 @@
this.lblAddress = new System.Windows.Forms.Label();
this.lblComment = new System.Windows.Forms.Label();
this.picOpcode = new System.Windows.Forms.PictureBox();
+ this.btnReset = new System.Windows.Forms.Button();
+ this.baseConfigPanel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picComment)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picAddress)).BeginInit();
@@ -48,8 +50,10 @@
//
// baseConfigPanel
//
+ this.baseConfigPanel.Controls.Add(this.btnReset);
this.baseConfigPanel.Location = new System.Drawing.Point(0, 210);
- this.baseConfigPanel.Size = new System.Drawing.Size(238, 29);
+ this.baseConfigPanel.Size = new System.Drawing.Size(310, 29);
+ this.baseConfigPanel.Controls.SetChildIndex(this.btnReset, 0);
//
// tableLayoutPanel1
//
@@ -76,7 +80,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(238, 210);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(310, 210);
this.tableLayoutPanel1.TabIndex = 2;
//
// picComment
@@ -184,16 +188,28 @@
this.picOpcode.TabStop = false;
this.picOpcode.Click += new System.EventHandler(this.picColorPicker_Click);
//
+ // btnReset
+ //
+ this.btnReset.Location = new System.Drawing.Point(3, 3);
+ this.btnReset.Name = "btnReset";
+ this.btnReset.Size = new System.Drawing.Size(102, 23);
+ this.btnReset.TabIndex = 4;
+ this.btnReset.Text = "Use default colors";
+ this.btnReset.UseVisualStyleBackColor = true;
+ this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
+ //
// frmAssemblerColors
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(238, 239);
+ this.ClientSize = new System.Drawing.Size(310, 239);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "frmAssemblerColors";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Configure Colors...";
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
this.Controls.SetChildIndex(this.tableLayoutPanel1, 0);
+ this.baseConfigPanel.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picComment)).EndInit();
@@ -218,5 +234,6 @@
private System.Windows.Forms.PictureBox picImmediate;
private System.Windows.Forms.PictureBox picLabelDefinition;
private System.Windows.Forms.PictureBox picOpcode;
+ private System.Windows.Forms.Button btnReset;
}
}
\ No newline at end of file
diff --git a/GUI.NET/Debugger/frmAssemblerColors.cs b/GUI.NET/Debugger/frmAssemblerColors.cs
index 9dedab85..540e4fa4 100644
--- a/GUI.NET/Debugger/frmAssemblerColors.cs
+++ b/GUI.NET/Debugger/frmAssemblerColors.cs
@@ -50,5 +50,14 @@ namespace Mesen.GUI.Debugger
ConfigManager.ApplyChanges();
}
}
+
+ private void btnReset_Click(object sender, EventArgs e)
+ {
+ picOpcode.BackColor = Color.DarkSlateGray;
+ picLabelDefinition.BackColor = Color.Blue;
+ picImmediate.BackColor = Color.Chocolate;
+ picAddress.BackColor = Color.DarkRed;
+ picComment.BackColor = Color.Green;
+ }
}
}
diff --git a/GUI.NET/Debugger/frmMemoryViewer.Designer.cs b/GUI.NET/Debugger/frmMemoryViewer.Designer.cs
index c5583c92..5c3dce16 100644
--- a/GUI.NET/Debugger/frmMemoryViewer.Designer.cs
+++ b/GUI.NET/Debugger/frmMemoryViewer.Designer.cs
@@ -58,6 +58,12 @@
this.mnuFadeNever = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator();
this.mnuCustomFadeSpeed = new System.Windows.Forms.ToolStripMenuItem();
+ this.dataTypeHighlightingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnuHighlightCodeBytes = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnuHighlightDataBytes = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
+ this.mnuHighlightChrDrawnBytes = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnuHighlightChrReadBytes = new System.Windows.Forms.ToolStripMenuItem();
this.fadeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mnuHideUnusedBytes = new System.Windows.Forms.ToolStripMenuItem();
this.mnuHideReadBytes = new System.Windows.Forms.ToolStripMenuItem();
@@ -88,12 +94,7 @@
this.tpgProfiler = new System.Windows.Forms.TabPage();
this.ctrlProfiler = new Mesen.GUI.Debugger.Controls.ctrlProfiler();
this.tmrRefresh = new System.Windows.Forms.Timer(this.components);
- this.dataTypeHighlightingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.mnuHighlightCodeBytes = new System.Windows.Forms.ToolStripMenuItem();
- this.mnuHighlightDataBytes = new System.Windows.Forms.ToolStripMenuItem();
- this.mnuHighlightChrDrawnBytes = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
- this.mnuHighlightChrReadBytes = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnuConfigureColors = new System.Windows.Forms.ToolStripMenuItem();
this.flowLayoutPanel1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
@@ -243,8 +244,9 @@
this.dataTypeHighlightingToolStripMenuItem,
this.fadeToolStripMenuItem,
this.toolStripMenuItem5,
- this.mnuRefresh,
+ this.mnuConfigureColors,
this.fontSizeToolStripMenuItem,
+ this.mnuRefresh,
this.toolStripMenuItem2,
this.mnuAutoRefresh,
this.mnuShowCharacters});
@@ -268,7 +270,7 @@
//
this.mnuHightlightReads.CheckOnClick = true;
this.mnuHightlightReads.Name = "mnuHightlightReads";
- this.mnuHightlightReads.Size = new System.Drawing.Size(152, 22);
+ this.mnuHightlightReads.Size = new System.Drawing.Size(133, 22);
this.mnuHightlightReads.Text = "Reads";
this.mnuHightlightReads.Click += new System.EventHandler(this.mnuColorProviderOptions_Click);
//
@@ -276,7 +278,7 @@
//
this.mnuHighlightWrites.CheckOnClick = true;
this.mnuHighlightWrites.Name = "mnuHighlightWrites";
- this.mnuHighlightWrites.Size = new System.Drawing.Size(152, 22);
+ this.mnuHighlightWrites.Size = new System.Drawing.Size(133, 22);
this.mnuHighlightWrites.Text = "Writes";
this.mnuHighlightWrites.Click += new System.EventHandler(this.mnuColorProviderOptions_Click);
//
@@ -284,14 +286,14 @@
//
this.mnuHighlightExecution.CheckOnClick = true;
this.mnuHighlightExecution.Name = "mnuHighlightExecution";
- this.mnuHighlightExecution.Size = new System.Drawing.Size(152, 22);
+ this.mnuHighlightExecution.Size = new System.Drawing.Size(133, 22);
this.mnuHighlightExecution.Text = "Execution";
this.mnuHighlightExecution.Click += new System.EventHandler(this.mnuColorProviderOptions_Click);
//
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
- this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6);
+ this.toolStripMenuItem6.Size = new System.Drawing.Size(130, 6);
//
// fadeSpeedToolStripMenuItem
//
@@ -303,13 +305,13 @@
this.toolStripMenuItem7,
this.mnuCustomFadeSpeed});
this.fadeSpeedToolStripMenuItem.Name = "fadeSpeedToolStripMenuItem";
- this.fadeSpeedToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.fadeSpeedToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.fadeSpeedToolStripMenuItem.Text = "Fade speed";
//
// mnuFadeSlow
//
this.mnuFadeSlow.Name = "mnuFadeSlow";
- this.mnuFadeSlow.Size = new System.Drawing.Size(152, 22);
+ this.mnuFadeSlow.Size = new System.Drawing.Size(136, 22);
this.mnuFadeSlow.Text = "Slow";
this.mnuFadeSlow.Click += new System.EventHandler(this.mnuFadeSpeed_Click);
//
@@ -318,36 +320,81 @@
this.mnuFadeNormal.Checked = true;
this.mnuFadeNormal.CheckState = System.Windows.Forms.CheckState.Checked;
this.mnuFadeNormal.Name = "mnuFadeNormal";
- this.mnuFadeNormal.Size = new System.Drawing.Size(152, 22);
+ this.mnuFadeNormal.Size = new System.Drawing.Size(136, 22);
this.mnuFadeNormal.Text = "Normal";
this.mnuFadeNormal.Click += new System.EventHandler(this.mnuFadeSpeed_Click);
//
// mnuFadeFast
//
this.mnuFadeFast.Name = "mnuFadeFast";
- this.mnuFadeFast.Size = new System.Drawing.Size(152, 22);
+ this.mnuFadeFast.Size = new System.Drawing.Size(136, 22);
this.mnuFadeFast.Text = "Fast";
this.mnuFadeFast.Click += new System.EventHandler(this.mnuFadeSpeed_Click);
//
// mnuFadeNever
//
this.mnuFadeNever.Name = "mnuFadeNever";
- this.mnuFadeNever.Size = new System.Drawing.Size(152, 22);
+ this.mnuFadeNever.Size = new System.Drawing.Size(136, 22);
this.mnuFadeNever.Text = "Do not fade";
this.mnuFadeNever.Click += new System.EventHandler(this.mnuFadeSpeed_Click);
//
// toolStripMenuItem7
//
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
- this.toolStripMenuItem7.Size = new System.Drawing.Size(149, 6);
+ this.toolStripMenuItem7.Size = new System.Drawing.Size(133, 6);
//
// mnuCustomFadeSpeed
//
this.mnuCustomFadeSpeed.Name = "mnuCustomFadeSpeed";
- this.mnuCustomFadeSpeed.Size = new System.Drawing.Size(152, 22);
+ this.mnuCustomFadeSpeed.Size = new System.Drawing.Size(136, 22);
this.mnuCustomFadeSpeed.Text = "Custom...";
this.mnuCustomFadeSpeed.Click += new System.EventHandler(this.mnuCustomFadeSpeed_Click);
//
+ // dataTypeHighlightingToolStripMenuItem
+ //
+ this.dataTypeHighlightingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.mnuHighlightCodeBytes,
+ this.mnuHighlightDataBytes,
+ this.toolStripMenuItem11,
+ this.mnuHighlightChrDrawnBytes,
+ this.mnuHighlightChrReadBytes});
+ this.dataTypeHighlightingToolStripMenuItem.Name = "dataTypeHighlightingToolStripMenuItem";
+ this.dataTypeHighlightingToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
+ this.dataTypeHighlightingToolStripMenuItem.Text = "Data Type Highlighting";
+ //
+ // mnuHighlightCodeBytes
+ //
+ this.mnuHighlightCodeBytes.CheckOnClick = true;
+ this.mnuHighlightCodeBytes.Name = "mnuHighlightCodeBytes";
+ this.mnuHighlightCodeBytes.Size = new System.Drawing.Size(204, 22);
+ this.mnuHighlightCodeBytes.Text = "Code bytes (PRG ROM)";
+ //
+ // mnuHighlightDataBytes
+ //
+ this.mnuHighlightDataBytes.CheckOnClick = true;
+ this.mnuHighlightDataBytes.Name = "mnuHighlightDataBytes";
+ this.mnuHighlightDataBytes.Size = new System.Drawing.Size(204, 22);
+ this.mnuHighlightDataBytes.Text = "Data bytes (PRG ROM)";
+ //
+ // toolStripMenuItem11
+ //
+ this.toolStripMenuItem11.Name = "toolStripMenuItem11";
+ this.toolStripMenuItem11.Size = new System.Drawing.Size(201, 6);
+ //
+ // mnuHighlightChrDrawnBytes
+ //
+ this.mnuHighlightChrDrawnBytes.CheckOnClick = true;
+ this.mnuHighlightChrDrawnBytes.Name = "mnuHighlightChrDrawnBytes";
+ this.mnuHighlightChrDrawnBytes.Size = new System.Drawing.Size(204, 22);
+ this.mnuHighlightChrDrawnBytes.Text = "Drawn bytes (CHR ROM)";
+ //
+ // mnuHighlightChrReadBytes
+ //
+ this.mnuHighlightChrReadBytes.CheckOnClick = true;
+ this.mnuHighlightChrReadBytes.Name = "mnuHighlightChrReadBytes";
+ this.mnuHighlightChrReadBytes.Size = new System.Drawing.Size(204, 22);
+ this.mnuHighlightChrReadBytes.Text = "Read bytes (CHR ROM)";
+ //
// fadeToolStripMenuItem
//
this.fadeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -618,50 +665,13 @@
this.tmrRefresh.Enabled = true;
this.tmrRefresh.Tick += new System.EventHandler(this.tmrRefresh_Tick);
//
- // dataTypeHighlightingToolStripMenuItem
+ // mnuConfigureColors
//
- this.dataTypeHighlightingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.mnuHighlightCodeBytes,
- this.mnuHighlightDataBytes,
- this.toolStripMenuItem11,
- this.mnuHighlightChrDrawnBytes,
- this.mnuHighlightChrReadBytes});
- this.dataTypeHighlightingToolStripMenuItem.Name = "dataTypeHighlightingToolStripMenuItem";
- this.dataTypeHighlightingToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
- this.dataTypeHighlightingToolStripMenuItem.Text = "Data Type Highlighting";
- //
- // mnuHighlightCodeBytes
- //
- this.mnuHighlightCodeBytes.CheckOnClick = true;
- this.mnuHighlightCodeBytes.Name = "mnuHighlightCodeBytes";
- this.mnuHighlightCodeBytes.Size = new System.Drawing.Size(204, 22);
- this.mnuHighlightCodeBytes.Text = "Code bytes (PRG ROM)";
- //
- // mnuHighlightDataBytes
- //
- this.mnuHighlightDataBytes.CheckOnClick = true;
- this.mnuHighlightDataBytes.Name = "mnuHighlightDataBytes";
- this.mnuHighlightDataBytes.Size = new System.Drawing.Size(204, 22);
- this.mnuHighlightDataBytes.Text = "Data bytes (PRG ROM)";
- //
- // mnuHighlightChrDrawnBytes
- //
- this.mnuHighlightChrDrawnBytes.CheckOnClick = true;
- this.mnuHighlightChrDrawnBytes.Name = "mnuHighlightChrDrawnBytes";
- this.mnuHighlightChrDrawnBytes.Size = new System.Drawing.Size(204, 22);
- this.mnuHighlightChrDrawnBytes.Text = "Drawn bytes (CHR ROM)";
- //
- // toolStripMenuItem11
- //
- this.toolStripMenuItem11.Name = "toolStripMenuItem11";
- this.toolStripMenuItem11.Size = new System.Drawing.Size(201, 6);
- //
- // mnuHighlightChrReadBytes
- //
- this.mnuHighlightChrReadBytes.CheckOnClick = true;
- this.mnuHighlightChrReadBytes.Name = "mnuHighlightChrReadBytes";
- this.mnuHighlightChrReadBytes.Size = new System.Drawing.Size(204, 22);
- this.mnuHighlightChrReadBytes.Text = "Read bytes (CHR ROM)";
+ this.mnuConfigureColors.Image = global::Mesen.GUI.Properties.Resources.PipetteSmall;
+ this.mnuConfigureColors.Name = "mnuConfigureColors";
+ this.mnuConfigureColors.Size = new System.Drawing.Size(228, 22);
+ this.mnuConfigureColors.Text = "Configure Colors";
+ this.mnuConfigureColors.Click += new System.EventHandler(this.mnuConfigureColors_Click);
//
// frmMemoryViewer
//
@@ -756,5 +766,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem11;
private System.Windows.Forms.ToolStripMenuItem mnuHighlightChrDrawnBytes;
private System.Windows.Forms.ToolStripMenuItem mnuHighlightChrReadBytes;
+ private System.Windows.Forms.ToolStripMenuItem mnuConfigureColors;
}
}
\ No newline at end of file
diff --git a/GUI.NET/Debugger/frmMemoryViewer.cs b/GUI.NET/Debugger/frmMemoryViewer.cs
index 597c3221..0761c753 100644
--- a/GUI.NET/Debugger/frmMemoryViewer.cs
+++ b/GUI.NET/Debugger/frmMemoryViewer.cs
@@ -493,5 +493,14 @@ namespace Mesen.GUI.Debugger
this.UpdateConfig();
this.UpdateByteColorProvider();
}
+
+ private void mnuConfigureColors_Click(object sender, EventArgs e)
+ {
+ using(frmMemoryViewerColors frm = new frmMemoryViewerColors()) {
+ if(frm.ShowDialog(this, this) == DialogResult.OK) {
+ this.RefreshData();
+ }
+ }
+ }
}
}
diff --git a/GUI.NET/Debugger/frmMemoryViewerColors.Designer.cs b/GUI.NET/Debugger/frmMemoryViewerColors.Designer.cs
new file mode 100644
index 00000000..e82c15ad
--- /dev/null
+++ b/GUI.NET/Debugger/frmMemoryViewerColors.Designer.cs
@@ -0,0 +1,304 @@
+namespace Mesen.GUI.Debugger
+{
+ partial class frmMemoryViewerColors
+ {
+ ///
+ /// 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 Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.picChrDrawnByte = new System.Windows.Forms.PictureBox();
+ this.lblChrDrawnByte = new System.Windows.Forms.Label();
+ this.lblCodeByte = new System.Windows.Forms.Label();
+ this.lblRead = new System.Windows.Forms.Label();
+ this.picRead = new System.Windows.Forms.PictureBox();
+ this.lblWrite = new System.Windows.Forms.Label();
+ this.lblExecute = new System.Windows.Forms.Label();
+ this.picCodeByte = new System.Windows.Forms.PictureBox();
+ this.picWrite = new System.Windows.Forms.PictureBox();
+ this.picExecute = new System.Windows.Forms.PictureBox();
+ this.picDataByte = new System.Windows.Forms.PictureBox();
+ this.picChrReadByte = new System.Windows.Forms.PictureBox();
+ this.lblChrReadByte = new System.Windows.Forms.Label();
+ this.lblDataByte = new System.Windows.Forms.Label();
+ this.btnReset = new System.Windows.Forms.Button();
+ this.baseConfigPanel.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.picChrDrawnByte)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picRead)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picCodeByte)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picWrite)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picExecute)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picDataByte)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picChrReadByte)).BeginInit();
+ this.SuspendLayout();
+ //
+ // baseConfigPanel
+ //
+ this.baseConfigPanel.Controls.Add(this.btnReset);
+ this.baseConfigPanel.Location = new System.Drawing.Point(0, 122);
+ this.baseConfigPanel.Size = new System.Drawing.Size(453, 29);
+ this.baseConfigPanel.Controls.SetChildIndex(this.btnReset, 0);
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 8;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.Controls.Add(this.picChrDrawnByte, 1, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lblChrDrawnByte, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lblCodeByte, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.lblRead, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.picRead, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.lblWrite, 3, 0);
+ this.tableLayoutPanel1.Controls.Add(this.lblExecute, 6, 0);
+ this.tableLayoutPanel1.Controls.Add(this.picCodeByte, 1, 1);
+ this.tableLayoutPanel1.Controls.Add(this.picWrite, 4, 0);
+ this.tableLayoutPanel1.Controls.Add(this.picExecute, 7, 0);
+ this.tableLayoutPanel1.Controls.Add(this.picDataByte, 4, 1);
+ this.tableLayoutPanel1.Controls.Add(this.picChrReadByte, 4, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lblChrReadByte, 3, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lblDataByte, 3, 1);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 6;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(453, 122);
+ this.tableLayoutPanel1.TabIndex = 2;
+ //
+ // picChrDrawnByte
+ //
+ this.picChrDrawnByte.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picChrDrawnByte.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picChrDrawnByte.Location = new System.Drawing.Point(102, 79);
+ this.picChrDrawnByte.Name = "picChrDrawnByte";
+ this.picChrDrawnByte.Size = new System.Drawing.Size(32, 32);
+ this.picChrDrawnByte.TabIndex = 7;
+ this.picChrDrawnByte.TabStop = false;
+ this.picChrDrawnByte.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // lblChrDrawnByte
+ //
+ this.lblChrDrawnByte.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblChrDrawnByte.AutoSize = true;
+ this.lblChrDrawnByte.Location = new System.Drawing.Point(3, 88);
+ this.lblChrDrawnByte.Name = "lblChrDrawnByte";
+ this.lblChrDrawnByte.Size = new System.Drawing.Size(91, 13);
+ this.lblChrDrawnByte.TabIndex = 4;
+ this.lblChrDrawnByte.Text = "CHR Drawn Byte:";
+ //
+ // lblCodeByte
+ //
+ this.lblCodeByte.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblCodeByte.AutoSize = true;
+ this.lblCodeByte.Location = new System.Drawing.Point(3, 50);
+ this.lblCodeByte.Name = "lblCodeByte";
+ this.lblCodeByte.Size = new System.Drawing.Size(59, 13);
+ this.lblCodeByte.TabIndex = 2;
+ this.lblCodeByte.Text = "Code Byte:";
+ //
+ // lblRead
+ //
+ this.lblRead.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblRead.AutoSize = true;
+ this.lblRead.Location = new System.Drawing.Point(3, 12);
+ this.lblRead.Name = "lblRead";
+ this.lblRead.Size = new System.Drawing.Size(36, 13);
+ this.lblRead.TabIndex = 0;
+ this.lblRead.Text = "Read:";
+ //
+ // picRead
+ //
+ this.picRead.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picRead.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picRead.Location = new System.Drawing.Point(102, 3);
+ this.picRead.Name = "picRead";
+ this.picRead.Size = new System.Drawing.Size(32, 32);
+ this.picRead.TabIndex = 5;
+ this.picRead.TabStop = false;
+ this.picRead.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // lblWrite
+ //
+ this.lblWrite.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblWrite.AutoSize = true;
+ this.lblWrite.Location = new System.Drawing.Point(160, 12);
+ this.lblWrite.Name = "lblWrite";
+ this.lblWrite.Size = new System.Drawing.Size(35, 13);
+ this.lblWrite.TabIndex = 10;
+ this.lblWrite.Text = "Write:";
+ //
+ // lblExecute
+ //
+ this.lblExecute.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblExecute.AutoSize = true;
+ this.lblExecute.Location = new System.Drawing.Point(317, 12);
+ this.lblExecute.Name = "lblExecute";
+ this.lblExecute.Size = new System.Drawing.Size(49, 13);
+ this.lblExecute.TabIndex = 11;
+ this.lblExecute.Text = "Execute:";
+ //
+ // picCodeByte
+ //
+ this.picCodeByte.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picCodeByte.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picCodeByte.Location = new System.Drawing.Point(102, 41);
+ this.picCodeByte.Name = "picCodeByte";
+ this.picCodeByte.Size = new System.Drawing.Size(32, 32);
+ this.picCodeByte.TabIndex = 6;
+ this.picCodeByte.TabStop = false;
+ this.picCodeByte.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // picWrite
+ //
+ this.picWrite.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picWrite.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picWrite.Location = new System.Drawing.Point(259, 3);
+ this.picWrite.Name = "picWrite";
+ this.picWrite.Size = new System.Drawing.Size(32, 32);
+ this.picWrite.TabIndex = 8;
+ this.picWrite.TabStop = false;
+ this.picWrite.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // picExecute
+ //
+ this.picExecute.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picExecute.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picExecute.Location = new System.Drawing.Point(416, 3);
+ this.picExecute.Name = "picExecute";
+ this.picExecute.Size = new System.Drawing.Size(32, 32);
+ this.picExecute.TabIndex = 9;
+ this.picExecute.TabStop = false;
+ this.picExecute.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // picDataByte
+ //
+ this.picDataByte.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picDataByte.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picDataByte.Location = new System.Drawing.Point(259, 41);
+ this.picDataByte.Name = "picDataByte";
+ this.picDataByte.Size = new System.Drawing.Size(32, 32);
+ this.picDataByte.TabIndex = 12;
+ this.picDataByte.TabStop = false;
+ this.picDataByte.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // picChrReadByte
+ //
+ this.picChrReadByte.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.picChrReadByte.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.picChrReadByte.Location = new System.Drawing.Point(259, 79);
+ this.picChrReadByte.Name = "picChrReadByte";
+ this.picChrReadByte.Size = new System.Drawing.Size(32, 32);
+ this.picChrReadByte.TabIndex = 13;
+ this.picChrReadByte.TabStop = false;
+ this.picChrReadByte.Click += new System.EventHandler(this.picColorPicker_Click);
+ //
+ // lblChrReadByte
+ //
+ this.lblChrReadByte.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblChrReadByte.AutoSize = true;
+ this.lblChrReadByte.Location = new System.Drawing.Point(160, 88);
+ this.lblChrReadByte.Name = "lblChrReadByte";
+ this.lblChrReadByte.Size = new System.Drawing.Size(86, 13);
+ this.lblChrReadByte.TabIndex = 3;
+ this.lblChrReadByte.Text = "CHR Read Byte:";
+ //
+ // lblDataByte
+ //
+ this.lblDataByte.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lblDataByte.AutoSize = true;
+ this.lblDataByte.Location = new System.Drawing.Point(160, 50);
+ this.lblDataByte.Name = "lblDataByte";
+ this.lblDataByte.Size = new System.Drawing.Size(57, 13);
+ this.lblDataByte.TabIndex = 1;
+ this.lblDataByte.Text = "Data Byte:";
+ //
+ // btnReset
+ //
+ this.btnReset.Location = new System.Drawing.Point(3, 3);
+ this.btnReset.Name = "btnReset";
+ this.btnReset.Size = new System.Drawing.Size(102, 23);
+ this.btnReset.TabIndex = 3;
+ this.btnReset.Text = "Use default colors";
+ this.btnReset.UseVisualStyleBackColor = true;
+ this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
+ //
+ // frmMemoryViewerColors
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(453, 151);
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Name = "frmMemoryViewerColors";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Configure Colors...";
+ this.Controls.SetChildIndex(this.baseConfigPanel, 0);
+ this.Controls.SetChildIndex(this.tableLayoutPanel1, 0);
+ this.baseConfigPanel.ResumeLayout(false);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.picChrDrawnByte)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picRead)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picCodeByte)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picWrite)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picExecute)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picDataByte)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.picChrReadByte)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.Label lblChrDrawnByte;
+ private System.Windows.Forms.Label lblCodeByte;
+ private System.Windows.Forms.Label lblRead;
+ private System.Windows.Forms.Label lblChrReadByte;
+ private System.Windows.Forms.Label lblDataByte;
+ private System.Windows.Forms.PictureBox picExecute;
+ private System.Windows.Forms.PictureBox picWrite;
+ private System.Windows.Forms.PictureBox picChrDrawnByte;
+ private System.Windows.Forms.PictureBox picCodeByte;
+ private System.Windows.Forms.PictureBox picRead;
+ private System.Windows.Forms.Label lblWrite;
+ private System.Windows.Forms.Label lblExecute;
+ private System.Windows.Forms.PictureBox picDataByte;
+ private System.Windows.Forms.PictureBox picChrReadByte;
+ private System.Windows.Forms.Button btnReset;
+ }
+}
\ No newline at end of file
diff --git a/GUI.NET/Debugger/frmMemoryViewerColors.cs b/GUI.NET/Debugger/frmMemoryViewerColors.cs
new file mode 100644
index 00000000..2c538e9b
--- /dev/null
+++ b/GUI.NET/Debugger/frmMemoryViewerColors.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Mesen.GUI.Config;
+using Mesen.GUI.Forms;
+
+namespace Mesen.GUI.Debugger
+{
+ public partial class frmMemoryViewerColors : BaseConfigForm
+ {
+ public frmMemoryViewerColors()
+ {
+ InitializeComponent();
+
+ picRead.BackColor = ConfigManager.Config.DebugInfo.RamReadColor;
+ picWrite.BackColor = ConfigManager.Config.DebugInfo.RamWriteColor;
+ picExecute.BackColor = ConfigManager.Config.DebugInfo.RamExecColor;
+ picCodeByte.BackColor = ConfigManager.Config.DebugInfo.RamCodeByteColor;
+ picDataByte.BackColor = ConfigManager.Config.DebugInfo.RamDataByteColor;
+ picChrDrawnByte.BackColor = ConfigManager.Config.DebugInfo.RamChrDrawnByteColor;
+ picChrReadByte.BackColor = ConfigManager.Config.DebugInfo.RamChrReadByteColor;
+ }
+
+ private void picColorPicker_Click(object sender, EventArgs e)
+ {
+ using(ColorDialog cd = new ColorDialog()) {
+ cd.SolidColorOnly = true;
+ cd.AllowFullOpen = true;
+ cd.FullOpen = true;
+ cd.Color = ((PictureBox)sender).BackColor;
+ if(cd.ShowDialog() == DialogResult.OK) {
+ ((PictureBox)sender).BackColor = cd.Color;
+ }
+ }
+ }
+
+ protected override void OnFormClosing(FormClosingEventArgs e)
+ {
+ base.OnFormClosing(e);
+ if(DialogResult == DialogResult.OK) {
+ ConfigManager.Config.DebugInfo.RamReadColor = picRead.BackColor;
+ ConfigManager.Config.DebugInfo.RamWriteColor = picWrite.BackColor;
+ ConfigManager.Config.DebugInfo.RamExecColor = picExecute.BackColor;
+ ConfigManager.Config.DebugInfo.RamCodeByteColor = picCodeByte.BackColor;
+ ConfigManager.Config.DebugInfo.RamDataByteColor = picDataByte.BackColor;
+ ConfigManager.Config.DebugInfo.RamChrDrawnByteColor = picChrDrawnByte.BackColor;
+ ConfigManager.Config.DebugInfo.RamChrReadByteColor = picChrReadByte.BackColor;
+ ConfigManager.ApplyChanges();
+ }
+ }
+
+ private void btnReset_Click(object sender, EventArgs e)
+ {
+ picRead.BackColor = Color.Blue;
+ picWrite.BackColor = Color.Red;
+ picExecute.BackColor = Color.Green;
+ picCodeByte.BackColor = Color.DarkSeaGreen;
+ picDataByte.BackColor = Color.LightSteelBlue;
+ picChrDrawnByte.BackColor = Color.DarkSeaGreen;
+ picChrReadByte.BackColor = Color.LightSteelBlue;
+ }
+ }
+}
diff --git a/GUI.NET/Debugger/frmMemoryViewerColors.resx b/GUI.NET/Debugger/frmMemoryViewerColors.resx
new file mode 100644
index 00000000..8766f298
--- /dev/null
+++ b/GUI.NET/Debugger/frmMemoryViewerColors.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj
index fef4aca6..4d735845 100644
--- a/GUI.NET/GUI.NET.csproj
+++ b/GUI.NET/GUI.NET.csproj
@@ -486,6 +486,12 @@
frmAssembler.cs
+
+ Form
+
+
+ frmMemoryViewerColors.cs
+
Form
@@ -1101,6 +1107,9 @@
frmAssembler.cs
+
+ frmMemoryViewerColors.cs
+
frmAssemblerColors.cs