feat(libSceAjm.native): return AJM from sceAjmStrError #5000
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5000"
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 ducloc080202 on 2026-10-13T07:43:18Z.
What
Implements
sceAjmStrErroras a silent stub: it returns a staticAJMstring for every error code instead of throwing unimplemented and returning null. The console carries a different message per code, but those strings live in the firmware module, which title dumps do not ship, so the mapping cannot be derived here (checked shadPS4, which stubs it, and KytyPS5/prosper, which both return a constant). The result is only used as a log-format argument, and a static non-null string keeps a guest%sformatter alive where a null would fault. The divergence is recorded under Silent stubs in the libSceAjm.native technical debt file.Tested
Windows 11, MinGW 15.2.0:
guest_ajmctest passes, including a newTestStrErrorcase covering known AJM error codes (0x80930002-0x80930008,0x80930012),0and-1. Linux/macOS rely on CI.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T07:46:08Z.
Progress report (
cac4e96→36bc8bd)📈 System libraries: 88.32% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceAjmStrError⚪ 1 behaviourally empty (constant return or throw)
sceAjmStrErrorImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T08:33:55Z.
Review: CHANGES_REQUESTED
Thanks for the PR. Two points:
core/libs/prx/libSceAjm.native/Export.cpp:31returns"AJM"for every code. KytyPS5 does that, but it is hand-written and has no evidence behind it, and prosper (src/hle/audio/hle_audio.cpp,ajm_str_error) notes that the real libSceAjm carries a different message per error code. So the result is known to differ from the console, andmainthrows instead (exact-or-throw, see CONTRIBUTING). Either keep the throw, or derive the real code-to-string table (e.g. from a title'slibSceAjmmodule) and test those strings.docs/dev/debt/libSceAjm.native.md:19belongs under "Silent stubs", not "Functional".The test and build are fine (
guest_ajmpasses here on top of currentmain); happy to look again once this is addressed.Imported from boykopovar/AnyPS5. Originally posted by ducloc080202 on 2026-10-13T08:44:20Z.
Thanks for the review. Addressed as follows:
libSceAjmmodule, which title dumps do not ship (checked the dumps on hand: onlyright.sprxplus the app modules). shadPS4 stubssceAjmStrError, and both KytyPS5 and prosper return a constant, so there is no public derived table to take. Deriving it needs a decrypted firmware module, which I do not have; noted in the debt entry.%sformatter alive where the old null return would fault (prosper documents the same call inhle_audio.cpp,ajm_str_error).Rebased state re-verified: conventions pass,
guest_ajmpasses. Happy to revert to the throw instead if you would rather keep exact-or-throw here.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T08:53:57Z.
Thanks for the quick follow-up and for checking the sources.
Closing this one:
sceAjmStrErrorreturns"AJM"for every code, which we know differs from the console (per-code messages). CONTRIBUTING allows a silent stub only when it unblocks a title and affects only the UI; the PR names no title that calls it, somain's throw (exact-or-throw) stays the right behaviour.TestStrErrorpins"AJM", a value with no hardware or reference evidence behind it, so it only tests the stub itself.Welcome to reopen if a title is shown to call
sceAjmStrErrorand fail on the throw (title/PPSA and log), or once the real per-code table is derived from a firmware module.Pull request closed