Rip out some "movies 1.0" hacks
This commit is contained in:
parent
fe7a2b44f8
commit
e96b81d7ab
|
@ -12,6 +12,7 @@ using BizHawk.Emulation.Cores.Sega.Saturn;
|
||||||
using BizHawk.Emulation.Cores.Sony.PSP;
|
using BizHawk.Emulation.Cores.Sony.PSP;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using BizHawk.Emulation.Cores.Nintendo.NES;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
|
@ -41,50 +42,32 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Get Sync settings and put into hack variable
|
var quicknesName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(QuickNES), typeof(CoreAttributes))).CoreName;
|
||||||
_syncSettingsHack = JsonConvert.DeserializeObject(Global.MovieSession.Movie.Header.SyncSettingsJson, Global.Emulator.GetSyncSettings().GetType());
|
|
||||||
|
|
||||||
// movie 1.0 hack: restore sync settings for the only core that fully supported them in movie 1.0
|
if (!record && Global.Emulator.SystemId == "NES") // For NES we need special logic since the movie will drive which core to load
|
||||||
if (!record && Global.Emulator.SystemId == "Coleco")
|
|
||||||
{
|
{
|
||||||
string str = Global.MovieSession.Movie.Header[HeaderKeys.SKIPBIOS];
|
|
||||||
if (!String.IsNullOrWhiteSpace(str))
|
|
||||||
{
|
|
||||||
this._syncSettingsHack = new Emulation.Cores.ColecoVision.ColecoVision.ColecoSyncSettings
|
|
||||||
{
|
|
||||||
SkipBiosIntro = str.ToLower() == "true"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!record && Global.Emulator.SystemId == "NES")
|
|
||||||
{
|
|
||||||
var quicknesName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(QuickNES), typeof(CoreAttributes))).CoreName;
|
|
||||||
|
|
||||||
if (Global.MovieSession.Movie.Header[HeaderKeys.CORE] == quicknesName)
|
if (Global.MovieSession.Movie.Header[HeaderKeys.CORE] == quicknesName)
|
||||||
{
|
{
|
||||||
Global.Config.NES_InQuickNES = true;
|
Global.Config.NES_InQuickNES = true;
|
||||||
var qs = new QuickNES.QuickNESSettings();
|
|
||||||
this._syncSettingsHack = qs;
|
_syncSettingsHack = JsonConvert.DeserializeObject(
|
||||||
|
Global.MovieSession.Movie.Header.SyncSettingsJson,
|
||||||
|
typeof(QuickNES.QuickNESSyncSettings));
|
||||||
}
|
}
|
||||||
else //Else assume Neshawk
|
else
|
||||||
{
|
{
|
||||||
var s = new Emulation.Cores.Nintendo.NES.NES.NESSyncSettings();
|
Global.Config.NES_InQuickNES = false;
|
||||||
s.BoardProperties = new System.Collections.Generic.Dictionary<string, string>(Global.MovieSession.Movie.Header.BoardProperties);
|
|
||||||
this._syncSettingsHack = s;
|
_syncSettingsHack = JsonConvert.DeserializeObject(
|
||||||
|
Global.MovieSession.Movie.Header.SyncSettingsJson,
|
||||||
|
typeof(NES.NESSyncSettings));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!record && Global.Emulator is Emulation.Cores.Consoles.Sega.gpgx.GPGX)
|
|
||||||
{
|
_syncSettingsHack = JsonConvert.DeserializeObject(
|
||||||
// unfortunately, gpgx is being released with movie 1.0
|
Global.MovieSession.Movie.Header.SyncSettingsJson,
|
||||||
// we don't save the control settings there, so hack and assume a particular configuration
|
Global.Emulator.GetSyncSettings().GetType());
|
||||||
var s = new Emulation.Cores.Consoles.Sega.gpgx.GPGX.GPGXSyncSettings
|
|
||||||
{
|
|
||||||
ControlType = Emulation.Cores.Consoles.Sega.gpgx.GPGX.ControlType.Normal,
|
|
||||||
UseSixButton = true,
|
|
||||||
};
|
|
||||||
this._syncSettingsHack = s;
|
|
||||||
}
|
|
||||||
// load the rom in any case
|
|
||||||
LoadRom(GlobalWin.MainForm.CurrentlyOpenRom, true, !record);
|
LoadRom(GlobalWin.MainForm.CurrentlyOpenRom, true, !record);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
@ -993,8 +993,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
!NESControlSettings.NeedsReboot(x.Controls, y.Controls));
|
!NESControlSettings.NeedsReboot(x.Controls, y.Controls));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -454,6 +454,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
||||||
|
|
||||||
QuickNESSettings Settings = QuickNESSettings.GetDefaults();
|
QuickNESSettings Settings = QuickNESSettings.GetDefaults();
|
||||||
|
|
||||||
|
public class QuickNESSyncSettings
|
||||||
|
{
|
||||||
|
public QuickNESSyncSettings Clone()
|
||||||
|
{
|
||||||
|
return new QuickNESSyncSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public object GetSettings()
|
public object GetSettings()
|
||||||
{
|
{
|
||||||
return Settings.Clone();
|
return Settings.Clone();
|
||||||
|
@ -461,7 +469,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
||||||
|
|
||||||
public object GetSyncSettings()
|
public object GetSyncSettings()
|
||||||
{
|
{
|
||||||
return null;
|
return new QuickNESSyncSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool PutSettings(object o)
|
public bool PutSettings(object o)
|
||||||
|
|
Loading…
Reference in New Issue