mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 15:13:37 +02:00
Implement a batch of the VSH's unresolved imports (and document three we must not)
Mostly small stubs: - sceImpose: GetParam/SetParam/Changes/SetStatus, plus the 6.60 alias of sceImposeGetBatteryIconStatus. Also fixes that function's first output - it is a plain "is it charging" boolean, not a BATTICON_ value. We wrote PSP_IMPOSE_BATTICON_NONE (0x80000000) there, which games ignore but which the VSH reads as "no battery" and draws the empty-battery indicator for. These are the bulk of the traffic: the VSH calls sceImposeChanges once a frame, so this alone removes ~10000 trapped calls from a boot. - SysMemForKernel: sceKernelSetRebootKernel, sceKernelSetUmdCacheOn. - scePower_driver: scePowerSetWakeupCondition. - sceHprm_driver, sceUsb: one NID-named call each, as in JPCSP. Three groups are deliberately left unresolved, with comments explaining why, because resolving them lets real flash0 drivers walk into hardware we do not emulate and the boot dies where it used to reach the shell: - ThreadManForKernel mutex/fpl NIDs: the NAND and ID storage drivers use these to init, then poll the NAND controller at 0xbd101300 forever. - InterruptManagerForKernel intr registration: 31 calls, then a stall in GE list execution with no plugin module ever started. 73 unresolved import hits over 37 distinct module/NID pairs remain in a VSH boot, mostly sceSysEventForKernel, sceSuspendForKernel and the various *_driver modules that need real hardware behind them. The sceImpose savestate section goes to v2 for the two new state variables. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
This commit is contained in:
co-authored by
Claude Opus 5
parent
4667f5e2da
commit
f449fa6ab2
@@ -958,6 +958,15 @@ const HLEFunction ThreadManForKernel[] =
|
||||
{0xC11BA8C4, &WrapI_II<sceKernelNotifyCallback>, "sceKernelNotifyCallback", 'i', "ii", HLE_KERNEL_SYSCALL },
|
||||
{0xF6427665, &WrapI_V<sceKernelGetUserLevel>, "sceKernelGetUserLevel", 'i', "", HLE_KERNEL_SYSCALL },
|
||||
{0x85A2A5BF, &WrapI_V<sceKernelIsUserModeThread>, "sceKernelIsUserModeThread", 'i', "", HLE_KERNEL_SYSCALL },
|
||||
// NOT added on purpose, even though we implement all four for user mode already:
|
||||
// sceKernelCreateMutex (0xB7D098C6), sceKernelLockMutex (0xB011B11F), sceKernelUnlockMutex
|
||||
// (0x6B30100F) and sceKernelAllocateFpl (0xD979E9BF). They are what the real flash0 NAND and
|
||||
// ID storage drivers use to set themselves up while booting the VSH, and leaving them
|
||||
// unresolved is load-bearing: the drivers fail their init early and the boot moves on. Resolve
|
||||
// them and the drivers instead get all the way through to talking to the NAND controller, which
|
||||
// we don't emulate - sceIdStorage_Service then polls 0xbd101300 forever, no plugin module ever
|
||||
// starts, and the boot is dead where it used to reach the shell. Adding these needs NAND MMIO
|
||||
// (or HLE'ing sceIdStorage/sceNand above the driver) to land first.
|
||||
};
|
||||
|
||||
void Register_ThreadManForUser()
|
||||
|
||||
Reference in New Issue
Block a user