From f8a4524df79e1b2f2a234fcb91dcf14c80f5ba2c Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:25:34 -0700 Subject: [PATCH] add in missing platform framerates, add in Jaguar CD iding for movie file, fix aspect ratio for jaguar --- .../movie/MovieConversionExtensions.cs | 6 ++++++ src/BizHawk.Client.Common/movie/PlatformFrameRates.cs | 7 ++++++- .../Consoles/Atari/jaguar/VirtualJaguar.cs | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs b/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs index 8a0e921d14..c1cdaea5e1 100644 --- a/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs +++ b/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs @@ -5,6 +5,7 @@ using System.Linq; using BizHawk.Common; using BizHawk.Common.PathExtensions; using BizHawk.Emulation.Common; +using BizHawk.Emulation.Cores.Atari.Jaguar; using BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy; using BizHawk.Emulation.Cores.Consoles.Nintendo.NDS; using BizHawk.Emulation.Cores.Consoles.Sega.gpgx; @@ -279,6 +280,11 @@ namespace BizHawk.Client.Common movie.HeaderEntries.Add("Is32X", "1"); } + if (emulator is VirtualJaguar jag && jag.IsJaguarCD) + { + movie.HeaderEntries.Add("IsJaguarCD", "1"); + } + if (emulator is ICycleTiming) { movie.HeaderEntries.Add(HeaderKeys.CycleCount, "0"); diff --git a/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs b/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs index 6e87adc1bb..2ca76538af 100644 --- a/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs +++ b/src/BizHawk.Client.Common/movie/PlatformFrameRates.cs @@ -43,6 +43,9 @@ namespace BizHawk.Client.Common ["GEN"] = 53693175 / (3420.0 * 262), ["GEN_PAL"] = 53203424 / (3420.0 * 313), + ["Jaguar"] = 60, + ["Jaguar_PAL"] = 50, + // while the number of scanlines per frame is software controlled and variable, we // enforce exactly 262 (NTSC) 312 (PAL) per reference time frame ["A26"] = 315000000.0 / 88.0 / 262.0 / 228.0, // 59.922751013550531429197560173856 @@ -71,7 +74,9 @@ namespace BizHawk.Client.Common ["UZE"] = 60.016319939602, ["VEC"] = 50, ["O2"] = 60, - ["O2_PAL"] = 50 + ["O2_PAL"] = 50, + + ["TIC80"] = 60, }; public static double GetFrameRate(string systemId, bool pal) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.cs index 51c74e1302..6c426c4890 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.cs @@ -250,6 +250,8 @@ namespace BizHawk.Emulation.Cores.Atari.Jaguar public DisplayType Region { get; } + public override int VirtualHeight => (int)Math.Ceiling(BufferHeight * (BufferWidth / 326.0)); + public bool IsJaguarCD => _cd != null; public bool DriveLightEnabled => IsJaguarCD; public bool DriveLightOn { get; private set; }