diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs index 938dde3b3c..41573593af 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs @@ -72,23 +72,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk public enum ControllerType { - Default, Tilt } [JsonIgnore] private ControllerType _GBController; - [DisplayName("Controller")] - [Description("Select Controller Type")] - [DefaultValue(ControllerType.Default)] + [DisplayName("Tilt Controls")] + [Description("Choose Tilt Control mode, when Applicable (MBC7 games)")] + [DefaultValue(ControllerType.Tilt)] public ControllerType GBController { get => _GBController; set { - if (value == ControllerType.Default) { Port1 = GBHawkControllerDeck.DefaultControllerName; } - else { Port1 = "Gameboy Controller + Tilt"; } + if (value == ControllerType.Tilt) { Port1 = "Gameboy Controller + Tilt"; } _GBController = value; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs index 5a3de537b9..42d2450274 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs @@ -117,7 +117,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk _settings = (GBSettings)settings ?? new GBSettings(); _syncSettings = (GBSyncSettings)syncSettings ?? new GBSyncSettings(); - _controllerDeck = new GBHawkControllerDeck(_syncSettings.Port1); byte[] Bios = null; @@ -182,9 +181,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk Console.WriteLine("MD5: " + rom.HashMD5(0, rom.Length)); Console.WriteLine("SHA1: " + rom.HashSHA1(0, rom.Length)); _rom = rom; - Setup_Mapper(); + string mppr = Setup_Mapper(); if (cart_RAM != null) { cart_RAM_vbls = new byte[cart_RAM.Length]; } + if (mppr == "MBC7") + { + _controllerDeck = new GBHawkControllerDeck(_syncSettings.Port1); + } + else + { + _controllerDeck = new GBHawkControllerDeck(GBHawkControllerDeck.DefaultControllerName); + } + + + timer.Core = this; audio.Core = this; ppu.Core = this; @@ -323,7 +333,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } } - private void Setup_Mapper() + public string Setup_Mapper() { // setup up mapper based on header entry string mppr; @@ -548,6 +558,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk // currently no date / time input for TAMA5 } + + return mppr; } } }