diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index 58acbd7c69..29a8874039 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -133,6 +133,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "SOCOMClut8Replacement", &flags_.SOCOMClut8Replacement); CheckSetting(iniFile, gameID, "Fontltn12Hack", &flags_.Fontltn12Hack); CheckSetting(iniFile, gameID, "LoadCLUTFromCurrentFrameOnly", &flags_.LoadCLUTFromCurrentFrameOnly); + CheckSetting(iniFile, gameID, "ForceUMDReadSpeed", &flags_.ForceUMDReadSpeed); } void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 1079618c87..a917d17e5e 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -103,6 +103,7 @@ struct CompatFlags { bool SOCOMClut8Replacement; bool Fontltn12Hack; bool LoadCLUTFromCurrentFrameOnly; + bool ForceUMDReadSpeed; }; struct VRCompat { diff --git a/Core/ConfigValues.h b/Core/ConfigValues.h index e7a6957e5c..7d02b5c960 100644 --- a/Core/ConfigValues.h +++ b/Core/ConfigValues.h @@ -128,6 +128,7 @@ enum IOTimingMethods { IOTIMING_FAST = 0, IOTIMING_HOST = 1, IOTIMING_REALISTIC = 2, + IOTIMING_UMDSLOWREALISTIC = 3, }; enum class AutoLoadSaveState { diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index d8599f9865..3935de7047 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -1037,7 +1037,14 @@ static u32 npdrmRead(FileNode *f, u8 *data, int size) { static bool __IoRead(int &result, int id, u32 data_addr, int size, int &us) { PROFILE_THIS_SCOPE("io_rw"); // Low estimate, may be improved later from the ReadFile result. - us = size / 100; + + if (PSP_CoreParameter().compat.flags().ForceUMDReadSpeed || g_Config.iIOTimingMethod == IOTIMING_UMDSLOWREALISTIC) { + us = size / 4.2; + } + else { + us = size / 100; + } + if (us < 100) { us = 100; } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index f5216ea7e5..0a3a4cfc16 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1081,7 +1081,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) { systemSettings->Add(new CheckBox(&g_Config.bFastMemory, sy->T("Fast Memory", "Fast Memory")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); systemSettings->Add(new CheckBox(&g_Config.bIgnoreBadMemAccess, sy->T("Ignore bad memory accesses"))); - static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" }; + static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays", "Simulate UMD slow reading speed"}; View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), I18NCat::SYSTEM, screenManager())); systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)")))->SetDisabledPtr(&g_Config.bAutoFrameSkip); PopupSliderChoice *lockedMhz = systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, 0, sy->T("Change CPU Clock", "Change CPU Clock (unstable)"), screenManager(), sy->T("MHz, 0:default"))); diff --git a/assets/compat.ini b/assets/compat.ini index 95c036e277..59909df931 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1639,3 +1639,10 @@ NPUA80013 = true # Demo UCUS98704 = true # Demo NPEG90002 = true # Demo SYPH04036 = true # Prototype? + +[ForceUMDReadSpeed] +#Aces of War required slow read speed (even in Real PSP) see #11062 +ULES00590 = true +ULJM05075 = true +#Sengoku Musou 3Z Special DLC see #9993 +ULJM06024 = true \ No newline at end of file diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index c5b4807750..de6792012f 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -523,6 +523,8 @@ static void check_variables(CoreParameter &coreParam) g_Config.iIOTimingMethod = IOTIMING_HOST; else if (!strcmp(var.value, "Simulate UMD delays")) g_Config.iIOTimingMethod = IOTIMING_REALISTIC; + else if (!strcmp(var.value, "Simulate UMD slow reading speed")) + g_Config.iIOTimingMethod = IOTIMING_UMDSLOWREALISTIC; } var.key = "ppsspp_force_lag_sync";