feat(libkernel): implement sceKernelHasTrinityMode for a base PS5 #13769
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13769"
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?
Imported from boykopovar/AnyPS5. Originally posted by Flamefusion on 2026-10-31T05:11:39Z.
What
sceKernelHasTrinityModethrew: it existed only as a parameterless placeholder in thelibkernel_sysinventory. It now returns 0, a base PS5's answer, from libkernel next tosceKernelIsTrinityMode, which already returns 0.libkernel:FINDINGS.mdL246 (firmware 11.00 to 12.70) says it reads the sysctlhw.sce_main_socid. The masked comparison stated there is forsceKernelIsTrinityMode.driver_prospero.cL333-L340 (firmware 11.60) gives the test forsceKernelHasTrinityMode: the four-byte id with its low five bits cleared, compared with 0x840fc0.sceKernelGetMainSocIddebt entry (0x840f80, CFI-2014, firmware 13.60) fails that test.sceKernelIsTrinityMode.int (void)comes from the 23 calls in RuneScape: Dragonwilds (PPSA34114 01.000.005), for example 0x8837e3, 0x67db227 and 0x78dfa9e. Each one sets up a function-local static:libkernel(yu17wG8L5FI#4#J). Before this change onlylibkernel_sysexported it, whichimport_audit.pyreports as alibrary_mismatch. The placeholder, its inventory row and the inventory counts are set to whatAdditionalExports.cppholds: 325 entries, 165 named and 160 NID aliases. Since #13129 merged,mainhas said 326 in the first paragraph and still 328 and 168 in the identity paragraph; both now give the counted values.Overlap:
pr_overlap.pyfinds no conflicting lines or shared exports. Of the PRs it could not compare (they conflict withmain), I checked those touching the changed code files by hand (#5021, #7804, #9242, #9297, #9302, #11215, #11628, #11661, #11689, #11698, #11939, #12925); none touchessceKernelHasTrinityModeorsceKernelIsTrinityMode.Tested
Windows 11 (build 26300), WinLibs GCC 15.2.0, Release, on
main18f5949788(rebased; the first runs were ond3118d1946).guest_operation_modecheckssceKernelHasTrinityMode() == 0and passes. Ond3118d1946all 91guest_kernel_sys*,guest_current_cpuandguest_operation_modetests passed. After the rebase onto18f5949788,guest_operation_mode,guest_current_cpu,guest_kernel_sys,guest_kernel_sys_neo_mode,guest_kernel_sys_cpumode,guest_kernel_sys_constantsand the 65public_headerstests pass (71/71).mainit aborts about 7 s after start withsceKernelHasTrinityMode not implemented. With this change it gets past that point, creates the Vulkan device, compiles about 900 shaders and mounts save data. It then stops 26 s in atsceHttp2SetRedirectCallback not implemented, which #11575 implements.check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)