libkernel: implement sceKernelGetModuleList2 (Madden NFL 26, UFC 6) #2399
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2399
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2399/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@oguzhanozfe on GitHub · 2026-11-18 23:42 UTC · original
oguzhanozfe:fix/kernel-get-module-list2→main· +41 −0 · 3 files · 1 commits · closed without mergingGame and problem
Madden NFL 26 (PPSA26127, #1834): the log ends with nothing but repeated lines like this one:
EA SPORTS UFC 6 (PPSA23566, #2019) imports the same function.
ZzzC3ZGVAkcissceKernelGetModuleList2; the NID was checked against the name with the NID hash.The stub returns 0 but writes neither the handle array nor the count, so the game goes on with an uninitialized module count.
Change
sceKernelGetModuleList2(int32_t* handles, uint64_t capacity, uint64_t* out_count)is registered in a newlibkernel_module_infolibrary and returns the handles of the loaded game modules: the eboot and its PRX. System libraries are HLE here, not modules.unique_id. They are the same ids thatsceKernelLoadStartModuleandsceKernelGetModuleInfoFromAddralready return.EFAULT. An array smaller than the module count returnsENOMEM. This matches shadPS4'ssceKernelGetModuleList.RuntimeLinker::GetProgramIds()collects the ids under the linker mutex.Testing
Windows 11, Ryzen 9 5950X, RTX 3090, clang-cl (LLVM 23), Release.
kyty_emulatorbuilds, andvirtual_memory_allocation_testsstill passes.sceKernelGetModuleInfo2with those handles, it will show as the next unresolved stub. Reports from #1834 / #2019 testers are welcome.AI usage
AI (Claude Opus 5.5) was used to rank the most frequent unresolved stubs across open issues, to check the NID-to-name mapping, to implement the change, and to draft this description.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-18 23:46 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
The change adds
RuntimeLinker::GetProgramIds(), which returns loaded programs’ unique IDs in load order. It adds and registersLibKernelModuleInfo, which exportsKernelGetModuleList2. The API returnsEFAULTfor null output pointers, returnsENOMEMwhen the ID count exceeds capacity, and otherwise copies the IDs and sets the output count.Suggested reviewers:
nmzikChange: Feature
Merge Risk:
Minimal · up to
0df34This adds a new kernel API that returns the IDs of loaded modules. It does not change existing behavior, so merge risk is minimal. It has not been tested in the target games.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the change: implementing sceKernelGetModuleList2 in libkernel. The changeset adds that function, registers it in a new libkernel_module_info library, and adds RuntimeLinker::GetProgramIds() to support it. The parenthetical game names are extra context and do not hurt the match.
Full details: Description check
Explanation
The description explains the problem (unresolved import stub in Madden NFL 26 and EA SPORTS UFC 6), the new function's signature and error behavior, the RuntimeLinker::GetProgramIds() helper, and the testing done. It relates directly to the changeset.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
4f2aab2f-3dde-4839-8150-371d7154a0c8Reviewing files that changed from the base of the PR and between
a90be8dd73and0df3413874.src/libs/libKernel.cppsrc/loader/runtimeLinker.cppsrc/loader/runtimeLinker.hIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Pull request closed