docs(libSceVideoOut): record a PS5 measurement of the vblank status third word #16584
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16584"
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 xXPBSXx on 2026-11-07T06:56:16Z.
What
The
sceVideoOutGetVblankStatusentry says the clock of the third 64-bit word, and what it counts from, are not established. This adds what a PS5 returns in a payload process: the word advances at the rate of the same process'srdtsc(about 1.596 GHz on that console) and trails anrdtscread just before the call by about 6 ms, less than one vblank period, consistent with the TSC at the latest vblank. It also advances in step withprocessTimeCounter: the word minusprocessTimeCounterwas 0x19c1be2eaacb, 0x19c1be2eaf5c and 0x19c1be2eaece in the three calls, a spread of 1169 ticks. AnyPS5 still writes 0, so no code changes and the Closes when stays. To keep the entry under the length limit, the firmware 13.40 sentence keeps only the third word's value; the other fields' values and the "about 970 s at ~2 GHz" estimate are dropped, as the measured rate replaces that estimate.Tested
Measured on a PS5 with firmware 11.60 (
kernel_get_fw_version0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-06 at 19:22 UTC, on a handle fromsceVideoOutOpen(0xff, 0, 0, NULL)with no registered buffers and no flips. A title process may differ.mainsceVideoOutGetVblankStatus, three calls 200 ms apartcount0x1, 0xd, 0x19rdtscbefore the call, rate over the same intervalsrdtscbefore the call minus third wordThe rates are differences between consecutive calls divided by the
CLOCK_MONOTONICtime between them (0.2002 s), worked out from the raw output. The status layout is the one AnyPS5 uses; there is no SDK header for it. The probe source and its raw output are in the first comment.tools/check_conventions.py --base upstream/mainpasses.Overlap: the 15 open pull requests that change
docs/dev/debt/libSceVideoOut.mdwere checked on 2026-11-07 between 06:05 UTC and 06:25 UTC againstmain779572c799, which has no commit that changes this file since this change's basee88dbd3af70. #4040 already conflicts withmainin that file without this change; #14212, #16463 and #12315 conflict withmainonly in other files. None conflicts because of this change, and the other eleven merge cleanly with and without it.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:48:56Z.
Review: COMMENTED
Read
fbb6abfdf3againstmain.Correctness. The entry is still current on
main(docs/dev/debt/libSceVideoOut.md:35) and the code is as described:Output.cpp:sceVideoOutGetVblankStatuscopiescfg->vblankStatusfor a PS5 handle, andVideoOutVblankStatus::reserved(SceTypes.hpp:2334) is never set, so the third word is 0. The new text keeps the "Closes when" clause, which is still right because the word is still written 0.Non-blocking. The rewrite removes the previously recorded 13.40 values (count,
processTime,processTimeCounter, flags, phase) and the "about 970 s at ~2 GHz" estimate. The PR description says this is to stay under the entry length limit, and the estimate is superseded by the 1.596 GHz rate, but the 13.40processTime/processTimeCountervalues are now only in the history. If the length warning is the only reason, keeping the two counter values and shortening the title list would lose less. The 11.60 payload-process measurement is not checkable here.Not run here; this is from reading the code.
AI-assisted: yes.