From 437b292b7d0a76050eafe5f214c56ce33ecf301c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 11 Dec 2022 10:03:27 +0100 Subject: [PATCH] Tactics Ogre: Remove a redundant readback operation it performs a lot. --- Core/Compatibility.cpp | 1 + Core/Compatibility.h | 1 + GPU/Common/FramebufferManagerCommon.cpp | 4 ++++ assets/compat.ini | 8 ++++++++ 4 files changed, 14 insertions(+) diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index 5e2c1205ddd3..dd29f9ea2164 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -135,6 +135,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, "TacticsOgreEliminateDebugReadback", &flags_.TacticsOgreEliminateDebugReadback); } void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 7cff655b0d12..64ce17aac932 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -105,6 +105,7 @@ struct CompatFlags { bool LoadCLUTFromCurrentFrameOnly; bool ForceUMDReadSpeed; bool AllowDelayedReadbacks; + bool TacticsOgreEliminateDebugReadback; }; struct VRCompat { diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index b1565e13b549..76436e0f4aa3 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -2683,6 +2683,10 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst // NotifyBlockTransferAfter will take care of the rest. return false; } else if (srcBuffer) { + if (width == 48 && height == 48 && srcY == 224 && srcX == 432 && PSP_CoreParameter().compat.flags().TacticsOgreEliminateDebugReadback) { + return false; + } + WARN_LOG_N_TIMES(btd, 10, G3D, "Block transfer readback %dx%d %dbpp from %08x (x:%d y:%d stride:%d) -> %08x (x:%d y:%d stride:%d)", width, height, bpp, srcBasePtr, srcRect.x_bytes / bpp, srcRect.y, srcStride, diff --git a/assets/compat.ini b/assets/compat.ini index 16a758aed24c..1c6e2e587d9d 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1716,3 +1716,11 @@ NPJH50263 = true # Added for easy experimentation. Many games using readbacks do not work well delaying them, though. # For example, Motorstorm lighting adaptation goes into self-oscillation (!) # UCES01250 = true + +[TacticsOgreEliminateDebugReadback] +ULUS10565 = true +ULES01500 = true +ULJM05753 = true +NPJH50348 = true +ULJM06009 = true +UCKS45164 = true