feat(libSceLibcInternal): implement fminf required for PPSA99902 startup #4592

Merged
leorossi2005 merged 1 commit from upstream-pr/4592 into main 2026-10-13 07:46:05 +00:00
leorossi2005 commented 2026-10-12 16:26:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by leorossi2005 on 2026-10-12T16:26:22Z.


What

  • Implement fminf in libSceLibcInternal (resolving NID uVRcM2yFdP4).

Together with pathconf (#3611) and sceKernelGetSocSensorTemperature (#4588), this resolves all missing ELF imports blocking Sonic Unleashed Recompiled (PPSA99902) from loading and reaching guest entry.

Tested

Windows 11 (x86_64), Sonic Unleashed Recompiled (PPSA99902):
Resolves startup relinker failures:

FAIL: unresolved ELF import zzKyvoELf4I from libkernel.prx
FAIL: unresolved ELF import uVRcM2yFdP4 from libSceLibcInternal.prx
FAIL: unresolved ELF import oc98+zOImus from libkernel_sys.prx

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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #3611 and #4588
  • Unblocks: PPSA99902
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4832196149 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4592). Originally posted by [leorossi2005](https://github.com/leorossi2005) on 2026-10-12T16:26:22Z. --- ### What - Implement `fminf` in `libSceLibcInternal` (resolving NID `uVRcM2yFdP4`). Together with `pathconf` (#3611) and `sceKernelGetSocSensorTemperature` (#4588), this resolves all missing ELF imports blocking *Sonic Unleashed Recompiled* (PPSA99902) from loading and reaching guest entry. ### Tested Windows 11 (x86_64), Sonic Unleashed Recompiled (PPSA99902): Resolves startup relinker failures: ```text FAIL: unresolved ELF import zzKyvoELf4I from libkernel.prx FAIL: unresolved ELF import uVRcM2yFdP4 from libSceLibcInternal.prx FAIL: unresolved ELF import oc98+zOImus from libkernel_sys.prx ``` ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #3611 and #4588 - [x] Unblocks: PPSA99902 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-12 16:41:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T16:41:46Z.


Progress report (584cc4c → 02d1dbb)

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

✅ 1 implemented
Library Name
libSceLibcInternal fminf_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6128551185 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4592#issuecomment-6128551185). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T16:41:46Z. --- <!-- progress-report --> ### Progress report (584cc4c → 02d1dbb) 📈 **System libraries**: 87.87% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceLibcInternal | `fminf_nid_postfix` | </details>
adriadam10 commented 2026-10-12 20:44:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:44:31Z.

Review: CHANGES_REQUESTED


Thanks for tracing the imports for PPSA99902. This PR currently bundles three things, two of which are already open elsewhere:

  • pathconf (libkernel_sys/Export.cpp, GuestKernelSys.cpp, the TechnicalDebt line) is the same implementation as #3611 / #4503 (#4503 is mergeable). The body says "Depends on: #4503", so drop it from this branch instead of carrying a copy; it will conflict with whichever lands first.
  • sceKernelGetSocSensorTemperature (libkernel/Unimplemented.cpp:18 and its TechnicalDebt line) overlaps #4588, which implements it with tests. Drop it here and list #4588 under Depends on if you need it.
  • fminf (libSceLibcInternal/Export.cpp:145) is not in any other open PR and std::fmin matches the libc semantics. Keep this one, but add a test pinning edge rows (one NaN operand returns the other, both NaN, -0.0 vs +0.0, ±inf), registered in ctest.

The branch also conflicts with main; please rebase after removing the two duplicates so the PR is one topic (fminf).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5495771749 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4592#pullrequestreview-5495771749). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-12T20:44:31Z. **Review:** CHANGES_REQUESTED --- Thanks for tracing the imports for PPSA99902. This PR currently bundles three things, two of which are already open elsewhere: - `pathconf` (`libkernel_sys/Export.cpp`, `GuestKernelSys.cpp`, the TechnicalDebt line) is the same implementation as #3611 / #4503 (#4503 is mergeable). The body says "Depends on: #4503", so drop it from this branch instead of carrying a copy; it will conflict with whichever lands first. - `sceKernelGetSocSensorTemperature` (`libkernel/Unimplemented.cpp:18` and its TechnicalDebt line) overlaps #4588, which implements it with tests. Drop it here and list #4588 under Depends on if you need it. - `fminf` (`libSceLibcInternal/Export.cpp:145`) is not in any other open PR and `std::fmin` matches the libc semantics. Keep this one, but add a test pinning edge rows (one NaN operand returns the other, both NaN, `-0.0` vs `+0.0`, ±inf), registered in ctest. The branch also conflicts with `main`; please rebase after removing the two duplicates so the PR is one topic (`fminf`).
leorossi2005 commented 2026-10-12 21:33:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by leorossi2005 on 2026-10-12T21:33:49Z.


@adriadam10 Thank for the suggestions, I've dropped pathconf and sceKernelGetSocSensorTemperature from this PR, and added tests for fminf as requested.

I've also done a rebase to remove conflicts with main

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6133023256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4592#issuecomment-6133023256). Originally posted by [leorossi2005](https://github.com/leorossi2005) on 2026-10-12T21:33:49Z. --- @adriadam10 Thank for the suggestions, I've dropped `pathconf` and `sceKernelGetSocSensorTemperature` from this PR, and added tests for `fminf` as requested. I've also done a rebase to remove conflicts with `main`
adriadam10 commented 2026-10-13 07:46:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T07:46:01Z.

Review: APPROVED


Checked fminf (NID uVRcM2yFdP4) against aerolib and prosper, built and ran guest_fminf (passes; without the export the test fails to link). Thanks for dropping pathconf and the SoC sensor; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5500329606 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4592#pullrequestreview-5500329606). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T07:46:01Z. **Review:** APPROVED --- Checked `fminf` (NID `uVRcM2yFdP4`) against aerolib and prosper, built and ran `guest_fminf` (passes; without the export the test fails to link). Thanks for dropping `pathconf` and the SoC sensor; merging.
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!4592
No description provided.