libSceJson2: InitParameter2::setSpecialFloatFormatType stops Resident Evil 4 and PRAGMATA; fix branch ready #3348
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 screamm on 2026-10-11T08:26:20Z.
Resident Evil 4 (PPSA07411, #2776) and PRAGMATA (PPSA02530, #3043) stop at start-up on the absent libSceJson2 export
sce::Json::InitParameter2::setSpecialFloatFormatType:In the same library the
InitParameter2base constructor (C2),InitParameterRtti2::setAllocatorRttiand theInitParameterRtticonstructor areNotImplemented_nid_no_patchstubs that Deathloop, Minecraft Legends and Cyberpunk import.Fix branch ready:
screamm:feat/json2-init-parameter2(b5ad862c, one commit onmaina4b0b16b). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.setSpecialFloatFormatTypeis added with NIDWVZBP4IyM+E, computed from the mangled name withtools/nid_names.pyand matching the aerolib entry; it stores the 32-bit value at offset 0x18 and accepts any value, because no public source gives the enum's range (SharpEmu, KytyPS5, pcsx5, fpPS4 all store it unchecked).InitParameter2becomes the 40-byte object SharpEmuJsonExports.cs(1811cef9) and KytyPS5libJson2.cpp(eda6ba37) agree on (allocator, user data, file buffer size, format type, 12 reserved bytes), zeroed by both constructors; C2 forwards to C1;setAllocatorRttistores the allocation parameters and user data likesetAllocator; theInitParameterRtticonstructor writes its three arguments to the first 24 bytes.Initializer::initializeis unchanged (it reads no field). The serializer still throws on NaN and infinity whatever format type is set. TechnicalDebt gets one bullet replacing the old "Unknown function info" note.guest_jsongains both constructors zeroing a 0xff-filled buffer, the setters read back with other fields untouched,initializesucceeding on the result, and the Rtti constructor leaving bytes 24 to 39 untouched.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_json3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"507/507 (with the #3329 test fix applied locally so the tree builds); withmain'sExport.cppthe extended test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux, and not run with either title.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T09:52:43Z.
Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.b5ad862conto currentmain(the branch was 244 commits behind): one conflict inExport.cpp— main has since added stubs forInitParameter2C2,setAllocatorRttiandsetNullAccessCallBackin a different spot than this branch's implementations; the two superseded stubs were dropped and main'ssetNullAccessCallBackstub kept, which this branch does not touch. OneTechnicalDebt.mdconflict resolved by keeping both entries.tools/check_conventions.py --base origin/mainandgit diff --checkpass.guest_jsonpasses.ctest -j8 -E "^agc_driver_|^video_out_flip"): 520/520 passed.The rebased branch is available at
blawesom:verify/3348for anyone carrying — the commit is otherwise unchanged.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T16:12:44Z.
I carried the ready #3348 implementation into PR #3737, including the setter covered by #3575 plus the related constructors and RTTI allocator setter. The PR is based on current main and includes local Linux
guest_jsonverification. I noted the related JSON2 PRs and their adjacent file overlap in the description.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:07:58Z.
Closing: fixed by #3737. PPSA07411 and PPSA02530 continue in #2776 and #3043.