remove the extra ISettable (non-generic argument) interface and corresponding crud from cores, and replace with a shim class
This commit is contained in:
parent
549b948ffd
commit
dc2ca1f010
|
@ -186,8 +186,8 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
||||||
movie.EmulatorVersion = VersionInfo.GetEmuVersion();
|
movie.EmulatorVersion = VersionInfo.GetEmuVersion();
|
||||||
movie.SystemID = Global.Emulator.SystemId;
|
movie.SystemID = Global.Emulator.SystemId;
|
||||||
|
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
if (settable != null)
|
if (settable.HasSyncSettings)
|
||||||
{
|
{
|
||||||
movie.SyncSettingsJson = ConfigService.SaveWithType(settable.GetSyncSettings());
|
movie.SyncSettingsJson = ConfigService.SaveWithType(settable.GetSyncSettings());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1925,8 +1925,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void PutCoreSettings(object o)
|
public void PutCoreSettings(object o)
|
||||||
{
|
{
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
if (settable != null && settable.PutSettings(o))
|
if (settable.HasSettings && settable.PutSettings(o))
|
||||||
{
|
{
|
||||||
FlagNeedsReboot();
|
FlagNeedsReboot();
|
||||||
}
|
}
|
||||||
|
@ -1937,12 +1937,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void PutCoreSyncSettings(object o)
|
public void PutCoreSyncSettings(object o)
|
||||||
{
|
{
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
if (Global.MovieSession.Movie.IsActive)
|
if (Global.MovieSession.Movie.IsActive)
|
||||||
{
|
{
|
||||||
GlobalWin.OSD.AddMessage("Attempt to change sync-relevant settings while recording BLOCKED.");
|
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();
|
FlagNeedsReboot();
|
||||||
}
|
}
|
||||||
|
@ -3357,16 +3357,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
// save settings object
|
// save settings object
|
||||||
var t = Global.Emulator.GetType();
|
var t = Global.Emulator.GetType();
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
if (settable == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Global.Config.PutCoreSettings(settable.GetSettings(), t);
|
if (settable.HasSettings)
|
||||||
|
|
||||||
// don't trample config with loaded-from-movie settings
|
|
||||||
if (!Global.MovieSession.Movie.IsActive)
|
|
||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
|
|
||||||
if (settable != null)
|
if (settable.HasSettings)
|
||||||
{
|
|
||||||
s = settable.GetSettings();
|
s = settable.GetSettings();
|
||||||
|
if (settable.HasSyncSettings)
|
||||||
ss = settable.GetSyncSettings();
|
ss = settable.GetSyncSettings();
|
||||||
}
|
|
||||||
|
|
||||||
if (s != null)
|
if (s != null)
|
||||||
propertyGrid1.SelectedObject = s;
|
propertyGrid1.SelectedObject = s;
|
||||||
|
@ -45,8 +44,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var settable = Global.Emulator as ISettable;
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
if (s != null && settable != null)
|
if (s != null && settable.HasSettings)
|
||||||
{
|
{
|
||||||
settable.PutSettings(s);
|
settable.PutSettings(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,7 +355,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
where TEmulator : IEmulator
|
where TEmulator : IEmulator
|
||||||
{
|
{
|
||||||
// should we complain if we get a successful object from the config file, but it is the wrong type?
|
// 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<TEmulator>() as TSetting
|
?? Global.Config.GetCoreSyncSettings<TEmulator>() as TSetting
|
||||||
?? new TSetting(); // guaranteed to give sensible defaults
|
?? new TSetting(); // guaranteed to give sensible defaults
|
||||||
}
|
}
|
||||||
|
@ -365,7 +371,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
where TEmulator : IEmulator
|
where TEmulator : IEmulator
|
||||||
{
|
{
|
||||||
// should we complain if we get a successful object from the config file, but it is the wrong type?
|
// 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<TEmulator>() as TSetting
|
?? Global.Config.GetCoreSettings<TEmulator>() as TSetting
|
||||||
?? new TSetting(); // guaranteed to give sensible defaults
|
?? new TSetting(); // guaranteed to give sensible defaults
|
||||||
}
|
}
|
||||||
|
@ -375,7 +387,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (Global.Emulator is TEmulator)
|
if (Global.Emulator is TEmulator)
|
||||||
{
|
{
|
||||||
((ISettable)Global.Emulator).PutSettings(o);
|
var settable = new SettingsAdapter(Global.Emulator);
|
||||||
|
settable.PutSettings(o);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
<Compile Include="Interfaces\ICoreFileProvider.cs" />
|
<Compile Include="Interfaces\ICoreFileProvider.cs" />
|
||||||
<Compile Include="Interfaces\IEmulator.cs" />
|
<Compile Include="Interfaces\IEmulator.cs" />
|
||||||
<Compile Include="Interfaces\IMemoryDomains.cs" />
|
<Compile Include="Interfaces\IMemoryDomains.cs" />
|
||||||
|
<Compile Include="Interfaces\ISettable.cs" />
|
||||||
<Compile Include="Interfaces\ISoundProvider.cs" />
|
<Compile Include="Interfaces\ISoundProvider.cs" />
|
||||||
<Compile Include="Interfaces\ISyncSoundProvider.cs" />
|
<Compile Include="Interfaces\ISyncSoundProvider.cs" />
|
||||||
<Compile Include="Interfaces\IVideoProvider.cs" />
|
<Compile Include="Interfaces\IVideoProvider.cs" />
|
||||||
|
|
|
@ -144,52 +144,5 @@ namespace BizHawk.Emulation.Common
|
||||||
void SetCpuRegister(string register, int value);
|
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<TSettings, TSync> : 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)
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 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)
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>a json-serializable object</returns>
|
|
||||||
new TSettings GetSettings();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 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)
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>a json-serializable object</returns>
|
|
||||||
new TSync GetSyncSettings();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// change the core settings, excepting movie settings
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="o">an object of the same type as the return for GetSettings</param>
|
|
||||||
/// <returns>true if a core reboot will be required to make the changes effective</returns>
|
|
||||||
new bool PutSettings(TSettings o);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 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
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="o">an object of the same type as the return for GetSyncSettings</param>
|
|
||||||
/// <returns>true if a core reboot will be required to make the changes effective</returns>
|
|
||||||
new bool PutSyncSettings(TSync o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum DisplayType { NTSC, PAL, DENDY }
|
public enum DisplayType { NTSC, PAL, DENDY }
|
||||||
}
|
}
|
||||||
|
|
|
@ -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<TSettings, TSync> : 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)
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>a json-serializable object</returns>
|
||||||
|
TSettings GetSettings();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>a json-serializable object</returns>
|
||||||
|
TSync GetSyncSettings();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// change the core settings, excepting movie settings
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="o">an object of the same type as the return for GetSettings</param>
|
||||||
|
/// <returns>true if a core reboot will be required to make the changes effective</returns>
|
||||||
|
bool PutSettings(TSettings o);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="o">an object of the same type as the return for GetSyncSettings</param>
|
||||||
|
/// <returns>true if a core reboot will be required to make the changes effective</returns>
|
||||||
|
bool PutSyncSettings(TSync o);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1005,15 +1005,6 @@ namespace BizHawk.Emulation.Cores.Calculators
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
object ISettable.GetSettings()
|
|
||||||
{
|
|
||||||
return GetSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ISettable.PutSettings(object o) {
|
|
||||||
return PutSettings((TI83Settings)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object GetSyncSettings() { return null; }
|
public object GetSyncSettings() { return null; }
|
||||||
public bool PutSyncSettings(object o) { return false; }
|
public bool PutSyncSettings(object o) { return false; }
|
||||||
|
|
||||||
|
|
|
@ -37,26 +37,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
||||||
return false;
|
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
|
public class A2600Settings
|
||||||
{
|
{
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
|
@ -248,16 +248,6 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
object ISettable.GetSyncSettings()
|
|
||||||
{
|
|
||||||
return GetSyncSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ISettable.PutSyncSettings(object o)
|
|
||||||
{
|
|
||||||
return PutSettings((ColecoSyncSettings)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
ColecoSyncSettings SyncSettings;
|
ColecoSyncSettings SyncSettings;
|
||||||
|
|
||||||
public class ColecoSyncSettings
|
public class ColecoSyncSettings
|
||||||
|
|
|
@ -24,7 +24,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||||
{
|
{
|
||||||
CoreComm = comm;
|
CoreComm = comm;
|
||||||
byte[] biosfile = CoreComm.CoreFileProvider.GetFirmware("GBA", "Bios", true, "GBA bios file is mandatory.");
|
byte[] biosfile = CoreComm.CoreFileProvider.GetFirmware("GBA", "Bios", true, "GBA bios file is mandatory.");
|
||||||
|
|
||||||
if (file.Length > 32 * 1024 * 1024)
|
if (file.Length > 32 * 1024 * 1024)
|
||||||
throw new ArgumentException("ROM is too big to be a GBA ROM!");
|
throw new ArgumentException("ROM is too big to be a GBA ROM!");
|
||||||
if (biosfile.Length != 16 * 1024)
|
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("VRAM", 96 * 1024, l, s.vram));
|
||||||
mm.Add(MemoryDomain.FromIntPtr("OAM", 1024, l, s.oam));
|
mm.Add(MemoryDomain.FromIntPtr("OAM", 1024, l, s.oam));
|
||||||
mm.Add(MemoryDomain.FromIntPtr("ROM", 32 * 1024 * 1024, l, s.rom));
|
mm.Add(MemoryDomain.FromIntPtr("ROM", 32 * 1024 * 1024, l, s.rom));
|
||||||
|
|
||||||
mm.Add(new MemoryDomain("BUS", 0x10000000, l,
|
mm.Add(new MemoryDomain("BUS", 0x10000000, l,
|
||||||
delegate(int addr)
|
delegate(int addr)
|
||||||
{
|
{
|
||||||
|
@ -420,26 +419,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||||
return ret;
|
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
|
public class SyncSettings
|
||||||
{
|
{
|
||||||
[DisplayName("Skip BIOS")]
|
[DisplayName("Skip BIOS")]
|
||||||
|
|
|
@ -1006,26 +1006,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
return ret;
|
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
|
public class GambatteSettings
|
||||||
{
|
{
|
||||||
private static readonly int[] DefaultPalette = new[]
|
private static readonly int[] DefaultPalette = new[]
|
||||||
|
|
|
@ -542,26 +542,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
return L.PutSyncSettings(o.L) || R.PutSyncSettings(o.R);
|
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 class GambatteLinkSettings
|
||||||
{
|
{
|
||||||
public Gameboy.GambatteSettings L;
|
public Gameboy.GambatteSettings L;
|
||||||
|
|
|
@ -505,26 +505,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
return true;
|
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()
|
private void SetControllerButtons()
|
||||||
{
|
{
|
||||||
ControllerDefinition.BoolButtons.Clear();
|
ControllerDefinition.BoolButtons.Clear();
|
||||||
|
|
|
@ -967,26 +967,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
return ret;
|
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 class NESSettings
|
||||||
{
|
{
|
||||||
public bool AllowMoreThanEightSprites = false;
|
public bool AllowMoreThanEightSprites = false;
|
||||||
|
|
|
@ -539,26 +539,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
||||||
return false;
|
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
|
#endregion
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
@ -1201,26 +1201,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
return ret;
|
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 class SnesSettings
|
||||||
{
|
{
|
||||||
public bool ShowBG1_0 = true;
|
public bool ShowBG1_0 = true;
|
||||||
|
|
|
@ -591,26 +591,6 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
||||||
return ret;
|
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 class PCESettings
|
||||||
{
|
{
|
||||||
public bool ShowBG1 = true;
|
public bool ShowBG1 = true;
|
||||||
|
|
|
@ -609,26 +609,6 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
return ret;
|
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 SMSSettings Settings;
|
||||||
public SMSSyncSettings SyncSettings;
|
public SMSSyncSettings SyncSettings;
|
||||||
|
|
||||||
|
|
|
@ -724,26 +724,6 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
|
||||||
return ret;
|
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
|
public class SaturnSyncSettings
|
||||||
{
|
{
|
||||||
[DisplayName("Open GL Mode")]
|
[DisplayName("Open GL Mode")]
|
||||||
|
|
|
@ -802,26 +802,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
||||||
return ret;
|
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
|
public class GPGXSettings
|
||||||
{
|
{
|
||||||
[DisplayName("Background Layer A")]
|
[DisplayName("Background Layer A")]
|
||||||
|
|
|
@ -522,26 +522,6 @@ namespace BizHawk.Emulation.Cores.WonderSwan
|
||||||
return ret;
|
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
|
#endregion
|
||||||
|
|
||||||
#region IVideoProvider
|
#region IVideoProvider
|
||||||
|
|
Loading…
Reference in New Issue