fix(videoout): answer output mode queries with the console's codes #1496
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1496"
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 hugodearaujo on 2026-10-08T09:20:12Z.
What
I measured
sceVideoOutInitializeOutputOptionsandsceVideoOutIsOutputSupportedon a PS5 (firmware 13.60) by loadinglibSceVideoOut.sprxwithdlopenfrom a homebrew payload. The payload opened its own handle (sceVideoOutOpen(255, 0, 0, NULL)), queried it, and closed it. It never calledsceVideoOutConfigureOutput.mainInitializeOutputOptions(&opts)0xFFInitializeOutputOptions(NULL)0x80290002INVALID_ADDRESSIsOutputSupportedwith handle-1,0,1,INT_MAX, or a closed handle0x8029000BINVALID_HANDLE, whatever the other arguments0x80290001INVALID_VALUE (checked before the mode)11115(119.88 Hz) on a 120 Hz TV104, 7, 8, 12, 13, 14, 16, 17, 190x80290016UNSUPPORTED_OUTPUT_MODE00x100,0xd000000a,0xffffffff,2^63+1,~00x8029001E00x80290001INVALID_VALUE (checked after the mode)So the console never answers 0. It checks the handle, then the reserved arguments, then the mode, then the options. With this branch,
IsOutputSupportedandConfigureOutput, which validates the same way, return those codes. The only answer that depends on the display is mode 15. This branch keeps the current policy of supporting only the default mode, so 15 gets UNSUPPORTED_OUTPUT_MODE, which is what PS5_Vulkan measuredConfigureOutput(15)returns for a title that does not declare high-frame-rate output. Their independent mode table, from another console, agrees with mine except for mode 18: they got0x80290016, I got0x8029001E. Mode 18 therefore throws here.0x8029001Ehas no public name: the PS4 VideoOut error list ends at0x8029001A. I named itVIDEO_OUT_ERROR_UNKNOWN_OUTPUT_MODE, and the TechnicalDebt entry says the name is ours.VideoOutDriver::IsOpenthrows for a handle that does not exist, and other functions rely on that. So this addsHasConfig, which only checks whether the handle is open, andvalidateOutputConfiguses it before callingIsOpen.Title: Propagation: Paradise Hotel (PPSA15878) calls
sceVideoOutInitializeOutputOptions(&opts)and thensceVideoOutIsOutputSupported(handle, 15, &opts, 0, 0). If the answer is 1, it callssceVideoOutConfigureOutput(handle, 15, &opts, 0, 0)and checks its result against0x80290016. The first two are called from one direct call site each in the game executable.ConfigureOutputis called from two sites. Onmain, the title's mode 15 query returns 0, a value the console never returns. Its param.json has attribute30x20c00, without the high-frame-rate bit, so a console would not configure 15 for it either. Answering UNSUPPORTED_OUTPUT_MODE keeps it at 59.94 Hz, as on hardware.Tested
libs, full CTest 431/431 (on main as of today). The newguest_video_out_output_modecovers every measured row;video_out_flip_tests(not in CTest) builds with its updated expectations.libs, CTest 0 failed of 407,guest_video_out_output_modeincluded (GPU execution tests skipped, the VM has no GPU).guest_video_out_output_modefail. They cover the handle, reserved, and options checks, the free word, the first word, the unsupported and unknown mode sets, mode 18, the null-options path,InitializeOutputOptions, andHasConfigon a closed port. A 16th mutation (return 1→mode == DEFAULT ? 1 : 0) is equivalent, since only the default mode reaches that line.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-08T09:20:22Z.
Probes and raw output. They are ps5-payload-sdk v0.43 payloads (
prospero-clang -O1 -rdynamic) that loadlibSceVideoOut.sprxwithdlopen. Run 2 and run 3 open their own handle withsceVideoOutOpen(255, 0, 0, NULL)and close it at the end, and none of them callssceVideoOutConfigureOutput.Run 1, no handle opened: noopen_main.c
Run 2, own handle: open_main.c
Run 3, own handle (word 3 bits, check order, modes 0x21-0x3F): open2_main.c
raw output (runs 1-3)
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T11:30:33Z.
Review: APPROVED
Good improvement to video output mode handling. This makes the validation more accurate with proper error codes for unsupported vs unknown modes, and adds comprehensive testing.
Strengths:
HasConfigmethod to check handle configuration stateTechnical notes:
This will improve compatibility with titles that probe video output modes. Ready to merge.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:52:53Z.
Checked the new
guest_video_out_output_modetest (passes; fails without the change),video_out_flip_tests, and the error ordering (handle, reserved, mode, options) against your measured table. The only conflict withmainwas the TechnicalDebt entry (next to the newsceVideoOutGetResolutionStatusline); I rebased and kept both, tests pass after the rebase. Merging once CI is green on the rebased head.