Merge pull request #3 from NovaSquirrel/master

Merge from NovaSquirrel
This commit is contained in:
mkwong98 2021-01-14 18:33:49 +08:00 committed by GitHub
commit 13b666c835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 2 deletions

View file

@ -5,10 +5,12 @@
1) Open the solution in Visual Studio 2019 1) Open the solution in Visual Studio 2019
2) Set "GUI.NET" as the Startup Project 2) Set "GUI.NET" as the Startup Project
3) Compile as Release/x64 or Release/x86 3) Compile as Release/x64 or Release/x86
4) Run Mesen.exe 4) Run the project from Visual Studio
5) If you got an error, try running it a second time
Note: When loading the the solution in Visual Studio make sure all the projects are loaded successfully. Note: When loading the the solution in Visual Studio make sure all the projects are loaded successfully.
Note: If you get an error about the project targeted .NET Framework 4.5 chose to download the missing packages then install ".NET Framework 4.5 targeting pack" from the Visual Studio Installer. Note: If you get an error about the project targeted .NET Framework 4.5 chose to download the missing packages then install ".NET Framework 4.5 targeting pack" from the Visual Studio Installer.
Note: If you get a "compiler is out of heap space" error when building the project, then try running `set PreferredToolArchitecture=x64` and `devenv` in "x64 Native Tools Command Prompt for VS 2019"
#### *Libretro* #### *Libretro*

View file

@ -339,6 +339,8 @@ namespace Mesen.GUI.Config
public bool RefreshWhileRunning = false; public bool RefreshWhileRunning = false;
public bool ShowMemoryValuesInCodeWindow = true; public bool ShowMemoryValuesInCodeWindow = true;
public bool ReloadRomOnPowerCycle = false;
public bool BreakOnOpen = true; public bool BreakOnOpen = true;
public bool BreakOnReset = true; public bool BreakOnReset = true;
public bool BreakOnUnofficialOpcodes = true; public bool BreakOnUnofficialOpcodes = true;

View file

@ -181,6 +181,8 @@ namespace Mesen.GUI.Debugger
this.mnuAlwaysScrollToCenter = new System.Windows.Forms.ToolStripMenuItem(); this.mnuAlwaysScrollToCenter = new System.Windows.Forms.ToolStripMenuItem();
this.mnuRefreshWhileRunning = new System.Windows.Forms.ToolStripMenuItem(); this.mnuRefreshWhileRunning = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
this.mnuReloadRomOnPowerCycle = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.mnuConfigureExternalEditor = new System.Windows.Forms.ToolStripMenuItem(); this.mnuConfigureExternalEditor = new System.Windows.Forms.ToolStripMenuItem();
this.mnuPreferences = new System.Windows.Forms.ToolStripMenuItem(); this.mnuPreferences = new System.Windows.Forms.ToolStripMenuItem();
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -1034,6 +1036,8 @@ namespace Mesen.GUI.Debugger
this.mnuAlwaysScrollToCenter, this.mnuAlwaysScrollToCenter,
this.mnuRefreshWhileRunning, this.mnuRefreshWhileRunning,
this.toolStripMenuItem6, this.toolStripMenuItem6,
this.mnuReloadRomOnPowerCycle,
this.toolStripSeparator2,
this.mnuConfigureExternalEditor, this.mnuConfigureExternalEditor,
this.mnuPreferences}); this.mnuPreferences});
this.mnuOptions.Name = "mnuOptions"; this.mnuOptions.Name = "mnuOptions";
@ -1638,6 +1642,19 @@ namespace Mesen.GUI.Debugger
this.toolStripMenuItem6.Name = "toolStripMenuItem6"; this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(263, 6); this.toolStripMenuItem6.Size = new System.Drawing.Size(263, 6);
// //
// mnuReloadRomOnPowerCycle
//
this.mnuReloadRomOnPowerCycle.CheckOnClick = true;
this.mnuReloadRomOnPowerCycle.Name = "mnuReloadRomOnPowerCycle";
this.mnuReloadRomOnPowerCycle.Size = new System.Drawing.Size(266, 22);
this.mnuReloadRomOnPowerCycle.Text = "Reload ROM on Power Cycle";
this.mnuReloadRomOnPowerCycle.Click += new System.EventHandler(this.mnuReloadRomOnPowerCycle_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(263, 6);
//
// mnuConfigureExternalEditor // mnuConfigureExternalEditor
// //
this.mnuConfigureExternalEditor.Image = global::Mesen.GUI.Properties.Resources.Edit; this.mnuConfigureExternalEditor.Image = global::Mesen.GUI.Properties.Resources.Edit;
@ -2236,5 +2253,7 @@ namespace Mesen.GUI.Debugger
private System.Windows.Forms.ToolStripMenuItem mnuBreakOnPpu2006ScrollGlitch; private System.Windows.Forms.ToolStripMenuItem mnuBreakOnPpu2006ScrollGlitch;
private System.Windows.Forms.ToolStripMenuItem mnuBreakOnBusConflict; private System.Windows.Forms.ToolStripMenuItem mnuBreakOnBusConflict;
private System.Windows.Forms.ToolStripMenuItem mnuGoToAddress; private System.Windows.Forms.ToolStripMenuItem mnuGoToAddress;
private System.Windows.Forms.ToolStripMenuItem mnuReloadRomOnPowerCycle;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
} }
} }

View file

@ -130,6 +130,7 @@ namespace Mesen.GUI.Debugger
this.mnuShowSelectionLength.Checked = ConfigManager.Config.DebugInfo.ShowSelectionLength; this.mnuShowSelectionLength.Checked = ConfigManager.Config.DebugInfo.ShowSelectionLength;
this.mnuAlwaysScrollToCenter.Checked = ConfigManager.Config.DebugInfo.AlwaysScrollToCenter; this.mnuAlwaysScrollToCenter.Checked = ConfigManager.Config.DebugInfo.AlwaysScrollToCenter;
this.mnuRefreshWhileRunning.Checked = ConfigManager.Config.DebugInfo.RefreshWhileRunning; this.mnuRefreshWhileRunning.Checked = ConfigManager.Config.DebugInfo.RefreshWhileRunning;
this.mnuReloadRomOnPowerCycle.Checked = ConfigManager.Config.DebugInfo.ReloadRomOnPowerCycle;
this.mnuShowMemoryValues.Checked = ConfigManager.Config.DebugInfo.ShowMemoryValuesInCodeWindow; this.mnuShowMemoryValues.Checked = ConfigManager.Config.DebugInfo.ShowMemoryValuesInCodeWindow;
ctrlDebuggerCode.ShowMemoryValues = mnuShowMemoryValues.Checked; ctrlDebuggerCode.ShowMemoryValues = mnuShowMemoryValues.Checked;
ctrlDebuggerCodeSplit.ShowMemoryValues = mnuShowMemoryValues.Checked; ctrlDebuggerCodeSplit.ShowMemoryValues = mnuShowMemoryValues.Checked;
@ -1271,6 +1272,12 @@ namespace Mesen.GUI.Debugger
ConfigManager.ApplyChanges(); ConfigManager.ApplyChanges();
} }
private void mnuReloadRomOnPowerCycle_Click(object sender, EventArgs e)
{
ConfigManager.Config.DebugInfo.ReloadRomOnPowerCycle = mnuReloadRomOnPowerCycle.Checked;
ConfigManager.ApplyChanges();
}
private void mnuShowMemoryValues_Click(object sender, EventArgs e) private void mnuShowMemoryValues_Click(object sender, EventArgs e)
{ {
ConfigManager.Config.DebugInfo.ShowMemoryValuesInCodeWindow = mnuShowMemoryValues.Checked; ConfigManager.Config.DebugInfo.ShowMemoryValuesInCodeWindow = mnuShowMemoryValues.Checked;
@ -1684,7 +1691,11 @@ namespace Mesen.GUI.Debugger
private void mnuPowerCycle_Click(object sender, EventArgs e) private void mnuPowerCycle_Click(object sender, EventArgs e)
{ {
InteropEmu.PowerCycle(); if(ConfigManager.Config.DebugInfo.ReloadRomOnPowerCycle) {
InteropEmu.ReloadRom();
} else {
InteropEmu.PowerCycle();
}
} }
protected override void OnResize(EventArgs e) protected override void OnResize(EventArgs e)