feat(libSceHmd2): return the console's display and mirroring buffer sizes #7690

Merged
T3cm0 merged 3 commits from upstream-pr/7690 into main 2026-10-20 07:07:32 +00:00
T3cm0 commented 2026-10-18 23:57:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by T3cm0 on 2026-10-18T23:57:18Z.


What

Implements four libSceHmd2 size queries that threw: sceHmd2ReprojectionQueryDisplayBufferSizeAlign, sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign, sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign and sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign. 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) to sceHmd2ReprojectionEnableMirroring. sceHmd2ReprojectionQueryBufferSizeAlign is 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::SizeAlign has 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: ctest for 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 loaded libSceHmd2.sprx without 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

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #7463
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4913936372 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690). Originally posted by [T3cm0](https://github.com/T3cm0) on 2026-10-18T23:57:18Z. --- ### What Implements four libSceHmd2 size queries that threw: `sceHmd2ReprojectionQueryDisplayBufferSizeAlign`, `sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign`, `sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign` and `sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign`. 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) to `sceHmd2ReprojectionEnableMirroring`. `sceHmd2ReprojectionQueryBufferSizeAlign` is 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::SizeAlign` has 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: `ctest` for 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 loaded `libSceHmd2.sprx` without 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 <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #7463 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-18 23:57:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T23:57:59Z.


Progress report (98db779 → f264452)

📈 System libraries: 66.69% (+0.07%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceHmd2 sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign
libSceHmd2 sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign
libSceHmd2 sceHmd2ReprojectionQueryDisplayBufferSizeAlign
libSceHmd2 sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256766904 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6256766904). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T23:57:59Z. --- <!-- progress-report --> ### Progress report (98db779 → f264452) 📈 **System libraries**: 66.69% (+0.07%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceHmd2 | `sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign` | | libSceHmd2 | `sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign` | | libSceHmd2 | `sceHmd2ReprojectionQueryDisplayBufferSizeAlign` | | libSceHmd2 | `sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign` | </details>
github-actions[bot] commented 2026-10-19 00:11:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T00:11:20Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7658 core/libs/prx/libSceHmd2/Hmd2.hpp L51, L63

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.

Pull request Shared files not compared
PR 4040 docs/dev/debt/libSceVideoOut.md
PR 6044 core/libs/tests/GuestHmd2.cpp
PR 6977 docs/dev/debt/libSceVideoOut.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256898568 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6256898568). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T00:11:20Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7658](https://www.github.com/boykopovar/AnyPS5/pull/7658) | `core/libs/prx/libSceHmd2/Hmd2.hpp` [L51](https://github.com/boykopovar/AnyPS5/blob/98db779227f1d9d6d9fe162ce9b876eb2427008c/core/libs/prx/libSceHmd2/Hmd2.hpp#L51), [L63](https://github.com/boykopovar/AnyPS5/blob/98db779227f1d9d6d9fe162ce9b876eb2427008c/core/libs/prx/libSceHmd2/Hmd2.hpp#L63) | | | 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. | Pull request | Shared files not compared | |---|---| | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `docs/dev/debt/libSceVideoOut.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestHmd2.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/libSceVideoOut.md` |
frankea commented 2026-10-19 02:16:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T02:16:42Z.


Datapoint from Gran Turismo 7 (PPSA01317, 01.000.001 base package): the title calls sceHmd2ReprojectionQueryDisplayBufferSizeAlign right after sceHmd2ReprojectionQueryBufferSizeAlign, and this PR's answer is what lets it leave libSceHmd2. On main 324e0e48e + #7658 alone, 3 of 3 runs abort on sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented (libSceHmd2.prx+0x1c90 under app.exe+0x952f47, 0x48 bytes after the QueryBufferSizeAlign call site that stopped it on plain main); with this PR added (head e191a132a, which brings #7463), 3 of 3 pass all four size queries and stop on sceVrTracker2Initialize not implemented (libSceVrTracker2.prx+0x1650 under app.exe+0x95310a, same function, same module-load thread), 9.5 s (cold shader cache), 4.9 s and 4.9 s after launch, still before the first frame.

Tree Stop Where Wall-clock (3 runs)
main 324e0e48e + #7658 sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented libSceHmd2.prx+0x1c90 under app.exe+0x952f47 6.7 s, 4.8 s, 4.8 s
main 324e0e48e + #7658 + this PR sceVrTracker2Initialize not implemented libSceVrTracker2.prx+0x1650 under app.exe+0x95310a 9.5 s, 4.9 s, 4.9 s

Horizon Call of the Mountain (PPSA05666, v01.004.011) on the second tree: 3 of 3 stop on sceVrTracker2Initialize not implemented (108 s cold cache, 10 s, 11 s), the same addresses as with #7463 alone (app.exe+0x4b8d89b, with the libSceHmd2.prx+0x1920 device-information return address and the VR set-up frames app.exe+0x10f8eee / +0x10fadee up the stack). No sceHmd2Reprojection* export is reached before that abort, which matches the PR text: the reprojection set-up comes after the tracker set-up, and on the emulator the tracker set-up throws first. So Horizon cannot confirm the four values yet; GT7 confirms that QueryDisplayBufferSizeAlign is the first of them a title asks for.

Merge notes: against #7658 the only conflict is the duplicate Hmd2::SizeAlign in Hmd2.hpp and the debt bullet, as both PRs predict (I kept #7658's struct block and both sets of declarations; Export.cpp and GuestHmd2.cpp merged by themselves). #7658 itself conflicts with current main in libSceJson2 (#6126); main's files were kept there.

stderr, GT7 run 3 with this PR (abort block)
[libc] unhandled exception 'St13runtime_error' thrown from 00007fff6d06756c
terminate called after throwing an instance of 'std::runtime_error'
  what():  sceVrTracker2Initialize not implemented
FATAL: abort() (SIGABRT) on thread 15624
    #0 0x00007fff6cfa2c98 libc.prx+0x12c98
    #1 0x00007fff6d083b31 libc.prx+0xf3b31
    #2 0x000000000060f750
  stack return address candidates:
    [rsp+0x8] 0x00007fff6cfa2eb5 libc.prx+0x12eb5
    [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139
    [rsp+0x98] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261
    [rsp+0xe0] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0xe8] 0x00007fff6cffebf6 libc.prx+0x6ebf6
    [rsp+0x138] 0x00007fff6cff9c7b libc.prx+0x69c7b
    [rsp+0x140] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0x158] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0x168] 0x00007fff6d008203 libc.prx+0x78203
    [rsp+0x180] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0x268] 0x00007fff6d008c1e libc.prx+0x78c1e
    [rsp+0x298] 0x00007fff6d06756c libc.prx+0xd756c
    [rsp+0x328] 0x00007fff6a1e1650 libSceVrTracker2.prx+0x1650
    [rsp+0x358] 0x000000014095310a app.exe+0x95310a
    [rsp+0x428] 0x000000014094e714 app.exe+0x94e714
    [rsp+0x488] 0x00007fff6f3ff1bc libkernel.prx+0x4f1bc
    [rsp+0x498] 0x0000000140a86552 app.exe+0xa86552
    [rsp+0x4e8] 0x00007fff6f40c8cc libkernel.prx+0x5c8cc
    [rsp+0x548] 0x0000000140bde714 app.exe+0xbde714
    [rsp+0x578] 0x00007fff70ce6aca libc.prx.guest.prx+0x56aca
    [rsp+0x588] 0x0000000140c54a0f app.exe+0xc54a0f
    [rsp+0x5b8] 0x0000000140c54b87 app.exe+0xc54b87
    [rsp+0x608] 0x0000000140c54623 app.exe+0xc54623
    [rsp+0x668] 0x00007fffa1fc347e libSceSysmodule.prx+0x347e
    [rsp+0x6b8] 0x000000014092b706 app.exe+0x92b706
    [rsp+0x6e8] 0x000000014092bf61 app.exe+0x92bf61
    [rsp+0x728] 0x00000001416d34af app.exe+0x16d34af
    [rsp+0x730] 0x0000000149072da4 app.exe+0x9072da4
    [rsp+0x748] 0x0000000140d12d7f app.exe+0xd12d7f
stderr, Horizon run 2 with this PR (abort block)
[libc] unhandled exception 'St13runtime_error' thrown from 00007fff6f59756c
terminate called after throwing an instance of 'std::runtime_error'
  what():  sceVrTracker2Initialize not implemented
FATAL: abort() (SIGABRT) on thread 17912
    #0 0x00007fff6f4d2c98 libc.prx+0x12c98
    #1 0x00007fff6f5b3b31 libc.prx+0xf3b31
    #2 0x000000000060e8d0
  stack return address candidates:
    [rsp+0x8] 0x00007fff6f4d2eb5 libc.prx+0x12eb5
    [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139
    [rsp+0x98] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261
    [rsp+0xe0] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0xe8] 0x00007fff6f52ebf6 libc.prx+0x6ebf6
    [rsp+0x138] 0x00007fff6f529c7b libc.prx+0x69c7b
    [rsp+0x140] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0x158] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0x168] 0x00007fff6f538203 libc.prx+0x78203
    [rsp+0x180] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0x268] 0x00007fff6f538c1e libc.prx+0x78c1e
    [rsp+0x298] 0x00007fff6f59756c libc.prx+0xd756c
    [rsp+0x328] 0x00007fff6cef1650 libSceVrTracker2.prx+0x1650
    [rsp+0x348] 0x00007fff70d35d5a libc.prx.guest.prx+0x15d5a
    [rsp+0x358] 0x0000000144b8d89b app.exe+0x4b8d89b
    [rsp+0x3c8] 0x0000000144b8d669 app.exe+0x4b8d669
    [rsp+0x418] 0x0000000144b905f8 app.exe+0x4b905f8
    [rsp+0x428] 0x00007fffb80a46cb libwinpthread-1.dll+0x46cb
    [rsp+0x468] 0x0000000144b904ed app.exe+0x4b904ed
    [rsp+0x478] 0x000000014240dbf9 app.exe+0x240dbf9
    [rsp+0x480] 0x000000014240dbc0 app.exe+0x240dbc0
    [rsp+0x4b8] 0x000000014251dde4 app.exe+0x251dde4
    [rsp+0x528] 0x000000014251df2e app.exe+0x251df2e
    [rsp+0x558] 0x00000001410fb794 app.exe+0x10fb794
    [rsp+0x568] 0x00007fff6cf51920 libSceHmd2.prx+0x1920
    [rsp+0x5a8] 0x00000001410fadee app.exe+0x10fadee
    [rsp+0x628] 0x00000001410f8eee app.exe+0x10f8eee
    [rsp+0x638] 0x00007fffd0fe282f KERNELBASE.dll+0x2282f
    [rsp+0x678] 0x000000014253e09d app.exe+0x253e09d

Tested. Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7 (UCRT), Release libs target, ccache, one worktree for both trees; GT7's app.exe is the relink from main 31cbb55d7, Horizon's the 10/14 relink, only libs/ swapped. Desktop session, no input, 600 s cap, APS5_PLAYGO_UNLISTED_CHUNKS=absent for Horizon, box otherwise idle. Not a review of the console measurements.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258236497 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6258236497). Originally posted by [frankea](https://github.com/frankea) on 2026-10-19T02:16:42Z. --- Datapoint from Gran Turismo 7 (PPSA01317, 01.000.001 base package): the title calls `sceHmd2ReprojectionQueryDisplayBufferSizeAlign` right after `sceHmd2ReprojectionQueryBufferSizeAlign`, and this PR's answer is what lets it leave `libSceHmd2`. On `main` 324e0e48e + #7658 alone, 3 of 3 runs abort on `sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented` (`libSceHmd2.prx+0x1c90` under `app.exe+0x952f47`, 0x48 bytes after the `QueryBufferSizeAlign` call site that stopped it on plain `main`); with this PR added (head e191a132a, which brings #7463), 3 of 3 pass all four size queries and stop on `sceVrTracker2Initialize not implemented` (`libSceVrTracker2.prx+0x1650` under `app.exe+0x95310a`, same function, same module-load thread), 9.5 s (cold shader cache), 4.9 s and 4.9 s after launch, still before the first frame. | Tree | Stop | Where | Wall-clock (3 runs) | |---|---|---|---| | `main` 324e0e48e + #7658 | `sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented` | `libSceHmd2.prx+0x1c90` under `app.exe+0x952f47` | 6.7 s, 4.8 s, 4.8 s | | `main` 324e0e48e + #7658 + this PR | `sceVrTracker2Initialize not implemented` | `libSceVrTracker2.prx+0x1650` under `app.exe+0x95310a` | 9.5 s, 4.9 s, 4.9 s | Horizon Call of the Mountain (PPSA05666, v01.004.011) on the second tree: 3 of 3 stop on `sceVrTracker2Initialize not implemented` (108 s cold cache, 10 s, 11 s), the same addresses as with #7463 alone (`app.exe+0x4b8d89b`, with the `libSceHmd2.prx+0x1920` device-information return address and the VR set-up frames `app.exe+0x10f8eee` / `+0x10fadee` up the stack). No `sceHmd2Reprojection*` export is reached before that abort, which matches the PR text: the reprojection set-up comes after the tracker set-up, and on the emulator the tracker set-up throws first. So Horizon cannot confirm the four values yet; GT7 confirms that `QueryDisplayBufferSizeAlign` is the first of them a title asks for. Merge notes: against #7658 the only conflict is the duplicate `Hmd2::SizeAlign` in `Hmd2.hpp` and the debt bullet, as both PRs predict (I kept #7658's struct block and both sets of declarations; `Export.cpp` and `GuestHmd2.cpp` merged by themselves). #7658 itself conflicts with current `main` in `libSceJson2` (#6126); `main`'s files were kept there. <details><summary>stderr, GT7 run 3 with this PR (abort block)</summary> ``` [libc] unhandled exception 'St13runtime_error' thrown from 00007fff6d06756c terminate called after throwing an instance of 'std::runtime_error' what(): sceVrTracker2Initialize not implemented FATAL: abort() (SIGABRT) on thread 15624 #0 0x00007fff6cfa2c98 libc.prx+0x12c98 #1 0x00007fff6d083b31 libc.prx+0xf3b31 #2 0x000000000060f750 stack return address candidates: [rsp+0x8] 0x00007fff6cfa2eb5 libc.prx+0x12eb5 [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139 [rsp+0x98] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261 [rsp+0xe0] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0xe8] 0x00007fff6cffebf6 libc.prx+0x6ebf6 [rsp+0x138] 0x00007fff6cff9c7b libc.prx+0x69c7b [rsp+0x140] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0x158] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0x168] 0x00007fff6d008203 libc.prx+0x78203 [rsp+0x180] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0x268] 0x00007fff6d008c1e libc.prx+0x78c1e [rsp+0x298] 0x00007fff6d06756c libc.prx+0xd756c [rsp+0x328] 0x00007fff6a1e1650 libSceVrTracker2.prx+0x1650 [rsp+0x358] 0x000000014095310a app.exe+0x95310a [rsp+0x428] 0x000000014094e714 app.exe+0x94e714 [rsp+0x488] 0x00007fff6f3ff1bc libkernel.prx+0x4f1bc [rsp+0x498] 0x0000000140a86552 app.exe+0xa86552 [rsp+0x4e8] 0x00007fff6f40c8cc libkernel.prx+0x5c8cc [rsp+0x548] 0x0000000140bde714 app.exe+0xbde714 [rsp+0x578] 0x00007fff70ce6aca libc.prx.guest.prx+0x56aca [rsp+0x588] 0x0000000140c54a0f app.exe+0xc54a0f [rsp+0x5b8] 0x0000000140c54b87 app.exe+0xc54b87 [rsp+0x608] 0x0000000140c54623 app.exe+0xc54623 [rsp+0x668] 0x00007fffa1fc347e libSceSysmodule.prx+0x347e [rsp+0x6b8] 0x000000014092b706 app.exe+0x92b706 [rsp+0x6e8] 0x000000014092bf61 app.exe+0x92bf61 [rsp+0x728] 0x00000001416d34af app.exe+0x16d34af [rsp+0x730] 0x0000000149072da4 app.exe+0x9072da4 [rsp+0x748] 0x0000000140d12d7f app.exe+0xd12d7f ``` </details> <details><summary>stderr, Horizon run 2 with this PR (abort block)</summary> ``` [libc] unhandled exception 'St13runtime_error' thrown from 00007fff6f59756c terminate called after throwing an instance of 'std::runtime_error' what(): sceVrTracker2Initialize not implemented FATAL: abort() (SIGABRT) on thread 17912 #0 0x00007fff6f4d2c98 libc.prx+0x12c98 #1 0x00007fff6f5b3b31 libc.prx+0xf3b31 #2 0x000000000060e8d0 stack return address candidates: [rsp+0x8] 0x00007fff6f4d2eb5 libc.prx+0x12eb5 [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139 [rsp+0x98] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261 [rsp+0xe0] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0xe8] 0x00007fff6f52ebf6 libc.prx+0x6ebf6 [rsp+0x138] 0x00007fff6f529c7b libc.prx+0x69c7b [rsp+0x140] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0x158] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0x168] 0x00007fff6f538203 libc.prx+0x78203 [rsp+0x180] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0x268] 0x00007fff6f538c1e libc.prx+0x78c1e [rsp+0x298] 0x00007fff6f59756c libc.prx+0xd756c [rsp+0x328] 0x00007fff6cef1650 libSceVrTracker2.prx+0x1650 [rsp+0x348] 0x00007fff70d35d5a libc.prx.guest.prx+0x15d5a [rsp+0x358] 0x0000000144b8d89b app.exe+0x4b8d89b [rsp+0x3c8] 0x0000000144b8d669 app.exe+0x4b8d669 [rsp+0x418] 0x0000000144b905f8 app.exe+0x4b905f8 [rsp+0x428] 0x00007fffb80a46cb libwinpthread-1.dll+0x46cb [rsp+0x468] 0x0000000144b904ed app.exe+0x4b904ed [rsp+0x478] 0x000000014240dbf9 app.exe+0x240dbf9 [rsp+0x480] 0x000000014240dbc0 app.exe+0x240dbc0 [rsp+0x4b8] 0x000000014251dde4 app.exe+0x251dde4 [rsp+0x528] 0x000000014251df2e app.exe+0x251df2e [rsp+0x558] 0x00000001410fb794 app.exe+0x10fb794 [rsp+0x568] 0x00007fff6cf51920 libSceHmd2.prx+0x1920 [rsp+0x5a8] 0x00000001410fadee app.exe+0x10fadee [rsp+0x628] 0x00000001410f8eee app.exe+0x10f8eee [rsp+0x638] 0x00007fffd0fe282f KERNELBASE.dll+0x2282f [rsp+0x678] 0x000000014253e09d app.exe+0x253e09d ``` </details> **Tested.** Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7 (UCRT), Release `libs` target, ccache, one worktree for both trees; GT7's `app.exe` is the relink from `main` 31cbb55d7, Horizon's the 10/14 relink, only `libs/` swapped. Desktop session, no input, 600 s cap, `APS5_PLAYGO_UNLISTED_CHUNKS=absent` for Horizon, box otherwise idle. Not a review of the console measurements. AI-assisted: yes (Claude Code).
blawesom commented 2026-10-19 09:02:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T09:02:00Z.


Rebase handoff, with one design decision flagged for review — rebased onto current main (both commits, authorship unchanged).

The decision: main's b378541e7 ("report the PS VR2 runtime as unavailable again") landed after your merge-base and reverted sceHmd2Initialize to UnsupportedFeature — your branch was built on the initialization-succeeds model. I kept main's architecture (Initialize fails, TestWithoutHeadset stays) and layered your feature on it: the four size queries return the console-measured values ungated, and VrTracker2 applied verbatim. If your intent is to re-land the succeeds-model (#7323 behavior), the Initialize restoration plus your full TestInitialized suite is the part to redo — I did not guess that direction.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; the Hmd2 tests pass (2/2); conventions pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7690
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 38ce5ba3d.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263579494 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6263579494). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T09:02:00Z. --- **Rebase handoff, with one design decision flagged for review** — rebased onto current `main` (both commits, authorship unchanged). **The decision:** `main`'s `b378541e7` ("report the PS VR2 runtime as unavailable again") landed after your merge-base and reverted `sceHmd2Initialize` to `UnsupportedFeature` — your branch was built on the initialization-succeeds model. I kept **`main`'s architecture** (Initialize fails, `TestWithoutHeadset` stays) and layered your feature on it: the four size queries return the console-measured values ungated, and VrTracker2 applied verbatim. **If your intent is to re-land the succeeds-model (#7323 behavior), the Initialize restoration plus your full `TestInitialized` suite is the part to redo** — I did not guess that direction. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; the Hmd2 tests pass (2/2); conventions pass; **full suite green apart from the four known `main` regressions** (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7690 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `38ce5ba3d`.
frankea commented 2026-10-19 09:21:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T09:21:18Z.


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):

  • The four size queries match this PR exactly: QueryDisplayBufferSizeAlign 0x6000000 / 0x10000, QuerySeeThroughBufferSizeAlign 0x1106000 / 0x100, GetMirroringDisplayBufferSizeAlign 0x5FA0000 / 0x10000, GetMirroringWorkMemorySizeAlign 0x4000 / 0x100. MLB The Show 25 (no headset, Hmd2 not initialized) gets the same four pairs.
  • sceHmd2GetFieldOfViewWithoutHandle returns 0 with 1.84177089, 0.947190642, 1.32898104, 1.32898104, bit-identical to DefaultFieldOfView.
  • sceHmd2GetDeviceInformation with the headset present returns 0 and 28 bytes: status 0, userId 0, panel 4000 × 2040, latency90Hz 5555, latency120Hz 4160, hmuMount 0, lensSeparationDistance 66 (0x42), reserved 0, virtualImageDistance 2.0f. Apart from status (0 here, 2 = NotDetected in this PR) and lensSeparationDistance (66 here, 0 in this PR), every field matches. I did not measure the no-headset answer inside an initialized title, so this does not say the PR's NotDetected values are wrong, only what a title sees with a headset.
  • GT7 polls sceHmd2GetDeviceInformation every frame from its main loop (seen by recording the title's own calls).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263919268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6263919268). Originally posted by [frankea](https://github.com/frankea) on 2026-10-19T09:21:18Z. --- 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): - The four size queries match this PR exactly: `QueryDisplayBufferSizeAlign` 0x6000000 / 0x10000, `QuerySeeThroughBufferSizeAlign` 0x1106000 / 0x100, `GetMirroringDisplayBufferSizeAlign` 0x5FA0000 / 0x10000, `GetMirroringWorkMemorySizeAlign` 0x4000 / 0x100. MLB The Show 25 (no headset, Hmd2 not initialized) gets the same four pairs. - `sceHmd2GetFieldOfViewWithoutHandle` returns 0 with 1.84177089, 0.947190642, 1.32898104, 1.32898104, bit-identical to `DefaultFieldOfView`. - `sceHmd2GetDeviceInformation` with the headset present returns 0 and 28 bytes: status 0, userId 0, panel 4000 × 2040, latency90Hz 5555, latency120Hz 4160, hmuMount 0, lensSeparationDistance 66 (0x42), reserved 0, virtualImageDistance 2.0f. Apart from status (0 here, 2 = NotDetected in this PR) and lensSeparationDistance (66 here, 0 in this PR), every field matches. I did not measure the no-headset answer inside an initialized title, so this does not say the PR's NotDetected values are wrong, only what a title sees with a headset. - GT7 polls `sceHmd2GetDeviceInformation` every frame from its main loop (seen by recording the title's own calls). AI-assisted: yes (Claude Code)
blawesom commented 2026-10-19 19:13:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T19:13:56Z.


Rebase handoff — rebased onto current main (585075cb7, both commits, authorship unchanged).

The resolution, same direction as my earlier flag on this PR: main's b378541e7 deliberately restored the Initialize-fails model (sceHmd2Initialize → UNSUPPORTED_FEATURE), so your first commit's succeeds-model debt text is superseded — I kept main's entry and applied your VrTracker2 before-init answers and the measured size queries on top of it. One consequence I fixed in the docs: main's entry still said the display and see-through size queries "stay unimplemented and throw pending console measurements of their sizes and alignments" — stale once your top commit lands, so that clause now covers only sceHmd2ReprojectionQueryBufferSizeAlign (the one you left unimplemented, its measurement documented in your new entry). Your new entry for the five measurements is untouched.

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, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; guest_hmd2 and guest_vr_tracker2 pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR; conventions pass with two [debt-length] findings (one is main's pre-existing Hmd2 entry, shortened by the clause fix; one is this PR's new VrTracker2 entry — warnings only).

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7690
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 7a5d02a79.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275200830 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7690#issuecomment-6275200830). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T19:13:56Z. --- **Rebase handoff** — rebased onto current `main` (`585075cb7`, both commits, authorship unchanged). **The resolution, same direction as my earlier flag on this PR:** `main`'s `b378541e7` deliberately restored the Initialize-fails model (sceHmd2Initialize → `UNSUPPORTED_FEATURE`), so your first commit's succeeds-model debt text is superseded — I kept `main`'s entry and applied your VrTracker2 before-init answers and the measured size queries on top of it. One consequence I fixed in the docs: `main`'s entry still said the display and see-through size queries "stay unimplemented and throw pending console measurements of their sizes and alignments" — stale once your top commit lands, so that clause now covers only `sceHmd2ReprojectionQueryBufferSizeAlign` (the one you left unimplemented, its measurement documented in your new entry). Your new entry for the five measurements is untouched. 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, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; `guest_hmd2` and `guest_vr_tracker2` pass; **full suite green apart from the four known `main` regressions** (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR; conventions pass with two `[debt-length]` findings (one is `main`'s pre-existing Hmd2 entry, shortened by the clause fix; one is this PR's new VrTracker2 entry — warnings only). **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7690 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `7a5d02a79`.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7690
No description provided.