fix(libSceVideoOut): answer the event getters as firmware 13.42 does #18308
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18308"
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 zaryabzip on 2026-11-11T05:37:06Z.
What
The three VideoOut event getters now give firmware 13.42's answers:
mainsceVideoOutGetEventId(nullptr)0x80290002(INVALID_ADDRESS)sceVideoOutGetEventDatawith either pointer null0x80290002sceVideoOutGetEventCountof an event of another filterdata0x8029000d(INVALID_EVENT)Source. @BunnyFl's reading of
libSceVideoOut.sprxon #15134 (comment), all three read to every return. It came from disassembly; nothing was run on a console.sceVideoOutGetEventId(entry0x127e0): a null event gives0x80290002. A filter other than0xfff3gives0x8029000d. Otherwise it switches on the ident's top 16 bits.sceVideoOutGetEventData(entry0x12880): either pointer null gives0x80290002. A filter other than0xfff3gives0x8029000d. Otherwise it storesdata >> 16, sign-extended only for a negative flip event.sceVideoOutGetEventCount(entry0x12850) returns bits 12 to 15 ofdataand checks nothing.The current debt entry already says a null pointer throws here where shadPS4 and fpPS4 return
INVALID_ADDRESS. The firmware agrees with them.Change (
Event.cpp).VIDEO_OUT_ERROR_INVALID_ADDRESS.sceVideoOutGetEventCountdrops its filter check.sceVideoOutGetEventCountstill throws: the firmware reads through it, so there is no code to return.0x8029000dthere.Debt (
libSceVideoOut.md). The existing getter entry now cites the 13.42 reading. It records the null throw inGetEventCount, and thatGetEventIdstill returns the event id itself, where the firmware maps the top 16 bits of its own idents.Test (
GuestVideoOutEventId.cpp, ctestguest_video_out_event_id, no display needed).Throwsrows for the null pointers becomeReturns(..., 0x80290002), and the null-event row also checks thatdatastays unwritten.RejectsEventOfAnotherFilternow expectsGetEventCountto return the event's count bits. The graphics-core event'sdatabecomes0x5001, so that row expects 5, not 0.Overlap. #17292 (@al3w0f205, test-only) merged first.
93f03f02f5mergesmainand keeps its new rows, then this PR's null rows in place of its threeThrowsrows. The macOS harness still passes this head, andmain's getters still fail exactly the five changed rows.Tested
Event.cppinto a host harness and linked with this test file.main's getters fail exactly the five changed rows: the two other-filter count rows return0x8029000d, and the three null rows throw.f32ba8c2e1merged ontomaina7ac923b80, a clean merge (comment). Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release:guest_video_out_event_idpasses 3 of 3.f32ba8c2e1merged ontomain28237a8567, a clean merge (comment). Windows 11 x64, WinLibs GCC 15.2.0 r7, Ninja, Release:guest_video_out_event_idpasses 3 of 3. With this PR's code reverted tomain, it fails 2 of 2.748619b4ae, after these runs, only renames the test'sRejectsEventOfAnotherFilterhelper toCheckEventOfAnotherFilter(review).tools/check_conventions.py --base mainpasses.git merge-treefinds no conflict withmain22cc516f87or with any open PR that merges withmain, apart from #17292 above.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T17:10:12Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
The head is
f32ba8c2e185b791616517fc7c52b9fdc1e6e08f. The diff does what the description says in the code, and I found no defect in the code it changes. The firmware 13.42 answers come from disassembly that is not in the repository, so they are not verified here.What I ran
Head SHA:
f32ba8c2e185b791616517fc7c52b9fdc1e6e08f. No build and no test run, per the review rules for this run.Files read in full at the head:
core/libs/prx/libSceVideoOut/src/Event.cpp(lines 1 to 30, 160 to 199),core/libs/tests/GuestVideoOutEventId.cpp(all 95 lines), anddiff.patchfor the three changed files.Results
guest_video_out_event_idctestcheck_conventions.py,git merge-treeFindings
Blocking
None.
Non-blocking
core/libs/tests/GuestVideoOutEventId.cpp:44:RejectsEventOfAnotherFilternow expectssceVideoOutGetEventCountto return the event's count bits, so the name no longer matches the row. Renaming it (for example toCheckEventOfAnotherFilter) would keep the test readable.Sources
github.com/boykopovar/AnyPS5@f32ba8c2e1/core/libs/prx/libSceVideoOut/src/Event.cpp (L171-L195)Not verified
tools/check_conventions.py --base mainand thegit merge-treeresults: author-reported.To get this to a good state
Nothing is required. The rename in the Non-blocking list is optional.