From c7546dfe8d07fd5942daffa12d5aff0b3d6fc3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 10 Sep 2024 19:28:49 +0200 Subject: [PATCH] Add compat.ini setting for Sakura-Sou no Pet na Kanojo See issue #15224 --- Core/Compatibility.cpp | 1 + Core/Compatibility.h | 1 + Core/HLE/sceGe.cpp | 2 +- assets/compat.ini | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index 9287e5ab8f..5d93f2ce5c 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -83,6 +83,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "ClearToRAM", &flags_.ClearToRAM); CheckSetting(iniFile, gameID, "Force04154000Download", &flags_.Force04154000Download); CheckSetting(iniFile, gameID, "DrawSyncEatCycles", &flags_.DrawSyncEatCycles); + CheckSetting(iniFile, gameID, "DrawSyncInstant", &flags_.DrawSyncInstant); CheckSetting(iniFile, gameID, "FakeMipmapChange", &flags_.FakeMipmapChange); CheckSetting(iniFile, gameID, "RequireBufferedRendering", &flags_.RequireBufferedRendering); CheckSetting(iniFile, gameID, "RequireBlockTransfer", &flags_.RequireBlockTransfer); diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 7081c6ff82..2feddd7725 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -53,6 +53,7 @@ struct CompatFlags { bool ClearToRAM; bool Force04154000Download; bool DrawSyncEatCycles; + bool DrawSyncInstant; bool FakeMipmapChange; bool RequireBufferedRendering; bool RequireBlockTransfer; diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index a78ce1f94d..54819eb551 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -391,7 +391,7 @@ static u32 sceGeDrawSync(u32 mode) { //wait/check entire drawing state if (PSP_CoreParameter().compat.flags().DrawSyncEatCycles) hleEatCycles(500000); //HACK(?) : Potential fix for Crash Tag Team Racing and a few Gundam games - else + else if (!PSP_CoreParameter().compat.flags().DrawSyncInstant) hleEatCycles(1240); DEBUG_LOG(Log::sceGe, "sceGeDrawSync(mode=%d) (0=wait for completion, 1=peek)", mode); return gpu->DrawSync(mode); diff --git a/assets/compat.ini b/assets/compat.ini index 9781d0ee69..821c52aa08 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -264,6 +264,10 @@ ULJM06365 = true # ULJM05036 = true # ULUS10044 = 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 + [FakeMipmapChange] # This hacks separates each mipmap to independent textures to display wrong-size mipmaps. # For example this requires games like Tactics Ogre(Japanese) to display multi bytes fonts stored in mipmaps.