From 19bac4894c5c828f23ee986a37463590f4ed501d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 18 Sep 2026 14:32:07 -0600 Subject: [PATCH] Let sceMpeg LLE override the ForceHLEPsmf compat flag Our psmf and psmfPlayer HLE plays video by calling our sceMpeg HLE, so it has nothing to talk to when the real mpeg.prx is running. The flag now gives way when sceMpeg is LLE. Moved below the force-enable and unavailable masks so it tests what sceMpeg actually ended up as rather than what was asked for. Also remove a bad assert. Co-Authored-By: Claude Opus 5 (1M context) --- Core/HLE/HLE.cpp | 15 +++++++++++---- GPU/Common/TextureCacheCommon.cpp | 1 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index 189b53daa3..9ad242e31b 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -257,13 +257,20 @@ static DisableHLEFlags ComputeDisableHLEFlags() { if (PSP_CoreParameter().compat.flags().DisableHLESceFont) { flags |= DisableHLEFlags::sceFont; } - if (PSP_CoreParameter().compat.flags().ForceHLEPsmf) { - flags &= ~(DisableHLEFlags::scePsmf | DisableHLEFlags::scePsmfPlayer); - } - flags &= ~(DisableHLEFlags)g_Config.iForceEnableHLE; // Anything whose firmware module isn't actually present stays HLE'd. flags &= ~g_unavailableDisableFlags; + + // Our psmf and psmfPlayer HLE plays video by calling our sceMpeg HLE, so it has nothing to talk + // to when the real mpeg.prx is running: the player sits in "not yet playing" forever and no + // frame ever comes out. The two have to be on the same side, and since sceMpeg is the one we + // now run for real by default, this compat flag gives way to it. + // + // Last, so it sees what sceMpeg actually ended up as rather than what was asked for - without a + // module to run, sceMpeg is back on HLE and the flag means what it always did. + if (PSP_CoreParameter().compat.flags().ForceHLEPsmf && !(flags & DisableHLEFlags::sceMpeg)) { + flags &= ~(DisableHLEFlags::scePsmf | DisableHLEFlags::scePsmfPlayer); + } return flags; } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 7c39f3a4bf..40477d51b0 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -527,7 +527,6 @@ TextureApplyResult TextureCacheCommon::ApplyTexture(bool doBind) { level = std::max(0, gstate.getTexLevelOffset16() / 16); } const u32 texaddr = gstate.getTextureAddress(level); - _dbg_assert_(texaddr != 0); if (!Memory::IsValidTextureAddress(texaddr)) { // Bind a null texture and return. Unbind();