SubNEShawk: Add VBL Count to BK2 movie header
This commit is contained in:
parent
c5cfe9e412
commit
74d20ca45c
|
@ -166,6 +166,12 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
protected virtual void Write(string fn, bool backup = false)
|
protected virtual void Write(string fn, bool backup = false)
|
||||||
{
|
{
|
||||||
|
if (Global.Emulator is BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)
|
||||||
|
{
|
||||||
|
var _subnes = (BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)Global.Emulator;
|
||||||
|
Header["VBlankCount"] = _subnes.VBL_CNT.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var file = new FileInfo(fn);
|
var file = new FileInfo(fn);
|
||||||
if (!file.Directory.Exists)
|
if (!file.Directory.Exists)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||||
|
using BizHawk.Emulation.Cores.Nintendo.SubNESHawk;
|
||||||
using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
||||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||||
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||||
|
@ -336,6 +337,11 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
||||||
movie.HeaderEntries.Add("Is32X", "1");
|
movie.HeaderEntries.Add("Is32X", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Global.Emulator is SubNESHawk)
|
||||||
|
{
|
||||||
|
movie.HeaderEntries.Add("VBlankCount", "0");
|
||||||
|
}
|
||||||
|
|
||||||
movie.Core = ((CoreAttribute)Attribute
|
movie.Core = ((CoreAttribute)Attribute
|
||||||
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttribute)))
|
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttribute)))
|
||||||
.CoreName;
|
.CoreName;
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
||||||
if (_islag)
|
if (_islag)
|
||||||
{
|
{
|
||||||
_lagcount++;
|
_lagcount++;
|
||||||
|
VBL_CNT++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
||||||
ser.Sync("IsLag", ref _islag);
|
ser.Sync("IsLag", ref _islag);
|
||||||
ser.Sync("pass_a_frame", ref pass_a_frame);
|
ser.Sync("pass_a_frame", ref pass_a_frame);
|
||||||
ser.Sync("pass_new_input", ref pass_new_input);
|
ser.Sync("pass_new_input", ref pass_new_input);
|
||||||
|
ser.Sync("VBL_CNT", ref VBL_CNT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
||||||
{
|
{
|
||||||
public NES.NES subnes;
|
public NES.NES subnes;
|
||||||
|
|
||||||
|
// needed for movies to accurately calculate timing
|
||||||
|
public int VBL_CNT;
|
||||||
|
|
||||||
[CoreConstructor("NES")]
|
[CoreConstructor("NES")]
|
||||||
public SubNESHawk(CoreComm comm, GameInfo game, byte[] rom, /*string gameDbFn,*/ object settings, object syncSettings)
|
public SubNESHawk(CoreComm comm, GameInfo game, byte[] rom, /*string gameDbFn,*/ object settings, object syncSettings)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +44,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
||||||
SetupMemoryDomains();
|
SetupMemoryDomains();
|
||||||
|
|
||||||
HardReset();
|
HardReset();
|
||||||
|
|
||||||
|
VBL_CNT = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HardReset()
|
public void HardReset()
|
||||||
|
|
Loading…
Reference in New Issue