From 478a1e6aa24e3705db2ea6984f86f8bf7a23784d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Tue, 20 Oct 2026 17:43:39 +0200 Subject: [PATCH] sceImpose: Report HOME to POPS from sceImpose_9BA61B49 In impose.prx (6.60), it returns a flag impose's thread sets each pass while HOME is held, but only if impose leaves HOME to the application. Its init does that for application types 0x300 (POPS) and 0x400, and sceImpose_9DBCE0C4 changes it. So games get 0, and the PS1 emulator, which polls it to open its in-game menu, gets HOME. It was unimplemented, so it returned SCE_KERNEL_ERROR_LIBRARY_NOT_YET_LINKED. --- Core/HLE/sceImpose.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Core/HLE/sceImpose.cpp b/Core/HLE/sceImpose.cpp index 0a62a25523..3faec2b55d 100644 --- a/Core/HLE/sceImpose.cpp +++ b/Core/HLE/sceImpose.cpp @@ -20,6 +20,8 @@ #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" #include "Core/HLE/ErrorCodes.h" +#include "Core/HLE/PopsBoot.h" +#include "Core/HLE/sceCtrl.h" #include "Core/HLE/sceImpose.h" #include "Core/HLE/sceUtility.h" #include "Core/MIPS/MIPS.h" @@ -124,6 +126,14 @@ static u32 sceImposeGetBacklightOffTime() { return hleLogDebug(Log::sceUtility, backlightOffTime); } +// Whether HOME is held, when impose leaves HOME to the application. impose.prx's init does that +// for POPS (and application type 0x400), so for a game it's always 0. The PS1 emulator polls it for +// its menu. +static u32 sceImpose_9BA61B49() { + const bool held = PopsBootActive() && (__CtrlPeekButtons() & CTRL_HOME) != 0; + return hleLogVerbose(Log::sceUtility, held ? 1 : 0); +} + // OSD stuff? home button? const HLEFunction sceImpose[] = { {0X36AA6E91, &WrapU_UU, "sceImposeSetLanguageMode", 'i', "ii"}, @@ -139,7 +149,7 @@ const HLEFunction sceImpose[] = { {0XFCD44963, nullptr, "sceImpose_FCD44963", '?', "" }, {0XA9884B00, nullptr, "sceImpose_A9884B00", '?', "" }, {0XBB3F5DEC, nullptr, "sceImpose_BB3F5DEC", '?', "" }, - {0X9BA61B49, nullptr, "sceImpose_9BA61B49", '?', "" }, // jpcsp: isHomeButtonPressed() -> bool + {0X9BA61B49, &WrapU_V, "sceImpose_9BA61B49", 'x', "" }, {0XFF1A2F07, nullptr, "sceImpose_FF1A2F07", '?', "" }, };