diff --git a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs index 1b6674b4aa..2d49ad0edc 100644 --- a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs +++ b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs @@ -186,8 +186,8 @@ namespace BizHawk.Client.Common.MovieConversionExtensions movie.EmulatorVersion = VersionInfo.GetEmuVersion(); movie.SystemID = Global.Emulator.SystemId; - var settable = Global.Emulator as ISettable; - if (settable != null) + var settable = new SettingsAdapter(Global.Emulator); + if (settable.HasSyncSettings) { movie.SyncSettingsJson = ConfigService.SaveWithType(settable.GetSyncSettings()); } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 89b7466ebf..aa2f4bf94f 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -1925,8 +1925,8 @@ namespace BizHawk.Client.EmuHawk /// public void PutCoreSettings(object o) { - var settable = Global.Emulator as ISettable; - if (settable != null && settable.PutSettings(o)) + var settable = new SettingsAdapter(Global.Emulator); + if (settable.HasSettings && settable.PutSettings(o)) { FlagNeedsReboot(); } @@ -1937,12 +1937,12 @@ namespace BizHawk.Client.EmuHawk /// public void PutCoreSyncSettings(object o) { - var settable = Global.Emulator as ISettable; + var settable = new SettingsAdapter(Global.Emulator); if (Global.MovieSession.Movie.IsActive) { GlobalWin.OSD.AddMessage("Attempt to change sync-relevant settings while recording BLOCKED."); } - else if (settable != null && settable.PutSyncSettings(o)) + else if (settable.HasSyncSettings && settable.PutSyncSettings(o)) { FlagNeedsReboot(); } @@ -3357,16 +3357,17 @@ namespace BizHawk.Client.EmuHawk { // save settings object var t = Global.Emulator.GetType(); - var settable = Global.Emulator as ISettable; - if (settable == null) - return; + var settable = new SettingsAdapter(Global.Emulator); - Global.Config.PutCoreSettings(settable.GetSettings(), t); - - // don't trample config with loaded-from-movie settings - if (!Global.MovieSession.Movie.IsActive) + if (settable.HasSettings) { - Global.Config.PutCoreSyncSettings(settable.GetSyncSettings(), t); + Global.Config.PutCoreSettings(settable.GetSettings(), t); + } + + if (settable.HasSyncSettings && !Global.MovieSession.Movie.IsActive) + { + // don't trample config with loaded-from-movie settings + Global.Config.PutCoreSyncSettings(settable.GetSyncSettings(), t); } } diff --git a/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs b/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs index 674f9e96b2..4c1a738a29 100644 --- a/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs +++ b/BizHawk.Client.EmuHawk/config/GenericCoreConfig.cs @@ -22,13 +22,12 @@ namespace BizHawk.Client.EmuHawk { InitializeComponent(); - var settable = Global.Emulator as ISettable; + var settable = new SettingsAdapter(Global.Emulator); - if (settable != null) - { + if (settable.HasSettings) s = settable.GetSettings(); + if (settable.HasSyncSettings) ss = settable.GetSyncSettings(); - } if (s != null) propertyGrid1.SelectedObject = s; @@ -45,8 +44,8 @@ namespace BizHawk.Client.EmuHawk private void button1_Click(object sender, EventArgs e) { - var settable = Global.Emulator as ISettable; - if (s != null && settable != null) + var settable = new SettingsAdapter(Global.Emulator); + if (s != null && settable.HasSettings) { settable.PutSettings(s); } diff --git a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs index fd435d88ba..db540e2c24 100644 --- a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs +++ b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs @@ -355,7 +355,13 @@ namespace BizHawk.Client.EmuHawk where TEmulator : IEmulator { // should we complain if we get a successful object from the config file, but it is the wrong type? - return ((ISettable)Global.Emulator).GetSyncSettings() as TSetting + + object fromcore = null; + var settable = new SettingsAdapter(Global.Emulator); + if (settable.HasSyncSettings) + fromcore = settable.GetSyncSettings(); + + return fromcore as TSetting ?? Global.Config.GetCoreSyncSettings() as TSetting ?? new TSetting(); // guaranteed to give sensible defaults } @@ -365,7 +371,13 @@ namespace BizHawk.Client.EmuHawk where TEmulator : IEmulator { // should we complain if we get a successful object from the config file, but it is the wrong type? - return ((ISettable)Global.Emulator).GetSettings() as TSetting + + object fromcore = null; + var settable = new SettingsAdapter(Global.Emulator); + if (settable.HasSettings) + fromcore = settable.GetSettings(); + + return fromcore as TSetting ?? Global.Config.GetCoreSettings() as TSetting ?? new TSetting(); // guaranteed to give sensible defaults } @@ -375,7 +387,8 @@ namespace BizHawk.Client.EmuHawk { if (Global.Emulator is TEmulator) { - ((ISettable)Global.Emulator).PutSettings(o); + var settable = new SettingsAdapter(Global.Emulator); + settable.PutSettings(o); } else { diff --git a/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj b/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj index d06e81c69b..dd5050a0f8 100644 --- a/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj +++ b/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj @@ -63,6 +63,7 @@ + diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index ccc8235fe4..88218a53b5 100644 --- a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -144,52 +144,5 @@ namespace BizHawk.Emulation.Common void SetCpuRegister(string register, int value); } - public interface ISettable : IEmulator - { - object GetSettings(); - object GetSyncSettings(); - bool PutSettings(object o); - bool PutSyncSettings(object o); - } - - public interface ISettable : ISettable - { - // in addition to these methods, it's expected that the constructor or Load() method - // will take a Settings and SyncSettings object to set the initial state of the core - // (if those are null, default settings are to be used) - - /// - /// get the current core settings, excepting movie settings. should be a clone of the active in-core object. - /// VERY IMPORTANT: changes to the object returned by this function SHOULD NOT have any effect on emulation - /// (unless the object is later passed to PutSettings) - /// - /// a json-serializable object - new TSettings GetSettings(); - - /// - /// get the current core settings that affect movie sync. these go in movie 2.0 files, so don't make the JSON too extravagant, please - /// should be a clone of the active in-core object. - /// VERY IMPORTANT: changes to the object returned by this function MUST NOT have any effect on emulation - /// (unless the object is later passed to PutSyncSettings) - /// - /// a json-serializable object - new TSync GetSyncSettings(); - - /// - /// change the core settings, excepting movie settings - /// - /// an object of the same type as the return for GetSettings - /// true if a core reboot will be required to make the changes effective - new bool PutSettings(TSettings o); - - /// - /// changes the movie-sync relevant settings. THIS SHOULD NEVER BE CALLED WHILE RECORDING - /// if it is called while recording, the core need not guarantee continued determinism - /// - /// an object of the same type as the return for GetSyncSettings - /// true if a core reboot will be required to make the changes effective - new bool PutSyncSettings(TSync o); - } - public enum DisplayType { NTSC, PAL, DENDY } } diff --git a/BizHawk.Emulation.Common/Interfaces/ISettable.cs b/BizHawk.Emulation.Common/Interfaces/ISettable.cs new file mode 100644 index 0000000000..55ec10a41f --- /dev/null +++ b/BizHawk.Emulation.Common/Interfaces/ISettable.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Reflection; + +namespace BizHawk.Emulation.Common +{ + public class SettingsAdapter + { + public SettingsAdapter(IEmulator e) + { + emu = e; + + Type impl = e.GetType().GetInterfaces() + .Where(t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof(ISettable<,>)).FirstOrDefault(); + if (impl == null) + { + HasSettings = false; + HasSyncSettings = false; + } + else + { + var tt = impl.GetGenericArguments(); + settingtype = tt[0]; + synctype = tt[1]; + HasSettings = settingtype != typeof(object); // object is used for a placeholder where an emu doesn't have both s and ss + HasSyncSettings = synctype != typeof(object); + + if (HasSettings) + { + gets = impl.GetMethod("GetSettings"); + puts = impl.GetMethod("PutSettings"); + } + if (HasSyncSettings) + { + getss = impl.GetMethod("GetSyncSettings"); + putss = impl.GetMethod("PutSyncSettings"); + } + } + } + + private IEmulator emu; + + public bool HasSettings { get; private set; } + public bool HasSyncSettings { get; private set; } + + private object[] tmp1 = new object[1]; + private object[] tmp0 = new object[0]; + + private Type settingtype; + private Type synctype; + + private MethodInfo gets; + private MethodInfo puts; + private MethodInfo getss; + private MethodInfo putss; + + public object GetSettings() + { + if (!HasSettings) + throw new InvalidOperationException(); + return gets.Invoke(emu, tmp0); + } + + public object GetSyncSettings() + { + if (!HasSyncSettings) + throw new InvalidOperationException(); + return (getss.Invoke(emu, tmp0)); + } + + public bool PutSettings(object o) + { + if (!HasSettings) + throw new InvalidOperationException(); + tmp1[0] = o; + return (bool)puts.Invoke(emu, tmp1); + } + + public bool PutSyncSettings(object o) + { + if (!HasSyncSettings) + throw new InvalidOperationException(); + tmp1[0] = o; + return (bool)putss.Invoke(emu, tmp1); + } + } + + public interface ISettable : IEmulator + { + // in addition to these methods, it's expected that the constructor or Load() method + // will take a Settings and SyncSettings object to set the initial state of the core + // (if those are null, default settings are to be used) + + /// + /// get the current core settings, excepting movie settings. should be a clone of the active in-core object. + /// VERY IMPORTANT: changes to the object returned by this function SHOULD NOT have any effect on emulation + /// (unless the object is later passed to PutSettings) + /// + /// a json-serializable object + TSettings GetSettings(); + + /// + /// get the current core settings that affect movie sync. these go in movie 2.0 files, so don't make the JSON too extravagant, please + /// should be a clone of the active in-core object. + /// VERY IMPORTANT: changes to the object returned by this function MUST NOT have any effect on emulation + /// (unless the object is later passed to PutSyncSettings) + /// + /// a json-serializable object + TSync GetSyncSettings(); + + /// + /// change the core settings, excepting movie settings + /// + /// an object of the same type as the return for GetSettings + /// true if a core reboot will be required to make the changes effective + bool PutSettings(TSettings o); + + /// + /// changes the movie-sync relevant settings. THIS SHOULD NEVER BE CALLED WHILE RECORDING + /// if it is called while recording, the core need not guarantee continued determinism + /// + /// an object of the same type as the return for GetSyncSettings + /// true if a core reboot will be required to make the changes effective + bool PutSyncSettings(TSync o); + } +} diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.cs b/BizHawk.Emulation.Cores/Calculator/TI83.cs index e322c92a3a..68f3dcac4b 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.cs @@ -1005,15 +1005,6 @@ namespace BizHawk.Emulation.Cores.Calculators return false; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) { - return PutSettings((TI83Settings)o); - } - public object GetSyncSettings() { return null; } public bool PutSyncSettings(object o) { return false; } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs index afacfd402e..4723711cf2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Settings.cs @@ -37,26 +37,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 return false; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((A2600Settings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((A2600SyncSettings)o); - } - public class A2600Settings { [JsonIgnore] diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs index 7269111594..d19239d851 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs @@ -248,16 +248,6 @@ namespace BizHawk.Emulation.Cores.ColecoVision return ret; } - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSettings((ColecoSyncSettings)o); - } - ColecoSyncSettings SyncSettings; public class ColecoSyncSettings diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index c3b25af937..62107f83e9 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -24,7 +24,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { CoreComm = comm; byte[] biosfile = CoreComm.CoreFileProvider.GetFirmware("GBA", "Bios", true, "GBA bios file is mandatory."); - if (file.Length > 32 * 1024 * 1024) throw new ArgumentException("ROM is too big to be a GBA ROM!"); if (biosfile.Length != 16 * 1024) @@ -330,7 +329,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA mm.Add(MemoryDomain.FromIntPtr("VRAM", 96 * 1024, l, s.vram)); mm.Add(MemoryDomain.FromIntPtr("OAM", 1024, l, s.oam)); mm.Add(MemoryDomain.FromIntPtr("ROM", 32 * 1024 * 1024, l, s.rom)); - + mm.Add(new MemoryDomain("BUS", 0x10000000, l, delegate(int addr) { @@ -420,26 +419,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings(o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((SyncSettings)o); - } - public class SyncSettings { [DisplayName("Skip BIOS")] diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index a082c54fee..05b583969a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -1006,26 +1006,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((GambatteSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((GambatteSyncSettings)o); - } - public class GambatteSettings { private static readonly int[] DefaultPalette = new[] diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index ca6445ee98..16c6dd09ed 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -542,26 +542,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy return L.PutSyncSettings(o.L) || R.PutSyncSettings(o.R); } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((GambatteLinkSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((GambatteLinkSyncSettings)o); - } - public class GambatteLinkSettings { public Gameboy.GambatteSettings L; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs index 8ee0a0e4bd..c1eed87a5f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs @@ -505,26 +505,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 return true; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((N64Settings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((N64SyncSettings)o); - } - private void SetControllerButtons() { ControllerDefinition.BoolButtons.Clear(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 5fa1d60583..05e2ad6021 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -967,26 +967,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((NESSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((NESSyncSettings)o); - } - public class NESSettings { public bool AllowMoreThanEightSprites = false; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index b2d43d0f09..3e730452f5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -539,26 +539,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES return false; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((QuickNESSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((QuickNESSyncSettings)o); - } - #endregion public void Dispose() diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index ba1656e24c..3832666896 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -1201,26 +1201,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((SnesSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((SnesSyncSettings)o); - } - public class SnesSettings { public bool ShowBG1_0 = true; diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 33722a5046..04dbe04478 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -591,26 +591,6 @@ namespace BizHawk.Emulation.Cores.PCEngine return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((PCESettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((PCESyncSettings)o); - } - public class PCESettings { public bool ShowBG1 = true; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index 6944df0566..fbe81b7982 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -609,26 +609,6 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((SMSSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((SMSSyncSettings)o); - } - public SMSSettings Settings; public SMSSyncSettings SyncSettings; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs index 7bf0bd607a..d4d47a9b13 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs @@ -724,26 +724,6 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((object)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((SaturnSyncSettings)o); - } - public class SaturnSyncSettings { [DisplayName("Open GL Mode")] diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index d23a7ebc65..74d5930880 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -802,26 +802,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((GPGXSettings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((GPGXSyncSettings)o); - } - public class GPGXSettings { [DisplayName("Background Layer A")] diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index 920842140b..101d1c79dd 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -522,26 +522,6 @@ namespace BizHawk.Emulation.Cores.WonderSwan return ret; } - object ISettable.GetSettings() - { - return GetSettings(); - } - - bool ISettable.PutSettings(object o) - { - return PutSettings((Settings)o); - } - - object ISettable.GetSyncSettings() - { - return GetSyncSettings(); - } - - bool ISettable.PutSyncSettings(object o) - { - return PutSyncSettings((SyncSettings)o); - } - #endregion #region IVideoProvider