From 075b6fbeee9859d1e5d797680f20fb715b964a93 Mon Sep 17 00:00:00 2001 From: Sour Date: Fri, 23 Feb 2018 10:56:19 -0500 Subject: [PATCH] Debugger: Added verified/unidentified data toggles to toolbar + added shortcut keys --- GUI.NET/Debugger/frmDebugger.Designer.cs | 132 ++++++++++++----------- GUI.NET/Debugger/frmDebugger.cs | 43 +++++--- GUI.NET/GUI.NET.csproj | 2 + GUI.NET/Properties/Resources.Designer.cs | 20 ++++ GUI.NET/Properties/Resources.resx | 6 ++ GUI.NET/Resources/UnidentifiedData.png | Bin 0 -> 247 bytes GUI.NET/Resources/VerifiedData.png | Bin 0 -> 256 bytes 7 files changed, 122 insertions(+), 81 deletions(-) create mode 100644 GUI.NET/Resources/UnidentifiedData.png create mode 100644 GUI.NET/Resources/VerifiedData.png diff --git a/GUI.NET/Debugger/frmDebugger.Designer.cs b/GUI.NET/Debugger/frmDebugger.Designer.cs index da4b0c4b..8cdcdca3 100644 --- a/GUI.NET/Debugger/frmDebugger.Designer.cs +++ b/GUI.NET/Debugger/frmDebugger.Designer.cs @@ -113,6 +113,7 @@ namespace Mesen.GUI.Debugger this.mnuBreakOnReset = new System.Windows.Forms.ToolStripMenuItem(); this.mnuBreakOnUnofficialOpcodes = new System.Windows.Forms.ToolStripMenuItem(); this.mnuBreakOnBrk = new System.Windows.Forms.ToolStripMenuItem(); + this.mnuBreakOnCrash = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripSeparator(); this.mnuBreakOnOpen = new System.Windows.Forms.ToolStripMenuItem(); this.mnuBreakOnDebuggerFocus = new System.Windows.Forms.ToolStripMenuItem(); @@ -137,7 +138,6 @@ namespace Mesen.GUI.Debugger this.mnuPpuShowPreviousFrame = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem19 = new System.Windows.Forms.ToolStripSeparator(); this.mnuRefreshWatchWhileRunning = new System.Windows.Forms.ToolStripMenuItem(); - this.mnuShowMemoryValues = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mnuApuViewer = new System.Windows.Forms.ToolStripMenuItem(); this.mnuAssembler = new System.Windows.Forms.ToolStripMenuItem(); @@ -170,7 +170,7 @@ namespace Mesen.GUI.Debugger this.ctrlPpuMemoryMapping = new Mesen.GUI.Debugger.Controls.ctrlMemoryMapping(); this.ctrlCpuMemoryMapping = new Mesen.GUI.Debugger.Controls.ctrlMemoryMapping(); this.tsToolbar = new System.Windows.Forms.ToolStrip(); - this.mnuBreakOnCrash = new System.Windows.Forms.ToolStripMenuItem(); + this.mnuShowMemoryValues = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); this.splitContainer.Panel1.SuspendLayout(); this.splitContainer.Panel2.SuspendLayout(); @@ -216,7 +216,7 @@ namespace Mesen.GUI.Debugger this.splitContainer.Panel2.Controls.Add(this.tableLayoutPanel10); this.splitContainer.Panel2MinSize = 100; this.splitContainer.Size = new System.Drawing.Size(1172, 573); - this.splitContainer.SplitterDistance = 401; + this.splitContainer.SplitterDistance = 400; this.splitContainer.SplitterWidth = 7; this.splitContainer.TabIndex = 1; this.splitContainer.TabStop = false; @@ -239,8 +239,8 @@ namespace Mesen.GUI.Debugger // this.ctrlSplitContainerTop.Panel2.Controls.Add(this.tlpFunctionLabelLists); this.ctrlSplitContainerTop.Panel2MinSize = 150; - this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1172, 401); - this.ctrlSplitContainerTop.SplitterDistance = 764; + this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1172, 400); + this.ctrlSplitContainerTop.SplitterDistance = 758; this.ctrlSplitContainerTop.SplitterWidth = 7; this.ctrlSplitContainerTop.TabIndex = 3; this.ctrlSplitContainerTop.PanelCollapsed += new System.EventHandler(this.ctrlSplitContainerTop_PanelCollapsed); @@ -261,7 +261,7 @@ namespace Mesen.GUI.Debugger this.tlpTop.Name = "tlpTop"; this.tlpTop.RowCount = 1; this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpTop.Size = new System.Drawing.Size(764, 401); + this.tlpTop.Size = new System.Drawing.Size(758, 400); this.tlpTop.TabIndex = 2; // // ctrlDebuggerCode @@ -273,7 +273,7 @@ namespace Mesen.GUI.Debugger this.ctrlDebuggerCode.Name = "ctrlDebuggerCode"; this.ctrlDebuggerCode.ShowMemoryValues = false; this.ctrlDebuggerCode.ShowScrollbars = true; - this.ctrlDebuggerCode.Size = new System.Drawing.Size(300, 395); + this.ctrlDebuggerCode.Size = new System.Drawing.Size(294, 394); this.ctrlDebuggerCode.TabIndex = 2; this.ctrlDebuggerCode.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode); this.ctrlDebuggerCode.OnSetNextStatement += new Mesen.GUI.Debugger.ctrlDebuggerCode.AddressEventHandler(this.ctrlDebuggerCode_OnSetNextStatement); @@ -283,10 +283,10 @@ namespace Mesen.GUI.Debugger // ctrlConsoleStatus // this.ctrlConsoleStatus.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlConsoleStatus.Location = new System.Drawing.Point(306, 0); + this.ctrlConsoleStatus.Location = new System.Drawing.Point(300, 0); this.ctrlConsoleStatus.Margin = new System.Windows.Forms.Padding(0); this.ctrlConsoleStatus.Name = "ctrlConsoleStatus"; - this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 401); + this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 400); this.ctrlConsoleStatus.TabIndex = 3; this.ctrlConsoleStatus.OnGotoLocation += new System.EventHandler(this.ctrlConsoleStatus_OnGotoLocation); // @@ -295,11 +295,11 @@ namespace Mesen.GUI.Debugger this.ctrlDebuggerCodeSplit.Code = null; this.ctrlDebuggerCodeSplit.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlDebuggerCodeSplit.HideSelection = false; - this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(309, 3); + this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(303, 3); this.ctrlDebuggerCodeSplit.Name = "ctrlDebuggerCodeSplit"; this.ctrlDebuggerCodeSplit.ShowMemoryValues = false; this.ctrlDebuggerCodeSplit.ShowScrollbars = true; - this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 395); + this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 394); this.ctrlDebuggerCodeSplit.TabIndex = 4; this.ctrlDebuggerCodeSplit.Visible = false; this.ctrlDebuggerCodeSplit.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode); @@ -320,7 +320,7 @@ namespace Mesen.GUI.Debugger this.tlpFunctionLabelLists.RowCount = 2; this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tlpFunctionLabelLists.Size = new System.Drawing.Size(401, 401); + this.tlpFunctionLabelLists.Size = new System.Drawing.Size(407, 400); this.tlpFunctionLabelLists.TabIndex = 5; // // grpLabels @@ -329,7 +329,7 @@ namespace Mesen.GUI.Debugger this.grpLabels.Dock = System.Windows.Forms.DockStyle.Fill; this.grpLabels.Location = new System.Drawing.Point(3, 203); this.grpLabels.Name = "grpLabels"; - this.grpLabels.Size = new System.Drawing.Size(395, 195); + this.grpLabels.Size = new System.Drawing.Size(401, 194); this.grpLabels.TabIndex = 6; this.grpLabels.TabStop = false; this.grpLabels.Text = "Labels"; @@ -339,7 +339,7 @@ namespace Mesen.GUI.Debugger this.ctrlLabelList.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlLabelList.Location = new System.Drawing.Point(3, 16); this.ctrlLabelList.Name = "ctrlLabelList"; - this.ctrlLabelList.Size = new System.Drawing.Size(389, 176); + this.ctrlLabelList.Size = new System.Drawing.Size(395, 175); this.ctrlLabelList.TabIndex = 0; this.ctrlLabelList.OnFindOccurrence += new System.EventHandler(this.ctrlLabelList_OnFindOccurrence); this.ctrlLabelList.OnLabelSelected += new System.EventHandler(this.ctrlLabelList_OnLabelSelected); @@ -350,7 +350,7 @@ namespace Mesen.GUI.Debugger this.grpFunctions.Dock = System.Windows.Forms.DockStyle.Fill; this.grpFunctions.Location = new System.Drawing.Point(3, 3); this.grpFunctions.Name = "grpFunctions"; - this.grpFunctions.Size = new System.Drawing.Size(395, 194); + this.grpFunctions.Size = new System.Drawing.Size(401, 194); this.grpFunctions.TabIndex = 5; this.grpFunctions.TabStop = false; this.grpFunctions.Text = "Functions"; @@ -360,7 +360,7 @@ namespace Mesen.GUI.Debugger this.ctrlFunctionList.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlFunctionList.Location = new System.Drawing.Point(3, 16); this.ctrlFunctionList.Name = "ctrlFunctionList"; - this.ctrlFunctionList.Size = new System.Drawing.Size(389, 175); + this.ctrlFunctionList.Size = new System.Drawing.Size(395, 175); this.ctrlFunctionList.TabIndex = 0; this.ctrlFunctionList.OnFindOccurrence += new System.EventHandler(this.ctrlFunctionList_OnFindOccurrence); this.ctrlFunctionList.OnFunctionSelected += new System.EventHandler(this.ctrlFunctionList_OnFunctionSelected); @@ -391,7 +391,7 @@ namespace Mesen.GUI.Debugger this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel10.Size = new System.Drawing.Size(1172, 165); + this.tableLayoutPanel10.Size = new System.Drawing.Size(1172, 166); this.tableLayoutPanel10.TabIndex = 0; // // grpWatch @@ -400,7 +400,7 @@ namespace Mesen.GUI.Debugger this.grpWatch.Dock = System.Windows.Forms.DockStyle.Fill; this.grpWatch.Location = new System.Drawing.Point(3, 3); this.grpWatch.Name = "grpWatch"; - this.grpWatch.Size = new System.Drawing.Size(384, 159); + this.grpWatch.Size = new System.Drawing.Size(384, 160); this.grpWatch.TabIndex = 2; this.grpWatch.TabStop = false; this.grpWatch.Text = "Watch"; @@ -410,7 +410,7 @@ namespace Mesen.GUI.Debugger this.ctrlWatch.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlWatch.Location = new System.Drawing.Point(3, 16); this.ctrlWatch.Name = "ctrlWatch"; - this.ctrlWatch.Size = new System.Drawing.Size(378, 140); + this.ctrlWatch.Size = new System.Drawing.Size(378, 141); this.ctrlWatch.TabIndex = 0; // // grpBreakpoints @@ -419,7 +419,7 @@ namespace Mesen.GUI.Debugger this.grpBreakpoints.Dock = System.Windows.Forms.DockStyle.Fill; this.grpBreakpoints.Location = new System.Drawing.Point(393, 3); this.grpBreakpoints.Name = "grpBreakpoints"; - this.grpBreakpoints.Size = new System.Drawing.Size(384, 159); + this.grpBreakpoints.Size = new System.Drawing.Size(384, 160); this.grpBreakpoints.TabIndex = 3; this.grpBreakpoints.TabStop = false; this.grpBreakpoints.Text = "Breakpoints"; @@ -429,7 +429,7 @@ namespace Mesen.GUI.Debugger this.ctrlBreakpoints.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlBreakpoints.Location = new System.Drawing.Point(3, 16); this.ctrlBreakpoints.Name = "ctrlBreakpoints"; - this.ctrlBreakpoints.Size = new System.Drawing.Size(378, 140); + this.ctrlBreakpoints.Size = new System.Drawing.Size(378, 141); this.ctrlBreakpoints.TabIndex = 0; this.ctrlBreakpoints.BreakpointNavigation += new System.EventHandler(this.ctrlBreakpoints_BreakpointNavigation); // @@ -439,7 +439,7 @@ namespace Mesen.GUI.Debugger this.grpCallstack.Dock = System.Windows.Forms.DockStyle.Fill; this.grpCallstack.Location = new System.Drawing.Point(783, 3); this.grpCallstack.Name = "grpCallstack"; - this.grpCallstack.Size = new System.Drawing.Size(386, 159); + this.grpCallstack.Size = new System.Drawing.Size(386, 160); this.grpCallstack.TabIndex = 4; this.grpCallstack.TabStop = false; this.grpCallstack.Text = "Call Stack"; @@ -449,7 +449,7 @@ namespace Mesen.GUI.Debugger this.ctrlCallstack.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlCallstack.Location = new System.Drawing.Point(3, 16); this.ctrlCallstack.Name = "ctrlCallstack"; - this.ctrlCallstack.Size = new System.Drawing.Size(380, 140); + this.ctrlCallstack.Size = new System.Drawing.Size(380, 141); this.ctrlCallstack.TabIndex = 0; this.ctrlCallstack.FunctionSelected += new System.EventHandler(this.ctrlCallstack_FunctionSelected); // @@ -878,8 +878,7 @@ namespace Mesen.GUI.Debugger this.mnuPpuPartialDraw, this.mnuPpuShowPreviousFrame, this.toolStripMenuItem19, - this.mnuRefreshWatchWhileRunning, - this.mnuShowMemoryValues}); + this.mnuRefreshWatchWhileRunning}); this.mnuOptions.Name = "mnuOptions"; this.mnuOptions.Size = new System.Drawing.Size(61, 20); this.mnuOptions.Text = "Options"; @@ -891,9 +890,10 @@ namespace Mesen.GUI.Debugger this.mnuShow, this.toolStripMenuItem7, this.mnuDisplayOpCodesInLowerCase, - this.mnuShowEffectiveAddresses}); + this.mnuShowEffectiveAddresses, + this.mnuShowMemoryValues}); this.mnuDisassemblyOptions.Name = "mnuDisassemblyOptions"; - this.mnuDisassemblyOptions.Size = new System.Drawing.Size(274, 22); + this.mnuDisassemblyOptions.Size = new System.Drawing.Size(266, 22); this.mnuDisassemblyOptions.Text = "Disassembly Options"; // // mnuDisassemble @@ -947,22 +947,26 @@ namespace Mesen.GUI.Debugger this.mnuShowDisassembledCode.CheckState = System.Windows.Forms.CheckState.Checked; this.mnuShowDisassembledCode.Enabled = false; this.mnuShowDisassembledCode.Name = "mnuShowDisassembledCode"; - this.mnuShowDisassembledCode.Size = new System.Drawing.Size(199, 22); + this.mnuShowDisassembledCode.Size = new System.Drawing.Size(235, 22); this.mnuShowDisassembledCode.Text = "Disassembled Code"; // // mnuShowVerifiedData // this.mnuShowVerifiedData.CheckOnClick = true; + this.mnuShowVerifiedData.Image = global::Mesen.GUI.Properties.Resources.VerifiedData; this.mnuShowVerifiedData.Name = "mnuShowVerifiedData"; - this.mnuShowVerifiedData.Size = new System.Drawing.Size(199, 22); + this.mnuShowVerifiedData.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.D1))); + this.mnuShowVerifiedData.Size = new System.Drawing.Size(235, 22); this.mnuShowVerifiedData.Text = "Verified Data"; this.mnuShowVerifiedData.Click += new System.EventHandler(this.mnuShowVerifiedData_Click); // // mnuShowUnidentifiedData // this.mnuShowUnidentifiedData.CheckOnClick = true; + this.mnuShowUnidentifiedData.Image = global::Mesen.GUI.Properties.Resources.UnidentifiedData; this.mnuShowUnidentifiedData.Name = "mnuShowUnidentifiedData"; - this.mnuShowUnidentifiedData.Size = new System.Drawing.Size(199, 22); + this.mnuShowUnidentifiedData.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.D2))); + this.mnuShowUnidentifiedData.Size = new System.Drawing.Size(235, 22); this.mnuShowUnidentifiedData.Text = "Unidentified Code/Data"; this.mnuShowUnidentifiedData.Click += new System.EventHandler(this.mnuShowUnidentifiedData_Click); // @@ -998,7 +1002,7 @@ namespace Mesen.GUI.Debugger this.mnuBreakOnOpen, this.mnuBreakOnDebuggerFocus}); this.mnuBreakOptions.Name = "mnuBreakOptions"; - this.mnuBreakOptions.Size = new System.Drawing.Size(274, 22); + this.mnuBreakOptions.Size = new System.Drawing.Size(266, 22); this.mnuBreakOptions.Text = "Break Options"; // // mnuBreakOnReset @@ -1025,6 +1029,14 @@ namespace Mesen.GUI.Debugger this.mnuBreakOnBrk.Text = "Break on BRK"; this.mnuBreakOnBrk.Click += new System.EventHandler(this.mnuBreakOnBrk_Click); // + // mnuBreakOnCrash + // + this.mnuBreakOnCrash.CheckOnClick = true; + this.mnuBreakOnCrash.Name = "mnuBreakOnCrash"; + this.mnuBreakOnCrash.Size = new System.Drawing.Size(243, 22); + this.mnuBreakOnCrash.Text = "Break on CPU crash"; + this.mnuBreakOnCrash.Click += new System.EventHandler(this.mnuBreakOnCrash_Click); + // // toolStripMenuItem15 // this.toolStripMenuItem15.Name = "toolStripMenuItem15"; @@ -1049,13 +1061,13 @@ namespace Mesen.GUI.Debugger // toolStripMenuItem12 // this.toolStripMenuItem12.Name = "toolStripMenuItem12"; - this.toolStripMenuItem12.Size = new System.Drawing.Size(271, 6); + this.toolStripMenuItem12.Size = new System.Drawing.Size(263, 6); // // mnuConfigureColors // this.mnuConfigureColors.Image = global::Mesen.GUI.Properties.Resources.PipetteSmall; this.mnuConfigureColors.Name = "mnuConfigureColors"; - this.mnuConfigureColors.Size = new System.Drawing.Size(274, 22); + this.mnuConfigureColors.Size = new System.Drawing.Size(266, 22); this.mnuConfigureColors.Text = "Configure Colors"; this.mnuConfigureColors.Click += new System.EventHandler(this.mnuConfigureColors_Click); // @@ -1064,7 +1076,7 @@ namespace Mesen.GUI.Debugger this.mnuSplitView.CheckOnClick = true; this.mnuSplitView.Image = global::Mesen.GUI.Properties.Resources.SplitView; this.mnuSplitView.Name = "mnuSplitView"; - this.mnuSplitView.Size = new System.Drawing.Size(274, 22); + this.mnuSplitView.Size = new System.Drawing.Size(266, 22); this.mnuSplitView.Text = "Split View"; this.mnuSplitView.Click += new System.EventHandler(this.mnuSplitView_Click); // @@ -1076,7 +1088,7 @@ namespace Mesen.GUI.Debugger this.mnuResetFontSize}); this.fontSizeToolStripMenuItem.Image = global::Mesen.GUI.Properties.Resources.Font; this.fontSizeToolStripMenuItem.Name = "fontSizeToolStripMenuItem"; - this.fontSizeToolStripMenuItem.Size = new System.Drawing.Size(274, 22); + this.fontSizeToolStripMenuItem.Size = new System.Drawing.Size(266, 22); this.fontSizeToolStripMenuItem.Text = "Text Size"; // // mnuIncreaseFontSize @@ -1109,13 +1121,13 @@ namespace Mesen.GUI.Debugger // toolStripMenuItem11 // this.toolStripMenuItem11.Name = "toolStripMenuItem11"; - this.toolStripMenuItem11.Size = new System.Drawing.Size(271, 6); + this.toolStripMenuItem11.Size = new System.Drawing.Size(263, 6); // // mnuShowToolbar // this.mnuShowToolbar.CheckOnClick = true; this.mnuShowToolbar.Name = "mnuShowToolbar"; - this.mnuShowToolbar.Size = new System.Drawing.Size(274, 22); + this.mnuShowToolbar.Size = new System.Drawing.Size(266, 22); this.mnuShowToolbar.Text = "Show Toolbar"; this.mnuShowToolbar.Click += new System.EventHandler(this.mnuShowToolbar_Click); // @@ -1123,7 +1135,7 @@ namespace Mesen.GUI.Debugger // this.mnuShowCpuMemoryMapping.CheckOnClick = true; this.mnuShowCpuMemoryMapping.Name = "mnuShowCpuMemoryMapping"; - this.mnuShowCpuMemoryMapping.Size = new System.Drawing.Size(274, 22); + this.mnuShowCpuMemoryMapping.Size = new System.Drawing.Size(266, 22); this.mnuShowCpuMemoryMapping.Text = "Show CPU Memory Mapping"; this.mnuShowCpuMemoryMapping.Click += new System.EventHandler(this.mnuShowCpuMemoryMapping_Click); // @@ -1131,7 +1143,7 @@ namespace Mesen.GUI.Debugger // this.mnuShowPpuMemoryMapping.CheckOnClick = true; this.mnuShowPpuMemoryMapping.Name = "mnuShowPpuMemoryMapping"; - this.mnuShowPpuMemoryMapping.Size = new System.Drawing.Size(274, 22); + this.mnuShowPpuMemoryMapping.Size = new System.Drawing.Size(266, 22); this.mnuShowPpuMemoryMapping.Text = "Show PPU Memory Mapping"; this.mnuShowPpuMemoryMapping.Click += new System.EventHandler(this.mnuShowPpuMemoryMapping_Click); // @@ -1139,7 +1151,7 @@ namespace Mesen.GUI.Debugger // this.mnuShowFunctionLabelLists.CheckOnClick = true; this.mnuShowFunctionLabelLists.Name = "mnuShowFunctionLabelLists"; - this.mnuShowFunctionLabelLists.Size = new System.Drawing.Size(274, 22); + this.mnuShowFunctionLabelLists.Size = new System.Drawing.Size(266, 22); this.mnuShowFunctionLabelLists.Text = "Show Function/Label Lists"; this.mnuShowFunctionLabelLists.Click += new System.EventHandler(this.mnuShowFunctionLabelLists_Click); // @@ -1147,20 +1159,20 @@ namespace Mesen.GUI.Debugger // this.mnuShowBottomPanel.CheckOnClick = true; this.mnuShowBottomPanel.Name = "mnuShowBottomPanel"; - this.mnuShowBottomPanel.Size = new System.Drawing.Size(274, 22); + this.mnuShowBottomPanel.Size = new System.Drawing.Size(266, 22); this.mnuShowBottomPanel.Text = "Show Watch/Breakpoints/Callstack"; this.mnuShowBottomPanel.Click += new System.EventHandler(this.mnuShowBottomPanel_Click); // // toolStripMenuItem18 // this.toolStripMenuItem18.Name = "toolStripMenuItem18"; - this.toolStripMenuItem18.Size = new System.Drawing.Size(271, 6); + this.toolStripMenuItem18.Size = new System.Drawing.Size(263, 6); // // mnuShowCodePreview // this.mnuShowCodePreview.CheckOnClick = true; this.mnuShowCodePreview.Name = "mnuShowCodePreview"; - this.mnuShowCodePreview.Size = new System.Drawing.Size(274, 22); + this.mnuShowCodePreview.Size = new System.Drawing.Size(266, 22); this.mnuShowCodePreview.Text = "Show Code Preview in Tooltips"; this.mnuShowCodePreview.CheckedChanged += new System.EventHandler(this.mnuShowCodePreview_CheckedChanged); // @@ -1168,20 +1180,20 @@ namespace Mesen.GUI.Debugger // this.mnuShowOpCodeTooltips.CheckOnClick = true; this.mnuShowOpCodeTooltips.Name = "mnuShowOpCodeTooltips"; - this.mnuShowOpCodeTooltips.Size = new System.Drawing.Size(274, 22); + this.mnuShowOpCodeTooltips.Size = new System.Drawing.Size(266, 22); this.mnuShowOpCodeTooltips.Text = "Show OP Code Info Tooltips"; this.mnuShowOpCodeTooltips.CheckedChanged += new System.EventHandler(this.mnuShowOpCodeTooltips_CheckedChanged); // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(271, 6); + this.toolStripMenuItem6.Size = new System.Drawing.Size(263, 6); // // mnuPpuPartialDraw // this.mnuPpuPartialDraw.CheckOnClick = true; this.mnuPpuPartialDraw.Name = "mnuPpuPartialDraw"; - this.mnuPpuPartialDraw.Size = new System.Drawing.Size(274, 22); + this.mnuPpuPartialDraw.Size = new System.Drawing.Size(266, 22); this.mnuPpuPartialDraw.Text = "Draw Partial Frame"; this.mnuPpuPartialDraw.Click += new System.EventHandler(this.mnuPpuPartialDraw_Click); // @@ -1189,31 +1201,23 @@ namespace Mesen.GUI.Debugger // this.mnuPpuShowPreviousFrame.CheckOnClick = true; this.mnuPpuShowPreviousFrame.Name = "mnuPpuShowPreviousFrame"; - this.mnuPpuShowPreviousFrame.Size = new System.Drawing.Size(274, 22); + this.mnuPpuShowPreviousFrame.Size = new System.Drawing.Size(266, 22); this.mnuPpuShowPreviousFrame.Text = "Show previous frame behind current"; this.mnuPpuShowPreviousFrame.Click += new System.EventHandler(this.mnuShowPreviousFrame_Click); // // toolStripMenuItem19 // this.toolStripMenuItem19.Name = "toolStripMenuItem19"; - this.toolStripMenuItem19.Size = new System.Drawing.Size(271, 6); + this.toolStripMenuItem19.Size = new System.Drawing.Size(263, 6); // // mnuRefreshWatchWhileRunning // this.mnuRefreshWatchWhileRunning.CheckOnClick = true; this.mnuRefreshWatchWhileRunning.Name = "mnuRefreshWatchWhileRunning"; - this.mnuRefreshWatchWhileRunning.Size = new System.Drawing.Size(274, 22); + this.mnuRefreshWatchWhileRunning.Size = new System.Drawing.Size(266, 22); this.mnuRefreshWatchWhileRunning.Text = "Refresh watch while running"; this.mnuRefreshWatchWhileRunning.Click += new System.EventHandler(this.mnuRefreshWatchWhileRunning_Click); // - // mnuShowMemoryValues - // - this.mnuShowMemoryValues.CheckOnClick = true; - this.mnuShowMemoryValues.Name = "mnuShowMemoryValues"; - this.mnuShowMemoryValues.Size = new System.Drawing.Size(274, 22); - this.mnuShowMemoryValues.Text = "Show memory values in code window"; - this.mnuShowMemoryValues.Click += new System.EventHandler(this.mnuShowMemoryValues_Click); - // // toolsToolStripMenuItem // this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -1485,13 +1489,13 @@ namespace Mesen.GUI.Debugger this.tsToolbar.Text = "toolStrip1"; this.tsToolbar.Visible = false; // - // mnuBreakOnCrash + // mnuShowMemoryValues // - this.mnuBreakOnCrash.CheckOnClick = true; - this.mnuBreakOnCrash.Name = "mnuBreakOnCrash"; - this.mnuBreakOnCrash.Size = new System.Drawing.Size(243, 22); - this.mnuBreakOnCrash.Text = "Break on CPU crash"; - this.mnuBreakOnCrash.Click += new System.EventHandler(this.mnuBreakOnCrash_Click); + this.mnuShowMemoryValues.CheckOnClick = true; + this.mnuShowMemoryValues.Name = "mnuShowMemoryValues"; + this.mnuShowMemoryValues.Size = new System.Drawing.Size(236, 22); + this.mnuShowMemoryValues.Text = "Show Memory Values"; + this.mnuShowMemoryValues.Click += new System.EventHandler(this.mnuShowMemoryValues_Click); // // frmDebugger // @@ -1670,12 +1674,12 @@ namespace Mesen.GUI.Debugger private System.Windows.Forms.ToolStripMenuItem mnuShowVerifiedData; private System.Windows.Forms.ToolStripMenuItem mnuShowUnidentifiedData; private System.Windows.Forms.ToolStripMenuItem mnuConfigureColors; - private System.Windows.Forms.ToolStripMenuItem mnuShowMemoryValues; private System.Windows.Forms.ToolStrip tsToolbar; private System.Windows.Forms.ToolStripMenuItem mnuShowToolbar; private System.Windows.Forms.ToolStripMenuItem mnuPpuShowPreviousFrame; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem19; private System.Windows.Forms.ToolStripMenuItem mnuEventViewer; private System.Windows.Forms.ToolStripMenuItem mnuBreakOnCrash; + private System.Windows.Forms.ToolStripMenuItem mnuShowMemoryValues; } } \ No newline at end of file diff --git a/GUI.NET/Debugger/frmDebugger.cs b/GUI.NET/Debugger/frmDebugger.cs index 6250e764..da650595 100644 --- a/GUI.NET/Debugger/frmDebugger.cs +++ b/GUI.NET/Debugger/frmDebugger.cs @@ -159,29 +159,38 @@ namespace Mesen.GUI.Debugger mnuRunPpuCycle, mnuRunScanline, mnuRunOneFrame, null, mnuToggleBreakpoint, mnuDisableEnableBreakpoint, null, mnuFind, mnuFindPrev, mnuFindNext, null, - mnuApuViewer, mnuAssembler, mnuEventViewer, mnuMemoryViewer, mnuPpuViewer, mnuScriptWindow, mnuTraceLogger, null, - mnuEditHeader, null, - mnuBreakIn + mnuApuViewer, mnuAssembler, mnuMemoryViewer, mnuEventViewer, mnuPpuViewer, mnuScriptWindow, mnuTraceLogger, null, + mnuEditHeader, null ); + AddItemToToolbar(mnuShowVerifiedData, "Show Verified Data"); + AddItemToToolbar(mnuShowUnidentifiedData, "Show Unidentified Code/Data"); + AddItemsToToolbar(null, mnuBreakIn); + } + + private void AddItemToToolbar(ToolStripMenuItem item, string caption = null) + { + if(item == null) { + tsToolbar.Items.Add("-"); + } else { + ToolStripButton newItem = new ToolStripButton(item.Image); + if(item.Image == null) { + newItem.Text = item.Text; + } + newItem.ToolTipText = (caption ?? item.Text) + (item.ShortcutKeys != Keys.None ? $" ({new KeysConverter().ConvertToString(item.ShortcutKeys)})" : ""); + newItem.Click += (s, e) => item.PerformClick(); + newItem.Checked = item.Checked; + newItem.Enabled = item.Enabled; + item.EnabledChanged += (s, e) => newItem.Enabled = item.Enabled; + item.CheckedChanged += (s, e) => newItem.Checked = item.Checked; + item.VisibleChanged += (s, e) => newItem.Visible = item.Visible; + tsToolbar.Items.Add(newItem); + } } private void AddItemsToToolbar(params ToolStripMenuItem[] items) { foreach(ToolStripMenuItem item in items) { - if(item == null) { - tsToolbar.Items.Add("-"); - } else { - ToolStripButton newItem = new ToolStripButton(item.Image); - if(item.Image == null) { - newItem.Text = item.Text; - } - newItem.ToolTipText = item.Text + (item.ShortcutKeys != Keys.None ? $" ({new KeysConverter().ConvertToString(item.ShortcutKeys)})" : ""); - newItem.Click += (s, e) => item.PerformClick(); - newItem.Enabled = item.Enabled; - item.EnabledChanged += (s, e) => newItem.Enabled = item.Enabled; - item.VisibleChanged += (s, e) => newItem.Visible = item.Visible; - tsToolbar.Items.Add(newItem); - } + AddItemToToolbar(item); } } diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj index ce60c431..6cb9a9ea 100644 --- a/GUI.NET/GUI.NET.csproj +++ b/GUI.NET/GUI.NET.csproj @@ -1103,6 +1103,8 @@ + + diff --git a/GUI.NET/Properties/Resources.Designer.cs b/GUI.NET/Properties/Resources.Designer.cs index 7aad09b2..644f39b4 100644 --- a/GUI.NET/Properties/Resources.Designer.cs +++ b/GUI.NET/Properties/Resources.Designer.cs @@ -880,6 +880,26 @@ namespace Mesen.GUI.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap UnidentifiedData { + get { + object obj = ResourceManager.GetObject("UnidentifiedData", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap VerifiedData { + get { + object obj = ResourceManager.GetObject("VerifiedData", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/GUI.NET/Properties/Resources.resx b/GUI.NET/Properties/Resources.resx index 800ac6b5..d368348d 100644 --- a/GUI.NET/Properties/Resources.resx +++ b/GUI.NET/Properties/Resources.resx @@ -382,4 +382,10 @@ ..\Resources\NesEventViewer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\UnidentifiedData.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\VerifiedData.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/GUI.NET/Resources/UnidentifiedData.png b/GUI.NET/Resources/UnidentifiedData.png new file mode 100644 index 0000000000000000000000000000000000000000..85b84696fd9d1ed32e471cc5d4d2a850ad4d90c6 GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C|TkfQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXJ~ol+NKnsq7qLR z#}EtuseKoD8x(k4=AI7yQD*YIKnvyoWJ(VXfJW$8A#%PCih2{jWu7foiP6nJncWXAXrVRBQcMnU&GJ(P3Zi2O*C7 n1{Vd#3xb^+_9SZQ1e{{F7X915qo6qiXg`CetDnm{r-UW|I(b&{ literal 0 HcmV?d00001 diff --git a/GUI.NET/Resources/VerifiedData.png b/GUI.NET/Resources/VerifiedData.png new file mode 100644 index 0000000000000000000000000000000000000000..5289bd404e0d8d9ea566577c19dd52842d9841c3 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C|TkfQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXJ~ol+NKnsqFPTE z#}Etusr?598x(k0)}EU#8!#pJ=SJ!ORf>K>=T>ZZe1~Nx>)cZcN^|b+P{>m~=P=zc zcEOURsddbk+I~e{n3?}W_2&}vZ^^}uKLsw#yS_C1LYeXrl{Is@ZyXDr?Ua+8$8z-B yyxg@P?T@(4S$n|gO`x<2laX!o&Q?aRoeWEZ-d`xpIxrLH5C%_IKbLh*2~7a)J6(nV literal 0 HcmV?d00001