feat(libs): the Hmd2 reprojection session #7658
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7658"
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 primesoul-web on 2026-10-18T20:36:37Z.
What
the Hmd2 reprojection session on its own, split from the earlier revision of this pull request per its review: libSceHmd2 16/153 -> 22/153 on main
926f7dd492(26.33%, 9171/34833 -> 26.35%, 9177/34833, +6, no regressions; the denominator grew with the firmware-database declaration waves since the pull request was opened, the implemented delta is unchanged).sceHmd2ReprojectionQueryBufferSizeAlignanswers the console's requirement as measured in the discussion below (firmware 13.40 and 13.60): 0x100828 bytes at 0x100 while the process's positional setting is unset, and 0x1103000 + n * 0x1000000 at 0x1000 oncesceHmd2ReprojectionSetAllowPositionalReprojectionhas recorded a first argument of n = 1 to 5; the setting is process-wide without an initialization, answers 0 for 0 to 5 andPARAMETER_INVALIDfor anything else with the previous setting kept, and the query never reads its own arguments.sceHmd2ReprojectionInitializeanswersPARAMETER_NULLfor a null param or buffer, throws for an auxiliary-memory buffer and writes the 16-byte state (output mode, timing in microseconds) into the guest's work buffer with the timing the param carries or the 3000 us default; a second initialization answersREPROJECTION_ALREADY_INITIALIZED. The firmware first reads the process's app info and answers 0x8A72001F before its arguments when that fails or the info's nonzero attribute field lacks bit 0x400 (measured, firmware 13.40 — the answer MLB The Show 25 gets on #8645); the emulator's app info does not model the attribute fields, so every caller passes the gate, and the debt entry records the difference. The signatures follow the ABI restored on main (the firmware-database sweep of 2026-10-21): a two-argumentInitializewhosereservedsecond parameter is ignored, a single-argumentSetAllowPositionalReprojection, and the sweep'sReprojectionInitializeParameterfield names at the same offsets this PR's 72-byte validation pinned — the console ignores the extra arguments, so the measured table is unchanged.sceHmd2ReprojectionSetTiminganswersNOT_INITIALIZEDwithout a session,PARAMETER_INVALIDbelow 2000 us and above 7000 us and otherwise rounds the value up to the next hundred microseconds, answering 0 at once when the rounded value equals the current timing (measured, firmware 13.40 — the earlier revision threw out of range); the module forwardssceVideoOutSetDisplayEventPosition's result when the timing changes, which the debt entry holds until VideoOut grows that export.sceHmd2ReprojectionEnableVrModeanswersNOT_INITIALIZEDwithout a session,VIDEO_OUT_ERROR_INVALID_VALUEfor an output mode other than 0x2000C and 0x2000F and otherwiseVIDEO_OUT_ERROR_NO_DEVICE.sceHmd2ReprojectionTerminateends the session (the memory point in the review): it clears the record under the reprojection mutex, so the gated exports answerNOT_INITIALIZEDagain and a new initialization is accepted. The teardown follows the session model and is not a console measurement, and the positional setting survives it. The record is a borrow of the guest's work buffer: the guest keeps the buffer for the session's lifetime and frees it after terminating, every read and write of the record happens inside an export call under the mutex, and a guest that frees the buffer while the session is live corrupts its own heap exactly as it would on hardware. The debt entry carries the full wording.T3cm0's #7690 (the console display and mirroring sizes) landed in the same four files and is carried unchanged in 59f2d3339's resolution: its four implementations, its size-query test and its debt bullet are main's, and the stale "display and see-through stay unimplemented" sentence is dropped from the Silent stubs bullet since the merged tree implements them. His #7798, #7805 and #7826 add other Hmd2 exports in the same files; the hunks do not meet, and whichever lands second rebases.
Tested
GuestHmd2 walks the measured table and the session on top of #7760's without-headset tests, #7690's console size-query session and the ABI-restored signatures carried in
4cf2a20f1(the pre-session block and the session walk call the new forms; nikowolf123's two mutations rebuilt as negative controls still abort on the carried head): the rejected settings keep the previous answer, n = 1, 2 and 5 answer 0x2103000 / 0x3103000 / 0x6103000 at 0x1000, n = 0 restores 0x100828 / 0x100, the timing answersPARAMETER_INVALIDbelow 2000 and above 7000 with the recorded setting kept, 2001 rounds to 2100, a repeat of 2100 answers 0 at once, the range ends 2000 and 7000 succeed, and the terminate teardown answers NOT_INITIALIZED for the gated exports and accepts a re-initialization with the default timing. The measured-timing rows and the app-info gate follow frankea's firmware 13.40 module read and GT7 session measurements (2026-10-26), carried in head24d4edc4ftogether with main's canonical-headers refactor; the negative control against main's markerExport.cppstill aborts at the session exports. oneandonlydean's review asks are addressed in head1f774a2e4: the guest test keeps to the session's real behaviour and argument validation (the auxiliary-memory throw is no longer pinned), and the debt bullets name the measured session's title id instead of its name. The branch carried currentmain's Hmd2 debt-file restructure in head3226e99a8with both sides kept, and GuestHmd2 plus the negative control were re-verified on the carried tree (the carry notice of 2026-11-01).Checklist
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T22:33:39Z.
Two existing tests fail with this PR, on Windows and probably elsewhere. Their expected messages still have the
not implementedsuffix thatNotImplemented_nid_no_patchadds. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release,BUILD_TESTING=ON.With this PR merged alone onto
main8a456334f,guest_sysarchandguest_offline_importsabort (0xc0000409), 2 runs of 2. Without it they pass.guest_offline_imports(GuestOfflineImports.cpp:43) expects"sceHttpSetCookieEnabled not implemented".sceHttpSetCookieEnablednow throws"sceHttpSetCookieEnabled: the offline backend has no cookie engine". That check isn't guarded by host, so it should fail on Linux too.guest_sysarch: the two new messages for operations 129 and 7 match (I printed whatThrownreturns). On hosts other than x86-64 Linux, though, the#elsebranch of the test still expects"sysarch: segment bases on this host not implemented", whilesysarchnow throws"sysarch: segment bases on this host". So it fails on Windows and macOS and passes on Linux.Separately, AGENTS.md asks for
NotImplemented_nid_no_patch(__func__)for exports that can't be implemented. Several of these changes replace it with a plainthrow std::runtime_error, which a reviewer may want to keep as it was.AI-assisted
Imported from boykopovar/AnyPS5. Originally posted by T3cm0 on 2026-10-18T23:57:11Z.
Two console datapoints for the Hmd2 part, measured on a retail PS5 (firmware 13.60, no headset) by loading
libSceHmd2.sprxin a homebrew payload and calling the exports directly:sceHmd2ReprojectionQueryBufferSizeAlignreturns size 0x100828 and alignment 0x100 (RAX:RDX), the same for every argument tried: the(2, 0xAF, 1)that Horizon Call of the Mountain (PPSA05666) passes, and changes to each of the three. The{16, 8}from KytyPS5's state struct is not what the console answers, so a title allocates a 16-byte reprojection buffer here where the console asks for ~1 MiB. The other size queries are also fixed values:QueryDisplayBufferSizeAlign0x6000000/0x10000,QuerySeeThroughBufferSizeAlign0x1106000/0x100,GetMirroringDisplayBufferSizeAlign0x5FA0000/0x10000,GetMirroringWorkMemorySizeAlign0x4000/0x100.ReprojectionInitializeParamlayout matches what PPSA05666 passes, captured under AnyPS5: reprojection and display buffer pointers at +0 and +8, 0x100 at +16, 0x1FFF at +20, 4 and 4 at +24/+28, 2 at +32, a null see-through buffer at +40 and 0 at +48 (default timing). It then callssceHmd2ReprojectionEnableVrMode(0x2000F), so the two output modes are right too.I had the five size queries ready as a follow-up to #7463 with those console values; happy to drop
QueryBufferSizeAlignfrom it if you take the measured value here, or to leave it to you entirely. Whatever is easier.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T02:16:40Z.
Datapoint from Gran Turismo 7 (PPSA01317, 01.000.001 base package) on
main324e0e48e+ this PR: thesceHmd2ReprojectionQueryBufferSizeAlign not implementedstop that every GT7 run onmainhas hit since #7323 is gone, 3 of 3. The title takes the{16, 8}answer and asks the next size query 0x48 bytes later in the same function, which this PR leaves throwing; with #7690 on top it passes all four and goes on tosceVrTracker2Initialize(#7463's remaining throw):main48d61f53b(10/18 afternoon, reference)sceHmd2ReprojectionQueryBufferSizeAlign not implemented, SIGABRTlibSceHmd2.prx+0x1ba0underapp.exe+0x952effmain324e0e48e+ this PR (head b2f28a778)sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented, SIGABRTlibSceHmd2.prx+0x1c90underapp.exe+0x952f47main324e0e48e+ this PR + #7690 (heade191a132a, which carries #7463)sceVrTracker2Initialize not implemented, SIGABRTlibSceVrTracker2.prx+0x1650underapp.exe+0x95310aAll three stops are on the same module-load thread (a
libSceSysmodule.prx+0x347eframe is on every stack), before the first frame: the window opens and the process aborts 5 to 10 s in. stdout is 72 lines with this PR and 73 with #7690 added (the extra line issceSysmoduleLoadModule unknown id: 299, loaded between the Hmd2 queries and the tracker). Nothing in the title's behaviour distinguishes{16, 8}from the console's{0x100828, 0x100}yet; it never reachessceHmd2ReprojectionInitializewith that buffer because the tracker throws first.Horizon Call of the Mountain (PPSA05666, v01.004.011) on the same
main+ this PR + #7690 tree: 3 of 3 stop onsceVrTracker2Initialize not implemented(108 s cold cache, 10 s, 11 s), exactly as with #7463 alone; nosceHmd2Reprojection*export is called before that abort, so this PR's Hmd2 session is not exercised by that title yet.Two notes on the tree:
maininlibSceJson2(Export.cpp,GuestJson.cpp, the debt file): #6126 (7e4b1b7c3) implementssetTypeMismatchHandler,setSpecialFloatHandlerandsetElementAccessFailureHandlerwith aValue* selffirst parameter, this PR implements them without one. For these runs I keptmain's three files, so the Json2 part of the PR was not built; everything else was.Hmd2::SizeAligninHmd2.hpp(plus the debt bullet); kept this PR's struct block and both PRs' declarations.stderr, run 2 with this PR alone (abort block)
stderr, run 3 with this PR + #7690 (abort block)
Tested. Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7 (UCRT), Release
libstarget, ccache, built in one worktree;app.exeis the relink frommain31cbb55d7, onlylibs/is swapped. Desktop session, no input, three runs per tree in a row, 600 s cap, box otherwise idle. Not a review of the console values.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by omar-akermi on 2026-10-19T03:10:08Z.
@primesoul-web We are preparing a libSceHttp transport contribution in https://github.com/omar-akermi/AnyPS5/pull/1 and are coordinating the shared
sceHttpSetCookieEnabledchange before opening it upstream.Your change preserves the offline backend's rejection of cookie enabling. Our branch replaces that offline backend with a per-context curl cookie engine, including inherited enable/disable settings and cookie receive callbacks, so it supersedes this particular error path. We are currently integrating and retesting against upstream
ca13a56a5; Windows, native Linux and ASAN results from the previous integrated revision are linked in the fork draft.Proposed merge order: #7658 first, then the HTTP transport. If #7658 lands first, we will merge its resulting main revision and retain the real cookie implementation when resolving this hunk. If the transport lands first, #7658 should drop its cookie-only hunk rather than restore the offline throw. The transport has no functional dependency on the other exports in this PR.
Does that order work for you? No agreement is assumed until you reply; we will record the agreed order and any required dependency in the upstream PR checklist.
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T05:55:26Z.
Thank you for the Windows run and the precise reproductions — both failures are fixed in 93bbeb3f4.
guest_offline_importsnow expects the offline backend's message:sceHttpSetCookieEnabled: the offline backend has no cookie engine.guest_sysarch's#elsebranch now expectssysarch: segment bases on this host, matching the reworded throw; the x86-64 Linux branch was already updated by the first revision and the other-host branch was missed, exactly as you found. Both binaries were rebuilt and run from the branch merged into currentmainand pass here (Linux); the other-host branch is a text match against the same string the throw builds.On the
AGENTS.mdpoint: every conversion in "The other documented error paths" is an export whose states a title reaches were already implemented and kept the marker only on a side state that the library's debt file already describes as a throw. The marker's own behaviour is the samestd::runtime_error; the wording keeps the debt file's words and only drops the " not implemented" suffix the marker appends, and nothing returns a made-up success. That is the reading the PR body argues, but it is a policy call, not a technical one: if you or a maintainer prefer theNotImplemented_nid_no_patchform kept on any of these side states, say which and I will revert those conversions here.symlinkalready went the other way — 93bbeb3f4 restores the markers #6200 kept and extended.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T05:55:27Z.
Thank you for the retail measurement — adopted. 93bbeb3f4 makes
sceHmd2ReprojectionQueryBufferSizeAlignanswer the measured 0x100828 / 0x100 for every argument (constantsHmd2::ReprojectionBufferSize/ReprojectionBufferAlign), with the debt file now naming the console as the source and noting that KytyPS5's 16-byte state is not what the console answers; the session's 16-byte state sits at the start of that buffer. GuestHmd2 asserts the measured pair and allocates the full size.Please keep all four remaining size queries in your #7463 follow-up — this PR deliberately leaves them throwing so your measured
QueryDisplayBufferSizeAlign0x6000000/0x10000,QuerySeeThroughBufferSizeAlign0x1106000/0x100,GetMirroringDisplayBufferSizeAlign0x5FA0000/0x10000 andGetMirroringWorkMemorySizeAlign0x4000/0x100 land there in one place (frankea's GT7 runs below show the title walking into exactly that throw next, and past all four once #7690 carries your values). Nothing needs to be dropped from your branch.The layout confirmation for
ReprojectionInitializeParamand the0x2000Fmode is great to have — both match what GuestHmd2 now pins.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T05:55:28Z.
Thank you for the three-tree measurement — the stop-walk table and the stderr blocks make the remaining throw chain unambiguous, and the "same module-load thread, before the first frame" observation is a nice confirmation that this is the set-up path and nothing else.
Both tree notes are addressed in 93bbeb3f4:
main's #6126 files wholesale (Export.cpp,GuestJson.cpp, the debt wording), so the no-selfversions are gone and the three files matchmain. The branch now merges clean intomain4ffb0cd12(git merge-tree), with only the Hmd2/Ime/SystemService files auto-merging.{16, 8}answer:QueryBufferSizeAlignnow returns the console's 0x100828 / 0x100 from T3cm0's retail measurement, so a title allocates the ~1 MiB buffer the console asks for instead of 16 bytes. The other four size queries stay throwing for the #7463 follow-up, as in your runs.On the predicted
Hmd2::SizeAlignduplicate with #7690: this branch keeps the struct block as in your resolution, and #7690's declarations ride on top when it rebases.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T05:55:30Z.
That order works for us: #7658 first, then the HTTP transport. The branch keeps the offline backend's rejection hunk, and 93bbeb3f4 updates
guest_offline_imports' expectation to the offline message (sceHttpSetCookieEnabled: the offline backend has no cookie engine), so your resolution on top replaces the hunk and that expectation together with the real cookie engine in one pass.No dependency from this PR's other exports on the transport. If the maintainer happens to land the transport first, we will drop the cookie-only hunk here as you propose rather than restore the offline throw — please link the upstream PR here when it opens and we will record the agreed order either way.
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-19T07:07:39Z.
Rechecked 93bbeb3f4 on Windows (AMD Radeon 860M, WinLibs GCC 15.2.0, Release), merged into
main6b8228b2b:guest_sysarchandguest_offline_importsnow pass, 3 of 3 each. Both aborted on the previous head, so the fix covers the two failures I reported.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T09:16:20Z.
Thank you for the re-run — that closes both failures out.
guest_sysarchandguest_offline_importswere the two Windows aborts you reported on the first revision, and 3/3 each on 93bbeb3f4 (WinLibs GCC 15.2.0, Release, merged intomain6b8228b2b) confirms the expectations now match both backends' messages on a second platform, not just the Linux run here.Since your run, the branch has carried #7760 (merge commit 19a0adac4): #7760 restores the unavailable-runtime initialization on
main, so the guest Hmd2 tests keep its init-fails checks with the reprojection session on top, and the debt entry keeps its restored-init wording. Neitherguest_sysarchnorguest_offline_importschanges in that carry, so your validation stands for the new head as well.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T09:21:17Z.
Console measurement for
sceHmd2ReprojectionQueryBufferSizeAlign(retail PS5, firmware 13.40): the answer is not one fixed pair. It follows the first argument of the lastsceHmd2ReprojectionSetAllowPositionalReprojectioncall in the process and never the query's own arguments. In a plain payload process withlibSceHmd2.sprxloaded and Hmd2 not initialized (the setting of T3cm0's measurement above), the query answers 0x100828 / 0x100 untilSetAllowPositionalReprojectionis called, and afterwards:SetAllowPositionalReprojectionreturnsSo for n = 1 to 5 the size is 0x1103000 + n × 0x1000000 with alignment 0x1000. The second and third arguments made no difference (0x100000001, 0x100000000, 1 and 0 for the second; 1 and 0 for the third).
The same holds inside retail games. In MLB The Show 25 (PPSA23479), after
SetAllowPositionalReprojection(2, 0x100000001, 1)the query answered 0x3103000 / 0x1000. Inside Gran Turismo 7 (PPSA01317, 01.690.000), which importsSetAllowPositionalReprojectionand has set up its own reprojection by then, the query answers 0x100828 / 0x100 for ten argument combinations, so GT7 leaves n at 0. Horizon Call of the Mountain (PPSA05666) callsSetAllowPositionalReprojection(2, 0x100000001, 1)right before its query (seen under AnyPS5 with a logging stub for that export), so on a console it is answered 0x3103000 / 0x1000; with 93bbeb3f4 it gets 0x100828 / 0x100, which is right for GT7 and for a payload but smaller than what Horizon would get.How it was measured: the payload numbers come from a homebrew payload that loads
libSceHmd2.sprxand calls the exports directly; the in-game numbers from an elfldr payload attached to the running game with ptrace, which borrows a stopped game thread, calls the export and restores the thread.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T11:45:53Z.
Thank you for the sweep — the payload-plus-ptrace methodology settles the state question directly, and the table reconciles exactly with T3cm0's firmware-13.60 datapoint: his every-argument measurement was the unset setting, and yours shows the query never reads its own arguments at all.
Adopted in e7f4cb6e7.
sceHmd2ReprojectionSetAllowPositionalReprojectionnow answers 0 for a first argument of 0 to 5 and records it process-wide without an initialization, andPARAMETER_INVALID(0x8A720009) for anything else with the previous setting kept — 6, 7, 8, 0xFF and 0xFFFFFFFF covered, the second and third parameters accepted and ignored as measured.sceHmd2ReprojectionQueryBufferSizeAlignnow follows that setting: 0x100828 / 0x100 while unset or 0, and0x1103000 + n * 0x1000000/ 0x1000 for n = 1 to 5 (constantsHmd2::ReprojectionPositionalBufferSize/ReprojectionPositionalBufferSizeStep/ReprojectionPositionalBufferAlign).GuestHmd2 walks the measured table: a rejected setting keeps the previous answer, n = 1, 2 and 5 answer 0x2103000 / 0x3103000 / 0x6103000 with 0x1000 alignment, and n = 0 restores 0x100828 / 0x100. The debt entry carries the firmware-13.40 measurement together with the PPSA23479 / PPSA05666 / PPSA01317 title evidence.
That also closes the Horizon gap: PPSA05666's
SetAllowPositionalReprojection(2, 0x100000001, 1)in front of its query now gets 0x3103000 / 0x1000 like the console, while GT7's untouched setting keeps 0x100828 / 0x100.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T16:46:21Z.
Checked e7f4cb6e7 against the measured table: it matches every row. The default setting is 0, so the query answers 0x100828 / 0x100 until
SetAllowPositionalReprojectionis called, as GT7 and a fresh payload process saw. A first argument of 0 to 5 returns 0 and gives 0x1103000 + n × 0x1000000 with alignment 0x1000 (n = 1 to 5: 0x2103000, 0x3103000, 0x4103000, 0x5103000, 0x6103000), anything else returns 0x8A720009 and keeps the previous setting, and the second and third arguments are ignored. With the first parameter typedint32_t, the measured 0xFFFFFFFF arrives as -1 and is refused by themode < 0check, which is what the console did. One thing I did not measure: whethersceHmd2ReprojectionTerminateor a secondsceHmd2ReprojectionInitializeresets the setting to 0, so the process-wide value surviving those calls is an assumption, not a measurement.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T16:50:49Z.
Review: CHANGES_REQUESTED
Thanks for the Hmd2 work and for folding in the console measurements; that part is solid. This PR can't land as it is, though:
GuestBluetoothHid.cpp) and #6844 (GuestHmd2.cpp). Please split it: the Hmd2 reprojection session on its own,sceImeOpenfilters on their own, and so on, each rebased onmainwith the overlap check run.NotImplemented_nid_no_patch(...)withthrow std::runtime_error(...)at the same condition (e.g.libSceAgc/Misc/src/Suspend.cpp:19, thelibSceAjm.native/src/Ajm.cppbatch family,libScePad/Export.cpp:167,libSceHttp2/Export.cpp:78,libkernel/Pthread/Posix/Thread.cpp:71,libSceSystemService/Export.cpp:320). The body says nothing a title observes changes, so these only move the progress metric. Please drop them. Where a path really is unmodelled it should keepNotImplemented_nid_no_patch, as the checklist line says.libScePsml_debugMFSR calls,sceBluetoothHidGetDeviceName/GetInputReport/SetOutputReport,sceContentExportFrom*,sceNpTrophy2GetRewardIcon) still throw on every call, so they are not implemented. Either implement the offline/error return the references give (cite KytyPS5/shadPS4/prosper per export) or keep them as markers and out of the count.sceHmd2ReprojectionInitializekeeps a raw pointer into the guest buffer inreprojectionStatewith no teardown; say what clears it if the guest frees the buffer.Once split, the Hmd2 and Ime parts can be reviewed on their own.
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T17:34:27Z.
Thank you for the review — the split is done and every point is addressed.
One topic per PR. This pull request is now the Hmd2 reprojection session alone: four files (
Export.cpp,Hmd2.hpp,GuestHmd2.cpp, the debt entry), rebased on mainb6583dd86. ThesceImeOpenfilters are their own pull request: https://github.com/boykopovar/AnyPS5/pull/8009. Everything else from the earlier revision is off the branch. The BluetoothHid hunks are gone entirely, so the #6832 overlap disappears, and #6844's content has been in main since b6583dd86's wave — it is carried here, not overlapped. T3cm0's #7798/#7805/#7826 add other Hmd2 exports in the same four files; the hunks do not meet, and whichever lands second rebases.Marker-to-throw. Dropped, all of them: Agc (Acb, DcbState, Suspend), the Ajm batch family, AudioOut2Mastering, the Http cookie path, Http2, Pad, SystemService and the libkernel cpuset/rtprio paths keep
NotImplemented_nid_no_patchagain at the same conditions, and the tests that expected the new messages are back to the marker wording.Exports that only throw. I audited the references before deciding: SharpProspero and the firmware dumps give the signatures only — no offline or error returns anywhere — and KytyPS5 implements only BluetoothHid's Init and RegisterDevice. So per the rule they are markers again and out of the count: the BluetoothHid report and name exports, the ContentExport
From*family,sceNpTrophy2GetRewardIconand the Psml MFSR calls. If a reference with a real return surfaces, or one of the hardware owners measures one, they can come back per export.Memory.
sceHmd2ReprojectionTerminatenow clears the session record under the reprojection mutex, so the gated exports answerNOT_INITIALIZEDagain and a new initialization is accepted; GuestHmd2 walks the teardown and the re-initialization. The debt entry states the borrow: the guest keeps the work buffer for the session's lifetime and frees it after terminating, every read and write of the record happens inside an export call under the mutex, and a guest that frees the buffer while the session is live corrupts its own heap exactly as it would on hardware. The teardown follows the session model and is not a console measurement — if frankea's or T3cm0's payload methodology can measure Terminate on a console, the debt entry will take the answer.The metric is re-measured honestly on the new scope: main
b6583dd86= 79.86% (4123/5163); this PR = 79.97% (4129/5163), +6; the Ime PR = 79.88% (4124/5163), +1; no regressions in either. LeandroLP23's Windows validation stands — the offline-imports and sysarch tests are main's content again. And with the cookie hunk dropped, omar-akermi's transport PR will carrysceHttpSetCookieEnabledwhole, as we agreed.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T18:22:46Z.
Horizon Call of the Mountain (PPSA05666, v01.004.011) on current
mainf52509accstops before the first frame onsceHmd2ReprojectionSetAllowPositionalReprojection not implemented, 3 of 3 runs. Sinceb378541e7makessceHmd2InitializereturnUNSUPPORTED_FEATURE, this title no longer reacheslibSceVrTracker2: it ignores the failed initialization (it is PS VR2-only) and goes straight into its reprojection set-up, whose first call isSetAllowPositionalReprojection.On
mainf52509acc+ this PR (head235adb04b, clean merge) that stop is gone: all three runs get past it and abort on the next size query,sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implemented(20, 20 and 11 s after launch), which is #7690's. So for this title the PR is the first of the two it needs, also with the runtime reported as unavailable. #7690's head (e191a132a) does not merge cleanly on top of this head (Hmd2.hppand the debt file), so I did not run the pair on currentmain.mainf52509accsceHmd2ReprojectionSetAllowPositionalReprojection not implementedmainf52509acc+ #7658 (235adb04b)sceHmd2ReprojectionQueryDisplayBufferSizeAlign not implementedSetup. Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7, Release
libstarget;APS5_PLAYGO_UNLISTED_CHUNKS=absent, no input, 240 s cap,app.exerelinked 10/14.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-19T18:45:06Z.
Thank you for the third title — this one exercises the session model end to end.
PPSA05666 ignoring the
UNSUPPORTED_FEATUREfromsceHmd2Initialize(b378541e7) and walking straight into reprojection set-up is exactly the path that has to work without a headset, andSetAllowPositionalReprojectionbeing its first call means the title hits the FW 13.40 table directly:235adb04banswers 0 for itsn = 2call, the buffer-size query that follows gets the recorded setting's 0x3103000 / 0x1000, and the stop you reach is the size query after that —QueryDisplayBufferSizeAlign, #7690's measured export — so the two PRs chain for this title exactly as you describe.The #7690 head not merging cleanly on this head is the known same-four-files adjacency (T3cm0's rule: whichever lands second rebases) — adjacent additions in
Hmd2.hppand the debt entry, no behavioral overlap. With the review approved the ordering resolves itself at merge time; if #7690 lands second its rebase carries both measured size families together.Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T22:04:16Z.
The positional-setting checks from L115 on all run inside the session opened at L90. The two rejected calls also run while the recorded setting is still 0. So
GuestHmd2does not pin two behaviours that the PR body and the debt entry state. I built a standalone copy of the six exports andTestReprojectionfrom this head (WinLibs GCC 15.2.0). It still passes after either of these changes tosceHmd2ReprojectionSetAllowPositionalReprojection:SetTimingandEnableVrModehave (if (reprojectionState == nullptr) return Hmd2::ReprojectionNotInitialized;). The FW 13.40 table was measured with Hmd2 not initialized. That same comment shows Horizon (PPSA05666) callingSetAllowPositionalReprojection(2, 0x100000001, 1)right before its query. According to frankea's run on this PR, this is its first reprojection call, before anysceHmd2ReprojectionInitialize. With the gate, that call gets 0x8A72000B. The query after it then answers 0x100828 / 0x100 instead of the table's 0x3103000 / 0x1000 for n = 2.Inserting this before L90 passes on this head and aborts on each of the two changes. The last call restores 0, so the checks that follow are unchanged:
Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-21T02:30:53Z.
On @nikowolf123's two points, to pin down where the 13.40
SetAllowPositionalReprojectiontable above came from: every row was measured with no reprojection session open, and nothing was measured inside a session.libSceHmd2.sprxand calls the exports, with nosceHmd2InitializeorsceHmd2ReprojectionInitialize.SetAllowPositionalReprojectionreturned 0 for n = 0 to 5 there, and the query followed it. Inside a retail game process (MLB The Show 25, PPSA23479, not a VR title) the same held without a session: aftersceHmd2InitializeandsceHmd2ReprojectionInitializehad failed (0x8A72001F),SetAllowPositionalReprojection(2, 0x100000001, 1)returned 0 and the query answered 0x3103000 / 0x1000, while the session calls (EnableVrMode,SetRenderConfig,BeginFrameand others) returned 0x8A72000B. So on the console this export is not gated on a session the waySetTimingandEnableVrModeare, and Horizon's first call should succeed.(0, 0, 0)returned 0 and brought it back to 0x100828 / 0x100. That is the sequence nikowolf123's proposed check pins.SetAllowPositionalReprojectionthere, so what the export returns, and whether it still moves the query once a session is open, is unmeasured.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-21T07:35:50Z.
Thank you for the audit and for building the standalone copy with both mutations - the insert is adopted verbatim, and both mutations now abort on this branch.
TestReprojection: the setting call without a session returns 0 and the query follows it (0x3103000 / 0x1000for n = 2), a rejected setting keeps the previous non-zero answer, and the final(0, 0, 0)restores 0 so the session checks that follow are unchanged.SetTiming/EnableVrModesession gate aborts at "the positional setting without a session did not succeed", and resetting the setting on the reject path aborts at "a rejected positional setting did not keep the previous non-zero setting". So the two behaviours the body and the debt entry state are now pinned, not just described.The branch also needed a merge this round -
hmd2-missing-exportslanded onmain(the before-initialization wave, now carried by headb9969a745) - and the three named markers that wave replaced (sceHmd2GazeActivateGazeTracking,sceHmd2ReprojectionGetCurrentOutput,sceHmd2SetFieldOfView) dropped their throw checks with it; their NIDs answer through the wave's wrappers now, and the debt entries followmain's audited lists.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-21T07:35:51Z.
Thank you for writing the origin down - it settles both points exactly, and the debt entry now carries it.
SetAllowPositionalReprojection/QueryBufferSizeAlignmeasurement was taken without a reprojection session, and that what the setting call returns inside a session, and whether the query still follows the setting there, is not measured - with PPSA01317's in-session queries noted as exercising only the unset setting (always 0x100828 / 0x100).GuestHmd2now asserts directly, per nikowolf123's insert above: the export is not gated on a session the waySetTimingandEnableVrModeare, and Horizon's first call succeeds.Head
b9969a745carries all of it over thehmd2-missing-exportsmerge.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-21T15:20:47Z.
Noting the two new neighbours the overlap bot lists, neither a dependency:
BeginFrame,GetStatus,SetMirroringOption,DisableMirroring,DisableVrMode) — complementary exports in the same four files, the usual same-files adjacency: whichever lands second rebases, as with #7463/#7690/#7826 before it.NotImplemented_nid_no_patch— it is a signature sweep, not a behavioral overlap. Its parameter layout matches the captured 72-byteReprojectionInitializeParamthis PR validates. Coordination note posted there: comment — this branch adopts the sweep's signatures (thereservedparameter ofInitialize, the single-argumentSetAllowPositionalReprojection) if it lands first; the measured table is unaffected because the console ignores the extra arguments.The branch is clean against current
maincecb540a6(git merge-tree), all checks green onb9969a745.Imported from boykopovar/AnyPS5. Originally posted by primesoul-web on 2026-10-22T07:49:49Z.
The ABI sweep landed on
main, and this branch carries it over the session in head4cf2a20f1— per the coordination note on the sweep, the restored signatures are adopted whole: the two-argumentsceHmd2ReprojectionInitialize(thereservedsecond parameter ignored, the console's extra arguments unrecorded), the single-argumentsceHmd2ReprojectionSetAllowPositionalReprojection, and theReprojectionInitializeParameterlayouts with the sweep's field names (workMemory,displayMemory,auxiliaryMemory,timingInterval— the same offsets this PR's 72-byte validation pinned). The struct moves toHmd2.hppsoGuestHmd2can construct it, followingDeviceInformation/FieldOfView's placement; the mirroring/parameter structs the sweep added stay inExport.cppwith their markers.The measured table is untouched — frankea's 13.40 rows and T3cm0's 13.60 datapoint answer exactly as before, because the console ignores the arguments the restored ABI drops.
GuestHmd2adapts: the pre-session block and the session walk call the new signatures (SetAllowPositionalReprojection(2),Initialize(¶m, nullptr), the 0xFF truncation covering the console's 0xFFFFFFFF reject row),main()'sQueryBufferSizeAlignthrow expectation drops (the implementation supersedes it) while the wave's before-initialization checks stay, and both of nikowolf123's mutations were rebuilt as negative controls against the new head — the session gate aborts at "the positional setting without a session did not succeed", the reject-path reset aborts at "a rejected positional setting did not keep the previous non-zero setting". The debt entry moves with the sweep's restructure (recovered contracts vs remaining gaps), keeps the session bullet with the no-session origin note, and the PPSA import bullets stay.Re-measured on the merged tree against
maind6eafa54d: 4834/11181 (43.23%) -> 4840/11181 (43.29%), libSceHmd2 13/104 -> 19/104, +6, no regressions.git merge-treeagainstmainis clean; all conventions checks pass (the pre-existing session-bullet length warning is unchanged from the approved head).