diff --git a/docs/dev/debt/libSceSystemService.md b/docs/dev/debt/libSceSystemService.md index 1666e03c36..88a6f44ab8 100644 --- a/docs/dev/debt/libSceSystemService.md +++ b/docs/dev/debt/libSceSystemService.md @@ -74,6 +74,7 @@ - [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - parameters 1 to 5, 100 to 111, 200 to 213, 300 and 400 answer (see the integer system parameters entry); every other parameter, and a null value pointer, returns 0x80A10003 without writing the value. Inside a retail title on a PS5 (firmware 13.40, measured 2026-10-19 through ptrace remote calls in the game process) parameters 0, 6, 7 (game parental level), 8 to 20, 401, 999, 1000 (enter button assignment) and 1001 to 1008 returned 0x80A10003, as did a null value pointer; 1 to 5 and 400 answered, and 100 answered the value 0. A sweep of parameters 0 to 2048 in the same way on 2026-10-23 also found 101 to 111, 200 to 213 and 300 answering, each writing 4 bytes; every other parameter, and a null value pointer for 100 to 111, returned 0x80A10003 and left the value as it was. One title (PPSA13356, call at 0xAF350) asks for parameter 1 and does not read the result. - [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - the date format (parameter 2) is 0 year-month-day, 1 day-month-year or 2 month-day-year, and the time format (parameter 3) 0 for 12-hour or 1 for 24-hour, as in [OpenOrbis](https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/blob/06fcf7fd108fa080035cdd3259ed22eb07e0508c/include/orbis/_types/sys_service.h#L17-L28) and [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/system/systemservice.h#L29-L38) (which also answers 1 and 1). Neither was measured on a PS5, so whether its firmware numbers them the same way is unknown; 1 and 1 stay the answer when `ANYPS5_DATE_FORMAT` and `ANYPS5_TIME_FORMAT` are unset because AnyPS5 answered so before them. Closes when: both parameters are read on a PS5 set to each format - [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - `ANYPS5_DATE_FORMAT=auto` and `ANYPS5_TIME_FORMAT=auto` use only the order of the day, month and year fields (year first is 0, day first 1, month first 2) and whether the host's time pattern is 12-hour or 24-hour; separators, digit counts, month names and weekday names are ignored. Which format a console set up for a given region would pick was not measured, so US hosts give month-day-year and 12-hour, ISO hosts year-month-day, and a host with a 12-hour clock and year-first dates (en_CA on glibc) gets 0 and 0. The mapping is a host-side convenience. +- [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - on Linux and other POSIX hosts `auto` reads `D_FMT` and `T_FMT` of the locale named by the first non-empty of `LC_ALL`, `LC_TIME` and `LANG`, through `newlocale` and `nl_langinfo_l` so the process locale is untouched. `T_FMT_AMPM` is not used: glibc 2.36 fills it for 24-hour locales too (en_GB, ja_JP and the C locale), while `T_FMT` is `%r` for en_US and en_CA and `%T` or `%H` based for the rest. The C and POSIX names count as no preference and the locale has to be installed. Only glibc 2.36 on Debian 12 was run, with nine generated locales; musl and the BSDs were not. - [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - a host date pattern whose fields are not in an order the console has a format for (year, day, month; day, year, month; month, year, day), lack one of the three, or repeat one gives no console format, and neither does a time pattern with both or neither of a 12-hour and a 24-hour marker. `auto` then answers 1 for the date and 1 for the time, the answers without the variables, and prints one stderr line naming the variable and the pattern. What a console would show in such a locale is unknown. - [sceSystemServiceParamGetInt](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - the time zone (parameter 4) and summer time (parameter 5) follow the host's local time zone at the moment of the call. Titles compute the local time as UTC plus the time zone in minutes plus 60 minutes when summer time is 1 ([Apollo](https://github.com/bucanero/apollo-ps4/blob/252a9d5a187c463994263009851a179f4f910c49/source/exec_cmd.c#L70-L92), [GoldHEN's frame logger](https://github.com/GoldHEN/GoldHEN_Plugins_Repository/blob/6c3a06f53d9caebadfb0aeed9bb94119012010a7/plugin_src/frame_logger/source/main.c#L60-L82), and [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/413d2e3518fb435f40971d238fe0ecae7ee551da/src/SharpProspero/Platform/SystemParameters.cs#L75-L79) calls them the offset from UTC in minutes and whether summer time is in effect), so the time zone is the host's current offset east of UTC less the summer time shift while summer time is in effect: 60 minutes on Linux, and on Windows the C runtime's own summer time bias (`_get_dstbias`), which is also what shifted its local time. For a host zone whose summer time is not one hour, Linux keeps the sum right and the standard offset wrong, and Windows the opposite; how the console reports such a zone is unknown. - [sceSystemServiceInitializePlayerDialogParam](../../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - a null param throws: what the console does with it is not measured. The console run in [prosper](https://github.com/mattias800/prosper/blob/40d95db32efe1ad00106a5b9a84e018fffa9ecff/prosper/tests/data/console_oracle/nethttp.golden.tsv#L46) shows only the 0x40 bytes written (size 0x40, user ID -1 at 0xC, zeros), so the field names and the mode and target account fields follow [SharpProspero's struct](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/SystemService/SystemService.cs#L637-L655), and the `void` return [its declaration](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/SystemService/SystemService.cs#L419-L426); the console left 0x800693020 in `rax`, not an SCE error code. Closes when: the null case is measured on a PS5