libSceVideoOut: sceVideoOutGetOutputStatus reports 1080p for a freshly opened handle, and NHL 27 (PPSA34063) dereferences null for its PS5_BASE profile #7635
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 ArielWolle on 2026-10-18T18:42:29Z.
### What happens
NHL 27 (PPSA34063, 01.003.001) crashes about 20 minutes after launch, after the shader warm-up, on a worker thread:
With
ANYPS5_OUTPUT_4K=1from the fork commitpoonasor/AnyPS5@ba61a98eb(not on main) the same run does not crash and the picture displays.Why
Read from the relinked executable's disassembly and the relinker registry; no console was used.
sceVideoOutOpen(0xff, 0, 0, 0)(NIDUp36PTk687E),sceVideoOutGetOutputStatus(utPrVdxio-8), thensceVideoOutClose(uquVH4-Du78).is4K = (GetOutputStatus succeeded && status.resolution == 2).sceKernelIsTrinityMode(tU5e3f9gSiU) is combined with it:index = is4K + 2 * trinity.PS5_BASE,PS5_4K,TRINITY_BASEorTRINITY_4K, which maps to the profile ids 0x0d, 0x0e, 0x12 and 0x13.exe+0x7928b40, level 4 searched downwards) and reads offset0x74of the result without a null check (exe+0x79289c6).sceVideoOutGetOutputStatusfillsresolutionincore/libs/prx/libSceVideoOut/src/Output.cppfromcfg.width/cfg.height, the size of the buffers registered on the port. The title asks right aftersceVideoOutOpen, before registering any buffer, so the port still has the default 1920x1080 andresolutionis 1. The title then picksPS5_BASE, and the lookup for that profile returns null (inferred from the crash registerrax = 0and the disassembly; not confirmed by tracing the call).What is not known
PS5_BASE. A console connected to a 1080p display should select it, so the entry may be missing because something fails to load rather than because the title does not support it.resolutionbefore any buffer is registered, and on a display below 4K. Console measurements are needed.Observations
PS5_BASE.ANYPS5_OUTPUT_4K=1the run got past the point where the unmodified run crashed and the picture displays. This is one run each, so it shows the switch avoids the crash in this setup, not that thePS5_BASElookup is the only cause.sceVideoOutGetOutputStatus,PS5_BASE/PS5_4K/TRINITY,sceKernelIsTrinityMode, NHL 27, PPSA34063, PPSA34015, output status 1080p). Related, same engine (Engine.Render.Core2.PlatformPs5): #3123 (EA Sports UFC 5) reaches its menus and a fight onmainwith no mention of this crash, so the missingPS5_BASEentry may be specific to this title's data; its comments also confirm the module layout rule used here (the engine module must be converted intoapp0/, notapp0/sce_module/). Open pull requests tagged PPSA34015 (EA FC 27, same engine) are unrelated libc/libSceVoice work. #7011 (docs for video output resolution) and #7480 (force SDR output) do not changeresolution.Environment
Windows 11 Home (build 26200), MinGW-w64 GCC 15.2.0 (WinLibs ucrt-posix-seh r7), RTX 3070, Ryzen 7 5700X,
mainatf03a2da5e(the local build also had unrelated libc backtrace changes, not involved here). Layout and commands are indocs/user/AI_USAGE.md.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by ArielWolle on 2026-10-18T18:47:49Z.
More evidence on why
PS5_BASEhas no usable entry. Same setup as above (PPSA34063 01.003.001, Windows,mainatf03a2da5e). Read from the game's files and the relinked executable; no console data.Data/initfs_Ps5branches onplatformMode == 'PS5_4K' or 'TRINITY_4K'and on'TRINITY_BASE' or 'TRINITY_4K'.PS5_BASEhas no branch because it is the default, so a 1080p answer is a path the title is written for.exe+0x7928700fills a table of vectors from an array of entries loaded from game data. Each entry carries its platform id at offset0x70, a kind at0x4cand a quality level at0x74; the entry goes into the vector for its id ([table + 0x70 + id*32]).exe+0x7928b40then searches the vector of the current id for a kind-0 entry, from level 4 downwards. For id0x0d(PS5_BASE) it finds none, andexe+0x79289c6reads[rax+0x74]withrax = 0. So the missing piece is an entry in that data array for id0x0d, not VideoOut code.0x0dentry in the shipped data, or the entry is not loaded in our run. The title's reads of its main data do not show up in thesceKernelOpenlog, so I could not tell from the log whetherData/orPatch/supplies it. The dump'sPatch/has its owninitfs_Ps5(110 KB) andlayout.tocnext to theData/ones.Taken together, forcing resolution 2 (the fork's
ANYPS5_OUTPUT_4K) selectsPS5_4Kand avoids the empty slot, but does not explain it. A comparison with another title on this engine would help: EA Sports UFC 5 (#3123) is reported past its menus onmainwithout this crash. If someone running a title from this engine on a display below 4K can say whichplatformModeit reports, that would show whetherPS5_BASEworks there.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T18:54:37Z.
This additional disassembly evidence narrows the failure to the title data lookup:
PS5_BASEis a supported/default mode, but the loaded profile table has no kind-0 entry for id 0x0d, and the caller dereferences the missing result. The 4K override only selects another table slot; it does not establish that VideoOut should report 4K before buffers are registered. I do not see a safe AnyPS5 change supported by this evidence. A useful next discriminator would be whether the shippedData/orPatch/profile array contains id 0x0d (and which file populates the runtime table); that would separate missing title data from a load/path issue.Imported from boykopovar/AnyPS5. Originally posted by ArielWolle on 2026-10-18T19:47:26Z.
Follow-up on the discriminator: the shipped data has no
PS5_BASEentry, so this is missing title data, not a load or path problem on our side.Checked statically against the shipped
Data/andPatch/(update 01.003.001), and against a debugger dump of the runtime table taken just before the crash in a run without the 4K switch. Only ids and counts are given here, no game content.The table the title builds holds entries for these platform-mode ids:
0x000x0e(PS5_4K)0x0f0x100x13(TRINITY_4K)0x0d(PS5_BASE),0x11,0x12(TRINITY_BASE),0x14,0x15Patch/layer repeats the same references asData/and adds no entry for0x0d,0x11or0x12. A scan of every asset of that size in both layers found no other entries of this class.0x0e); for this title to run, the console has to reportresolution2 in the status call.I'm not claiming
sceVideoOutGetOutputStatusshould report 4K by default. What is still unknown, and cannot be settled from the files, is what a console reports inresolutionright aftersceVideoOutOpen, before any buffer is registered, with a 4K display and with a 1080p display. A console measurement of that one field would decide it. Until then theANYPS5_OUTPUT_4Kfork switch remains only a workaround for this title.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T22:36:47Z.
Thanks for checking both shipped data layers and the runtime table. That confirms the crash follows the title’s missing
PS5_BASEprofile entry; it does not establish the console’s pre-buffer resolution value. I agree theANYPS5_OUTPUT_4Koverride should remain a title workaround unless that console field is measured, so I see no source-side VideoOut change justified by this report yet.Imported from boykopovar/AnyPS5. Originally posted by ionut27001 on 2026-10-19T07:31:42Z.
I'm working on this. Measured in a payload process on a PS5 (firmware 12.70), with
libSceVideoOut.sprxloaded throughsceKernelLoadStartModule, right aftersceVideoOutOpen(0xff, 0, 0, NULL)and with no buffer registered:sceVideoOutGetOutputStatussceVideoOutGetResolutionStatusresolution2,dynamicRange2,refreshRate3,flags0refreshRate3resolution1,dynamicRange2,refreshRate3,flags0refreshRate3So with no buffer registered,
resolutionfollows the console's resolution setting. I'll open a PR that reports it from the host display the window is on instead of the port's buffer size, with the probe source and logs attached.