diff --git a/TASVideos.Parsers/Parsers/Bk2.cs b/TASVideos.Parsers/Parsers/Bk2.cs index 117ae5129..78051eb4d 100644 --- a/TASVideos.Parsers/Parsers/Bk2.cs +++ b/TASVideos.Parsers/Parsers/Bk2.cs @@ -13,6 +13,9 @@ internal class Bk2 : ParserBase, IParser private const double NtscNesFramerate = 60.0988138974405; private const double NtscSnesFramerate = 60.0988138974405; private const double PalSnesFramerate = 50.0069789081886; + // mednafen values to match current octoshock + private const double NtscPsxFramerate = 59.94006013870239; + private const double PalPsxFramerate = 50.00028192996979; protected virtual string[] InvalidArchiveEntries => new[] { @@ -180,6 +183,14 @@ public async Task Parse(Stream file, long length) } } + // TASVideos.Core\Services\QueueService.cs line 433 implies we only ever have a list of framerates for cores with framerate overrides, but it doesn't distinguish by core. nymashock has cycle count but octoshock has to rely on mednafen framerates for now. so we override with a constant for octoshock, to prevent picking random wrong values from nymashock overrides + if (core == "octoshock") + { + result.FrameRateOverride = result.Region == RegionType.Pal + ? PalPsxFramerate + : NtscPsxFramerate; + } + if (result.CycleCount.HasValue) { if (ValidClockRates.Contains(clockRate)) diff --git a/TASVideos/Pages/Submissions/Models/SubmissionCreateModel.cs b/TASVideos/Pages/Submissions/Models/SubmissionCreateModel.cs index 143e815e5..927a8406f 100644 --- a/TASVideos/Pages/Submissions/Models/SubmissionCreateModel.cs +++ b/TASVideos/Pages/Submissions/Models/SubmissionCreateModel.cs @@ -8,7 +8,7 @@ public class SubmissionCreateModel { [Display(Name = "Game Version", Description = "Example: USA")] [StringLength(20)] - public string GameVersion { get; set; } = ""; + public string? GameVersion { get; set; } [Required] [Display(Name = "Game Name", Description = "Example: Mega Man 2")] diff --git a/TASVideos/Pages/Systems/EditFramerate.cshtml.cs b/TASVideos/Pages/Systems/EditFramerate.cshtml.cs index 73c701bde..b4a8199ff 100644 --- a/TASVideos/Pages/Systems/EditFramerate.cshtml.cs +++ b/TASVideos/Pages/Systems/EditFramerate.cshtml.cs @@ -81,7 +81,7 @@ public async Task OnPost() await ConcurrentSave( _db, $"FrameRate {displayName} updated.", - $"Unable to updated {displayName} due to an unknown error"); + $"Unable to update {displayName} due to an unknown error"); await _gameSystemService.FlushCache(); return BasePageRedirect("Edit", new { Id = FrameRate.SystemId }); }