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)
|
||||
{
|
||||
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);
|
||||
if (!file.Directory.Exists)
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SubNESHawk;
|
||||
using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||
|
@ -336,6 +337,11 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
movie.HeaderEntries.Add("Is32X", "1");
|
||||
}
|
||||
|
||||
if (Global.Emulator is SubNESHawk)
|
||||
{
|
||||
movie.HeaderEntries.Add("VBlankCount", "0");
|
||||
}
|
||||
|
||||
movie.Core = ((CoreAttribute)Attribute
|
||||
.GetCustomAttribute(Global.Emulator.GetType(), typeof(CoreAttribute)))
|
||||
.CoreName;
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
|||
if (_islag)
|
||||
{
|
||||
_lagcount++;
|
||||
VBL_CNT++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
|
|||
ser.Sync("IsLag", ref _islag);
|
||||
ser.Sync("pass_a_frame", ref pass_a_frame);
|
||||
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;
|
||||
|
||||
// needed for movies to accurately calculate timing
|
||||
public int VBL_CNT;
|
||||
|
||||
[CoreConstructor("NES")]
|
||||
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();
|
||||
|
||||
HardReset();
|
||||
|
||||
VBL_CNT = 0;
|
||||
}
|
||||
|
||||
public void HardReset()
|
||||
|
|
Loading…
Reference in New Issue