Skip to content

Commit

Permalink
Work around Brothers in Arms speed issue via compat hack (#18513)
Browse files Browse the repository at this point in the history
Co-authored-by: Henrik Rydgård <[email protected]>
  • Loading branch information
LunaMoo and hrydgard authored Sep 18, 2024
1 parent 0bce42c commit 864a4b3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Core/Compatibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "LoadCLUTFromCurrentFrameOnly", &flags_.LoadCLUTFromCurrentFrameOnly);
CheckSetting(iniFile, gameID, "ForceUMDReadSpeed", &flags_.ForceUMDReadSpeed);
CheckSetting(iniFile, gameID, "AllowDelayedReadbacks", &flags_.AllowDelayedReadbacks);
CheckSetting(iniFile, gameID, "KernelGetSystemTimeLowEatMoreCycles", &flags_.KernelGetSystemTimeLowEatMoreCycles);
CheckSetting(iniFile, gameID, "TacticsOgreEliminateDebugReadback", &flags_.TacticsOgreEliminateDebugReadback);
CheckSetting(iniFile, gameID, "FramebufferAllowLargeVerticalOffset", &flags_.FramebufferAllowLargeVerticalOffset);
CheckSetting(iniFile, gameID, "DisableMemcpySlicing", &flags_.DisableMemcpySlicing);
Expand Down
1 change: 1 addition & 0 deletions Core/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct CompatFlags {
bool LoadCLUTFromCurrentFrameOnly;
bool ForceUMDReadSpeed;
bool AllowDelayedReadbacks;
bool KernelGetSystemTimeLowEatMoreCycles;
bool TacticsOgreEliminateDebugReadback;
bool FramebufferAllowLargeVerticalOffset;
bool DisableMemcpySlicing;
Expand Down
2 changes: 2 additions & 0 deletions Core/HLE/sceKernelTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ u32 sceKernelGetSystemTimeLow()
u64 t = CoreTiming::GetGlobalTimeUs();
VERBOSE_LOG(Log::sceKernel,"%08x=sceKernelGetSystemTimeLow()",(u32)t);
hleEatCycles(165);
if (PSP_CoreParameter().compat.flags().KernelGetSystemTimeLowEatMoreCycles)
hleEatCycles(70000);
hleReSchedule("system time");
return (u32)t;
}
Expand Down
6 changes: 6 additions & 0 deletions assets/compat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ ULJM06365 = true
# ULJM05036 = true
# ULUS10044 = true

[KernelGetSystemTimeLowEatMoreCycles]
# Brothers in Arms: D-Day works around weird FPS(falling under 100% even on powerful hardware) as well as it's animation speed #18509
# recommend to OC PSP CPU to at least twice as much as real PSP to get constant 60 fps
ULES00608 = true
ULUS10193 = true

[DrawSyncInstant]
# Bizarre timing issue in Sakura-sou no Pet na Kanojo, see issue #15224. Note that an instant DrawSync is not logical.
NPJH50745 = true
Expand Down

0 comments on commit 864a4b3

Please sign in to comment.