feat(libSceJson2): add InitParameter2::setSpecialFloatFormatType #3575

Closed
parl0v wants to merge 1 commit from upstream-pr/3575 into main
parl0v commented 2026-10-11 13:37:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-11T13:37:03Z.


What

libSceJson2 implements the sce::Json::InitParameter2 class but is missing setSpecialFloatFormatType, so a title that imports it fails to load:

  • _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE (WVZBP4IyM+E)

The NID hashes from that name with the repo's tools/nid_names.py. Found with tools/import_audit.py: on main, Minecraft Legends (PPSA05510) imports it and it classifies as absent.

It mirrors the existing setFileBufferSize: it stores its argument in the parameter block. As with the other InitParameter2 setters, Initializer::initialize(InitParameter2) does not yet act on it, so it does not affect serialization; the TechnicalDebt entry for InitParameter2 records this and the added field.

(This PR originally also added Array::front; that is covered by #3570, so it has been dropped here to avoid the duplicate export. Only setSpecialFloatFormatType remains, which #3570 does not touch.)

Tested

Windows, WinLibs MinGW GCC 15.2.0 r7, Release.

  • guest_json passes. New case: setSpecialFloatFormatType stores its value in the parameter block (read back at its offset).
  • objdump -p on the patched libSceJson2.prx lists WVZBP4IyM+E in the export table.
  • tools/check_conventions.py --base origin/main passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819456844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-11T13:37:03Z. --- ### What `libSceJson2` implements the `sce::Json::InitParameter2` class but is missing `setSpecialFloatFormatType`, so a title that imports it fails to load: - `_ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE` (`WVZBP4IyM+E`) The NID hashes from that name with the repo's `tools/nid_names.py`. Found with `tools/import_audit.py`: on `main`, Minecraft Legends (PPSA05510) imports it and it classifies as `absent`. It mirrors the existing `setFileBufferSize`: it stores its argument in the parameter block. As with the other `InitParameter2` setters, `Initializer::initialize(InitParameter2)` does not yet act on it, so it does not affect serialization; the TechnicalDebt entry for `InitParameter2` records this and the added field. (This PR originally also added `Array::front`; that is covered by #3570, so it has been dropped here to avoid the duplicate export. Only `setSpecialFloatFormatType` remains, which #3570 does not touch.) ### Tested Windows, WinLibs MinGW GCC 15.2.0 r7, Release. - `guest_json` passes. New case: `setSpecialFloatFormatType` stores its value in the parameter block (read back at its offset). - `objdump -p` on the patched `libSceJson2.prx` lists `WVZBP4IyM+E` in the export table. - `tools/check_conventions.py --base origin/main` passes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 13:37:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:37:27Z.


Progress report (a11c8f7 → 6bd8f1e)

📈 System libraries: 85.82% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceJson2 _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109604992 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6109604992). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T13:37:27Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 6bd8f1e) 📈 **System libraries**: 85.82% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceJson2 | `_ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE` | </details>
github-actions[bot] commented 2026-10-11 14:29:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:29:12Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3670 core/libs/tests/GuestJson.cpp L352-353, L355-356
docs/dev/TechnicalDebt.md L335
#3737 core/libs/prx/libSceJson2/Export.cpp L786, L798
docs/dev/TechnicalDebt.md L335
_ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110060674 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6110060674). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T14:29:12Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3670 | `core/libs/tests/GuestJson.cpp` [L352-353](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/core/libs/tests/GuestJson.cpp#L352-L353), [L355-356](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/core/libs/tests/GuestJson.cpp#L355-L356)<br>`docs/dev/TechnicalDebt.md` [L335](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/docs/dev/TechnicalDebt.md#L335) | | | | #3737 | `core/libs/prx/libSceJson2/Export.cpp` [L786](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/core/libs/prx/libSceJson2/Export.cpp#L786), [L798](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/core/libs/prx/libSceJson2/Export.cpp#L798)<br>`docs/dev/TechnicalDebt.md` [L335](https://github.com/boykopovar/AnyPS5/blob/a11c8f7f70a0ed4e71504a89de69e8cdae687817/docs/dev/TechnicalDebt.md#L335) | `_ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE` | |
parl0v commented 2026-10-11 15:20:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-11T15:20:37Z.


Trimmed this to just InitParameter2::setSpecialFloatFormatType. Array::front is covered by #3570 (opened first), so I dropped it here to clear the duplicate export the overlap bot flagged. The remaining export isn't touched by #3570.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110525434 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6110525434). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-11T15:20:37Z. --- Trimmed this to just `InitParameter2::setSpecialFloatFormatType`. `Array::front` is covered by #3570 (opened first), so I dropped it here to clear the duplicate export the overlap bot flagged. The remaining export isn't touched by #3570.
MarcZX10 commented 2026-10-11 16:12:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T16:12:44Z.


Broader implementation available in #3737

I carried the ready #3348 change into my PR #3737. It includes the same setSpecialFloatFormatType behavior, with the complete InitParameter2 layout, and also implements the imported C2 constructor, InitParameterRtti constructor, and setAllocatorRtti.

For issue #3348's full scope, #3737 is the more complete PR. It has local Linux guest_json coverage and retains David's attribution for the carried implementation. Please close #3575 in favor of #3737 so the setter is reviewed and merged once as part of the broader fix.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111004803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6111004803). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T16:12:44Z. --- ### Broader implementation available in #3737 I carried the ready #3348 change into [my PR #3737](https://github.com/boykopovar/AnyPS5/pull/3737). It includes the same `setSpecialFloatFormatType` behavior, with the complete `InitParameter2` layout, and also implements the imported C2 constructor, `InitParameterRtti` constructor, and `setAllocatorRtti`. For issue #3348's full scope, #3737 is the more complete PR. It has local Linux `guest_json` coverage and retains David's attribution for the carried implementation. Please close #3575 in favor of #3737 so the setter is reviewed and merged once as part of the broader fix.
parl0v commented 2026-10-11 18:02:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-11T18:02:11Z.


Agreed — #3737 carries the full InitParameter2 layout plus the C2/Rtti constructors and preserves David's #3348 attribution, so the setter is better reviewed there. Closing in favor of #3737 (and Array::front is covered by #3570). Thanks @MarcZX100.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112011970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6112011970). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-11T18:02:11Z. --- Agreed — #3737 carries the full InitParameter2 layout plus the C2/Rtti constructors and preserves David's #3348 attribution, so the setter is better reviewed there. Closing in favor of #3737 (and Array::front is covered by #3570). Thanks @MarcZX100.
xXPBSXx commented 2026-10-11 22:50:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:50:36Z.


Overlap: this PR and #3737 both add sce::Json::InitParameter2::setSpecialFloatFormatType; merging both onto main conflicts in core/libs/prx/libSceJson2/Export.cpp (and TechnicalDebt.md). Resident Evil 4 (PPSA07411) needs the function; only one of the two PRs can go in.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114784918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6114784918). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:50:36Z. --- Overlap: this PR and #3737 both add `sce::Json::InitParameter2::setSpecialFloatFormatType`; merging both onto `main` conflicts in `core/libs/prx/libSceJson2/Export.cpp` (and `TechnicalDebt.md`). Resident Evil 4 (PPSA07411) needs the function; only one of the two PRs can go in. AI-assisted (Claude Code).
parl0v commented 2026-10-12 02:02:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-12T02:02:36Z.


Yes, that overlap is the reason this was closed: #3737 carries the same setSpecialFloatFormatType plus the full InitParameter2 layout and the C2/Rtti constructors, so the setter goes in there instead (and Array::front is covered by #3570).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6116432178 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3575#issuecomment-6116432178). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-12T02:02:36Z. --- Yes, that overlap is the reason this was closed: #3737 carries the same `setSpecialFloatFormatType` plus the full `InitParameter2` layout and the C2/Rtti constructors, so the setter goes in there instead (and `Array::front` is covered by #3570).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3575
No description provided.