Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set octoshock fps overrides to mednafen values #1781

Merged
merged 3 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions TASVideos.Parsers/Parsers/Bk2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
private const double NtscNesFramerate = 60.0988138974405;
private const double NtscSnesFramerate = 60.0988138974405;
private const double PalSnesFramerate = 50.0069789081886;
// mednafen values to match current octoshock

Check warning on line 16 in TASVideos.Parsers/Parsers/Bk2.cs

View workflow job for this annotation

GitHub Actions / build

Check warning on line 16 in TASVideos.Parsers/Parsers/Bk2.cs

View workflow job for this annotation

GitHub Actions / build

private const double NtscPsxFramerate = 59.94006013870239;
private const double PalPsxFramerate = 50.00028192996979;

protected virtual string[] InvalidArchiveEntries => new[]
{
Expand Down Expand Up @@ -180,6 +183,14 @@
}
}

// 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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Systems/EditFramerate.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public async Task<IActionResult> 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 });
}
Expand Down
Loading