diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index f734f67945..b62f640ecc 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -506,8 +506,14 @@ namespace BizHawk.Client.Common break; case "GBA": //core = CoreInventory.Instance["GBA", "Meteor"]; - core = CoreInventory.Instance["GBA", "VBA-Next"]; - //core = CoreInventory.Instance["GBA", "mGBA"]; + if (Global.Config.GBA_UsemGBA) + { + core = CoreInventory.Instance["GBA", "mGBA"]; + } + else + { + core = CoreInventory.Instance["GBA", "VBA-Next"]; + } break; case "PSX": nextEmulator = new Octoshock(nextComm, null, null, rom.FileData, GetCoreSettings(), GetCoreSyncSettings()); diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index f0e56bedc3..aa462e3dcc 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -411,6 +411,7 @@ namespace BizHawk.Client.Common public bool GB_AsSGB = false; public bool NES_InQuickNES = true; public bool SNES_InSnes9x = false; + public bool GBA_UsemGBA = false; } // These are used in the defctrl.json or wherever diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs index 7584b21360..10acc0a934 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -199,8 +199,8 @@ this.CheatsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.LuaConsoleMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator29 = new System.Windows.Forms.ToolStripSeparator(); - this.batchRunnerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MultiDiskBundlerFileMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.batchRunnerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.NESSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.coreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.quickNESToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -268,9 +268,12 @@ this.GBGPUViewerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.GBGameGenieMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.GBASubMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.GbaGpuViewerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator33 = new System.Windows.Forms.ToolStripSeparator(); + this.GBACoreSelectionSubMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.GBAmGBAMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.GBAVBANextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.GBAcoresettingsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator33 = new System.Windows.Forms.ToolStripSeparator(); + this.GbaGpuViewerMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PSXSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.PSXControllerSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PSXOptionsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -390,6 +393,7 @@ this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator(); this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.gBAWithMGBAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MainformMenu.SuspendLayout(); this.MainStatusBar.SuspendLayout(); this.MainFormContextMenu.SuspendLayout(); @@ -1689,6 +1693,7 @@ this.GBInSGBMenuItem, this.NesInQuickNESMenuItem, this.SnesWithSnes9xMenuItem, + this.gBAWithMGBAToolStripMenuItem, this.toolStripSeparator8, this.N64VideoPluginSettingsMenuItem}); this.CoresSubMenu.Name = "CoresSubMenu"; @@ -1877,14 +1882,6 @@ this.toolStripSeparator29.Name = "toolStripSeparator29"; this.toolStripSeparator29.Size = new System.Drawing.Size(169, 6); // - // batchRunnerToolStripMenuItem - // - this.batchRunnerToolStripMenuItem.Name = "batchRunnerToolStripMenuItem"; - this.batchRunnerToolStripMenuItem.Size = new System.Drawing.Size(172, 22); - this.batchRunnerToolStripMenuItem.Text = "Batch Runner"; - this.batchRunnerToolStripMenuItem.Visible = false; - this.batchRunnerToolStripMenuItem.Click += new System.EventHandler(this.batchRunnerToolStripMenuItem_Click); - // // MultiDiskBundlerFileMenuItem // this.MultiDiskBundlerFileMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveConfig; @@ -1893,6 +1890,14 @@ this.MultiDiskBundlerFileMenuItem.Text = "Multi-disk Bundler"; this.MultiDiskBundlerFileMenuItem.Click += new System.EventHandler(this.CreateMultigameFileMenuItem_Click); // + // batchRunnerToolStripMenuItem + // + this.batchRunnerToolStripMenuItem.Name = "batchRunnerToolStripMenuItem"; + this.batchRunnerToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.batchRunnerToolStripMenuItem.Text = "Batch Runner"; + this.batchRunnerToolStripMenuItem.Visible = false; + this.batchRunnerToolStripMenuItem.Click += new System.EventHandler(this.batchRunnerToolStripMenuItem_Click); + // // NESSubMenu // this.NESSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -2416,24 +2421,37 @@ // GBASubMenu // this.GBASubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.GbaGpuViewerMenuItem, + this.GBACoreSelectionSubMenu, + this.GBAcoresettingsToolStripMenuItem1, this.toolStripSeparator33, - this.GBAcoresettingsToolStripMenuItem1}); + this.GbaGpuViewerMenuItem}); this.GBASubMenu.Name = "GBASubMenu"; this.GBASubMenu.Size = new System.Drawing.Size(42, 19); this.GBASubMenu.Text = "GBA"; // - // GbaGpuViewerMenuItem + // GBACoreSelectionSubMenu // - this.GbaGpuViewerMenuItem.Name = "GbaGpuViewerMenuItem"; - this.GbaGpuViewerMenuItem.Size = new System.Drawing.Size(135, 22); - this.GbaGpuViewerMenuItem.Text = "GPU Viewer"; - this.GbaGpuViewerMenuItem.Click += new System.EventHandler(this.GbaGpuViewerMenuItem_Click); + this.GBACoreSelectionSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.GBAmGBAMenuItem, + this.GBAVBANextMenuItem}); + this.GBACoreSelectionSubMenu.Name = "GBACoreSelectionSubMenu"; + this.GBACoreSelectionSubMenu.Size = new System.Drawing.Size(135, 22); + this.GBACoreSelectionSubMenu.Text = "&Core"; + this.GBACoreSelectionSubMenu.DropDownOpened += new System.EventHandler(this.GBACoreSelectionSubMenu_DropDownOpened); // - // toolStripSeparator33 + // GBAmGBAMenuItem // - this.toolStripSeparator33.Name = "toolStripSeparator33"; - this.toolStripSeparator33.Size = new System.Drawing.Size(132, 6); + this.GBAmGBAMenuItem.Name = "GBAmGBAMenuItem"; + this.GBAmGBAMenuItem.Size = new System.Drawing.Size(125, 22); + this.GBAmGBAMenuItem.Text = "mGBA"; + this.GBAmGBAMenuItem.Click += new System.EventHandler(this.GBAmGBAMenuItem_Click); + // + // GBAVBANextMenuItem + // + this.GBAVBANextMenuItem.Name = "GBAVBANextMenuItem"; + this.GBAVBANextMenuItem.Size = new System.Drawing.Size(125, 22); + this.GBAVBANextMenuItem.Text = "&VBA-Next"; + this.GBAVBANextMenuItem.Click += new System.EventHandler(this.GBAVBANextMenuItem_Click); // // GBAcoresettingsToolStripMenuItem1 // @@ -2442,6 +2460,18 @@ this.GBAcoresettingsToolStripMenuItem1.Text = "&Settings..."; this.GBAcoresettingsToolStripMenuItem1.Click += new System.EventHandler(this.GBAcoresettingsToolStripMenuItem1_Click); // + // toolStripSeparator33 + // + this.toolStripSeparator33.Name = "toolStripSeparator33"; + this.toolStripSeparator33.Size = new System.Drawing.Size(132, 6); + // + // GbaGpuViewerMenuItem + // + this.GbaGpuViewerMenuItem.Name = "GbaGpuViewerMenuItem"; + this.GbaGpuViewerMenuItem.Size = new System.Drawing.Size(135, 22); + this.GbaGpuViewerMenuItem.Text = "GPU Viewer"; + this.GbaGpuViewerMenuItem.Click += new System.EventHandler(this.GbaGpuViewerMenuItem_Click); + // // PSXSubMenu // this.PSXSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -3442,6 +3472,13 @@ this.ShowMenuContextMenuItem.Text = "Show Menu"; this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click); // + // gBAWithMGBAToolStripMenuItem + // + this.gBAWithMGBAToolStripMenuItem.Name = "gBAWithMGBAToolStripMenuItem"; + this.gBAWithMGBAToolStripMenuItem.Size = new System.Drawing.Size(210, 22); + this.gBAWithMGBAToolStripMenuItem.Text = "GBA with mGBA"; + this.gBAWithMGBAToolStripMenuItem.Click += new System.EventHandler(this.gBAWithMGBAToolStripMenuItem_Click); + // // MainForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -3842,6 +3879,10 @@ private System.Windows.Forms.ToolStripMenuItem quickNESToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem nesHawkToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator34; + private System.Windows.Forms.ToolStripMenuItem GBACoreSelectionSubMenu; + private System.Windows.Forms.ToolStripMenuItem GBAmGBAMenuItem; + private System.Windows.Forms.ToolStripMenuItem GBAVBANextMenuItem; + private System.Windows.Forms.ToolStripMenuItem gBAWithMGBAToolStripMenuItem; } } diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index acda602b64..f68e84e8e9 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -850,6 +850,8 @@ namespace BizHawk.Client.EmuHawk NesInQuickNESMenuItem.Checked = Global.Config.NES_InQuickNES; SnesWithSnes9xMenuItem.Checked = Global.Config.SNES_InSnes9x; + gBAWithMGBAToolStripMenuItem.Checked = Global.Config.GBA_UsemGBA; + SnesWithSnes9xMenuItem.Visible = VersionInfo.DeveloperBuild; } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 561062e37d..8da9777725 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3746,5 +3746,29 @@ namespace BizHawk.Client.EmuHawk Global.Config.NES_InQuickNES = false; FlagNeedsReboot(); } + + private void GBAmGBAMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GBA_UsemGBA = true; + FlagNeedsReboot(); + } + + private void GBAVBANextMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GBA_UsemGBA = false; + FlagNeedsReboot(); + } + + private void GBACoreSelectionSubMenu_DropDownOpened(object sender, EventArgs e) + { + GBAmGBAMenuItem.Checked = Global.Config.GBA_UsemGBA == true; + GBAVBANextMenuItem.Checked = Global.Config.GBA_UsemGBA == false; + } + + private void gBAWithMGBAToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GBA_UsemGBA ^= true; + FlagNeedsReboot(); + } } }