Repository navigation
feat(libSceHmd2): return the console's display and mirroring buffer sizes - #7690
Conversation
…ization Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…izes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Progress report (98db779 → f264452)📈 System libraries: 66.69% (+0.07%, +4 implemented functions) ✅ 4 implemented
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Datapoint from Gran Turismo 7 (PPSA01317, 01.000.001 base package): the title calls
Horizon Call of the Mountain (PPSA05666, v01.004.011) on the second tree: 3 of 3 stop on Merge notes: against #7658 the only conflict is the duplicate stderr, GT7 run 3 with this PR (abort block)stderr, Horizon run 2 with this PR (abort block)Tested. Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7 (UCRT), Release AI-assisted: yes (Claude Code). |
|
Rebase handoff, with one design decision flagged for review — rebased onto current The decision: Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, To pick it up: Head is |
|
Console values for this PR's Hmd2 answers, measured inside Gran Turismo 7 (PPSA01317, 01.690.000) on a retail PS5 (firmware 13.40) with a PS VR2 headset connected and on, by calling the exports from the running game process (ptrace from an elfldr payload):
AI-assisted: yes (Claude Code) |
|
Rebase handoff — rebased onto current The resolution, same direction as my earlier flag on this PR: Worth noting for reviewers: @frankea's console measurements from inside GT7 this morning (PS VR2 connected) match your four implemented values exactly — independent corroboration on top of your payload measurements. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, To pick it up: Head is |
# Conflicts: # docs/dev/debt/libSceHmd2.md
…oring sizes over the session debt
The overlap audit against origin/main and the open pull requests found 39 of the 193 declared exports that must not be declared here: - 14 that origin/main already exports. The nid_patcher computes the NID of a symbol from its name, and a name ending in _nid_postfix exports the NID of the base name, so scePadOpen, sceNetInit and the rest are already there. - 23 that an open pull request provides: #6832, #6847, #6852, #7846, #7881, #7889, #7890, #6977 and #7690. - 2 whose technical-debt file an open pull request creates: #7463 and #8094. The scope is now 30 libraries and 154 exports.
What
Implements four libSceHmd2 size queries that threw:
sceHmd2ReprojectionQueryDisplayBufferSizeAlign,sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign,sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlignandsceHmd2ReprojectionGetMirroringWorkMemorySizeAlign. Each returns a{size, alignment}pair in RAX:RDX (Hmd2::SizeAlign), and the console returns fixed values: 0x6000000 and 0x10000, 0x1106000 and 0x100, 0x5FA0000 and 0x10000, 0x4000 and 0x100. PPSA05666 (Horizon Call of the Mountain) reaches the reprojection set-up right after its PS VR2 tracker set-up, allocates the sizes these queries return and passes the mirroring buffer size (0x5FA0000) tosceHmd2ReprojectionEnableMirroring.sceHmd2ReprojectionQueryBufferSizeAlignis left to #7658, which implements it; the debt file records the value the console returns for it (0x100828 and 0x100), measured the same way. The values were measured on the console; the debt file says what is assumed.Hmd2::SizeAlignhas the same layout and member names as the one #7658 adds, so whichever lands second only drops its copy.Tested
Windows 11 (MinGW GCC 15.2) and Ubuntu 26.04 on WSL2 (GCC 15.2), Release builds:
ctestfor guest_hmd2 passes on both, and patched_libraries on Windows; the built exports set RAX and RDX as the console's do. The values come from a homebrew payload on a PS5 (firmware 13.60) with no PS VR2 headset that loadedlibSceHmd2.sprxwithout initializing it and called each query with small arguments, always with the same result. The arguments PPSA05666 passes were captured under AnyPS5. Not tested further with a title.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)🤖 Generated with Claude Code