diff --git a/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs b/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs index c7d63a4c8d..05bcdd9a24 100644 --- a/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs +++ b/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs @@ -166,11 +166,16 @@ namespace BizHawk.Client.Common protected virtual void Write(string fn, bool backup = false) { - if (Global.Emulator is BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk) + if (Global.Emulator is Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk) { - var _subnes = (BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)Global.Emulator; + var _subnes = (Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)Global.Emulator; Header["VBlankCount"] = _subnes.VBL_CNT.ToString(); } + else if (Global.Emulator is Emulation.Cores.Nintendo.Gameboy.Gameboy) + { + var _gameboy = (Emulation.Cores.Nintendo.Gameboy.Gameboy)Global.Emulator; + Header["CycleCount"] = _gameboy.CycleCount.ToString(); + } var file = new FileInfo(fn); if (!file.Directory.Exists) diff --git a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs index 0735b33bf2..357487cc0a 100644 --- a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs +++ b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs @@ -335,6 +335,11 @@ namespace BizHawk.Client.Common.MovieConversionExtensions movie.HeaderEntries.Add("IsCGBMode", "1"); } + if (Global.Emulator is Gameboy) + { + movie.HeaderEntries.Add("CycleCount", "0"); + } + if (Global.Emulator is SMS && ((SMS) Global.Emulator).IsSG1000) { movie.HeaderEntries.Add("IsSGMode", "1"); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 3680f92fb2..c32dcb52fb 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -268,13 +268,16 @@ namespace BizHawk.Client.EmuHawk { _autosaveTimer.Stop(); - if (Emulator is BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk - && Emulator.Frame != CurrentTasMovie.InputLogLength - 1) + if (Emulator.Frame != CurrentTasMovie.InputLogLength - 1) { - var result = MessageBox.Show("This core requires emulation to be on the last frame when writing the movie, otherwise movie length may appear incorrect.\nSeek there?", "Export movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); - if (result == DialogResult.OK) + if (Emulator is Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk + || Emulator is Emulation.Cores.Nintendo.Gameboy.Gameboy) { - GoToFrame(CurrentTasMovie.InputLogLength - 1); + var result = MessageBox.Show("This core requires emulation to be on the last frame when writing the movie, otherwise movie length may appear incorrect.\nSeek there?", "Export movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + if (result == DialogResult.OK) + { + GoToFrame(CurrentTasMovie.InputLogLength - 1); + } } }