The title's sce_sys/trophy2/trophyNN.ucp is read on first use with a bounds-checked .ucp reader and a small JSON reader. tropconf.json gives each trophy's grade, group, hidden and reward flags, platinum and unlock condition, and tropmeta_<tag>.json its texts in the console language, then en-US, then the file's default language. Contexts remember their user and service label, so the queries find the file. The trophy, group and game queries report these names, grades, groups and counts, list every trophy and group, and give progressive trophies their target. Unlocks are not recorded yet, so every trophy reports as locked and nothing is written to the host. A missing file is ignored and a malformed one is logged once; either way the queries keep their placeholders. A JSON document that nests deeper than 64 levels or holds more than 1048576 values counts as malformed, which keeps the parsed values to about 140 MiB.
3.2 KiB
libSceNpTrophy2 technical debt
Silent stubs
- libSceNpTrophy2:
sceNpTrophy2RegisterUnlockCallbackaccepts a callback that is never called, as no trophy is ever unlocked,sceNpTrophy2UnregisterUnlockCallbackonly returns success, andsceNpTrophy2ShowTrophyListreturns success without showing a list (there is no system trophy UI; seen on PPSA15552).
Unknown function info
-
Query structures: a progress value is a 16-byte
{int32 type, 4 reserved bytes, uint64 value}and the game, group and trophy structures are 152, 24, 152, 32, 1312 and 32 bytes, as KytyPS5 asserts; no other public source confirms the layout. Progress type 1 marks a progressive trophy's target and progress, as in KytyPS5. Trophies without agroupIdbelong to group -1, KytyPS5's base game group. -
sceNpTrophy2GetRewardIcon (libSceNpTrophy2) takes
(int context, int handle, int reward_id, void* buffer, size_t* size), from the call sites in the bundledMedia/Plugins/PSNCore.prxof PPSA06888, the same shape assceNpTrophy2GetTrophyIcon. The title calls it twice: first with a null buffer to read the size, then with a buffer of that size allocated withmalloc. The meaning of the third argument is unverified, and the reward icon data is unknown, so every call throws
Functional
- Trophy queries report the title's trophy data (
sce_sys/trophy2/trophyNN.ucp). Without the file, or when it is malformed, they report the old placeholders andsceNpTrophy2GetTrophyInfoArraylists only trophy 0. Icons are not read. Hidden trophies report their names and descriptions; whether the console blanks them before the unlock is not known.progress_percentageweighs gold 6, silver 2 and bronze 1 and leaves the platinum out, as KytyPS5 does (the ratio of the published PSN trophy points); the console's formula is not known. A trophy or group that is not in the file throws. Unlocks are not recorded, so every trophy reports as locked, with no unlock time and a progress of 0, and the unlocked counts andprogress_percentageare 0. A context that was not created or was destroyed reports placeholders and returns success; the console's errors for it are unknown. - Trophy data limits: a
trophyNN.ucplarger than 256 MiB or listing more than 4096 files, and a JSON file in it that nests deeper than 64 levels or holds more than 1048576 values, are not used, and the title runs as without that file. The limits keep the memory the reader takes to the file and about 140 MiB of parsed JSON; the console's limits are not known. - Text language: texts come from
tropmeta_<tag>.jsonfor the console language, thenen-US, then the file'sdefaultLanguage. The tags for languages 0 to 29 are KytyPS5's;uk-UAfor 30 (Ukrainian) is an assumption.