test(libSceRtc): pin the DOS time results a PS5 gives #5544

Closed
hugodearaujo wants to merge 1 commit from upstream-pr/5544 into main
hugodearaujo commented 2026-10-13 23:19:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-13T23:19:44Z.


What

The debt entry for sceRtcGetDosTime and sceRtcSetDosTime said their behaviour came from shadPS4 and fpPS4 and was not confirmed on a PS5. I measured both through a PS5's libSceRtc.sprx (firmware 13.60) from a payload, and AnyPS5 already gives the same result for every case:

  • sceRtcGetDosTime, 14 dates:
    • 1980-01-01 and 2107-12-31;
    • a normal date;
    • years 0, 1, 1979, 2108 and 9999;
    • February 30, month 13, hour 24, minute 60, second 60 and microsecond 1,000,000.
  • sceRtcSetDosTime, 15 packed values, including 0, 0xffffffff, 0x80000000 and every field at its largest raw value.

No code changes. The debt entry now records the measurement. guest_rtc gains the cases it did not cover yet:

  • the invalid-field refusals (INVALID_DAY, INVALID_HOUR, 0x80B5000C for the minute, 0x80B5000D for the second, INVALID_MICROSECOND), which leave the output untouched;
  • year 0, which is refused without writing, while years 1 and 9999 write 0 and 0xff9fbf7d;
  • three more packed values, including 0xffffffff, which decodes to 2107-15-31 31:63:62.
Probe output (PS5 13.60)
GETDOS|0|rc=00000000|dos=00210000
GETDOS|1|rc=00000000|dos=ff9fbf7d
GETDOS|2|rc=00000000|dos=5acf645c
GETDOS|3|rc=80b50008|dos=00000000
GETDOS|4|rc=80b50008|dos=ff9fbf7d
GETDOS|5|rc=80b5000a|dos=00007777
GETDOS|6|rc=80b50009|dos=00007777
GETDOS|7|rc=80b5000b|dos=00007777
GETDOS|8|rc=80b5000c|dos=00007777
GETDOS|9|rc=80b5000d|dos=00007777
GETDOS|10|rc=80b50008|dos=00007777
GETDOS|11|rc=80b5000e|dos=00007777
GETDOS|12|rc=80b50008|dos=00000000
GETDOS|13|rc=80b50008|dos=ff9fbf7d
SETDOS|00000000|rc=00000000|1980-0-0 0:0:0.0
SETDOS|00210000|rc=00000000|1980-1-1 0:0:0.0
SETDOS|5a8f6b7d|rc=00000000|2025-4-15 13:27:58.0
SETDOS|ff9fbf7d|rc=00000000|2107-12-31 23:59:58.0
SETDOS|ffffffff|rc=00000000|2107-15-31 31:63:62.0
SETDOS|0000001f|rc=00000000|1980-0-0 0:0:62.0
SETDOS|00000020|rc=00000000|1980-0-0 0:1:0.0
SETDOS|0000f800|rc=00000000|1980-0-0 31:0:0.0
SETDOS|00000780|rc=00000000|1980-0-0 0:60:0.0
SETDOS|00200000|rc=00000000|1980-1-0 0:0:0.0
SETDOS|01e00000|rc=00000000|1980-15-0 0:0:0.0
SETDOS|00000ffe|rc=00000000|1980-0-0 1:63:60.0
SETDOS|0001bc00|rc=00000000|1980-0-1 23:32:0.0
SETDOS|80000000|rc=00000000|2044-0-0 0:0:0.0
SETDOS|00010000|rc=00000000|1980-0-1 0:0:0.0

Dates in GETDOS order: 1980-01-01, 2107-12-31 23:59:59, 2025-06-15 12:34:57.999999, 1979-12-31, 2108-01-01, 2000-02-30, 2000-13-01, hour 24, minute 60, second 60, all zero, microsecond 1,000,000, 0001-01-01, 9999-12-31. 7777 is the probe's untouched fill value.

Tested

  • PS5 (firmware 13.60): the payload resolves both functions by NID in libSceRtc.sprx; a host build of the same cases against AnyPS5 gives identical output.
  • Linux: guest_rtc passes with the added cases.
  • Windows Server 2025 VM, WinLibs GCC 15.2, CI configure flags: CTest 1102 tests with no failures (the GPU tests skip in this VM).
  • No title I have calls these functions.

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: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4850716365 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5544). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-13T23:19:44Z. --- ### What The debt entry for `sceRtcGetDosTime` and `sceRtcSetDosTime` said their behaviour came from shadPS4 and fpPS4 and was not confirmed on a PS5. I measured both through a PS5's `libSceRtc.sprx` (firmware 13.60) from a payload, and AnyPS5 already gives the same result for every case: - `sceRtcGetDosTime`, 14 dates: - 1980-01-01 and 2107-12-31; - a normal date; - years 0, 1, 1979, 2108 and 9999; - February 30, month 13, hour 24, minute 60, second 60 and microsecond 1,000,000. - `sceRtcSetDosTime`, 15 packed values, including 0, `0xffffffff`, `0x80000000` and every field at its largest raw value. No code changes. The debt entry now records the measurement. `guest_rtc` gains the cases it did not cover yet: - the invalid-field refusals (`INVALID_DAY`, `INVALID_HOUR`, `0x80B5000C` for the minute, `0x80B5000D` for the second, `INVALID_MICROSECOND`), which leave the output untouched; - year 0, which is refused without writing, while years 1 and 9999 write 0 and `0xff9fbf7d`; - three more packed values, including `0xffffffff`, which decodes to `2107-15-31 31:63:62`. <details><summary>Probe output (PS5 13.60)</summary> ``` GETDOS|0|rc=00000000|dos=00210000 GETDOS|1|rc=00000000|dos=ff9fbf7d GETDOS|2|rc=00000000|dos=5acf645c GETDOS|3|rc=80b50008|dos=00000000 GETDOS|4|rc=80b50008|dos=ff9fbf7d GETDOS|5|rc=80b5000a|dos=00007777 GETDOS|6|rc=80b50009|dos=00007777 GETDOS|7|rc=80b5000b|dos=00007777 GETDOS|8|rc=80b5000c|dos=00007777 GETDOS|9|rc=80b5000d|dos=00007777 GETDOS|10|rc=80b50008|dos=00007777 GETDOS|11|rc=80b5000e|dos=00007777 GETDOS|12|rc=80b50008|dos=00000000 GETDOS|13|rc=80b50008|dos=ff9fbf7d SETDOS|00000000|rc=00000000|1980-0-0 0:0:0.0 SETDOS|00210000|rc=00000000|1980-1-1 0:0:0.0 SETDOS|5a8f6b7d|rc=00000000|2025-4-15 13:27:58.0 SETDOS|ff9fbf7d|rc=00000000|2107-12-31 23:59:58.0 SETDOS|ffffffff|rc=00000000|2107-15-31 31:63:62.0 SETDOS|0000001f|rc=00000000|1980-0-0 0:0:62.0 SETDOS|00000020|rc=00000000|1980-0-0 0:1:0.0 SETDOS|0000f800|rc=00000000|1980-0-0 31:0:0.0 SETDOS|00000780|rc=00000000|1980-0-0 0:60:0.0 SETDOS|00200000|rc=00000000|1980-1-0 0:0:0.0 SETDOS|01e00000|rc=00000000|1980-15-0 0:0:0.0 SETDOS|00000ffe|rc=00000000|1980-0-0 1:63:60.0 SETDOS|0001bc00|rc=00000000|1980-0-1 23:32:0.0 SETDOS|80000000|rc=00000000|2044-0-0 0:0:0.0 SETDOS|00010000|rc=00000000|1980-0-1 0:0:0.0 ``` Dates in `GETDOS` order: 1980-01-01, 2107-12-31 23:59:59, 2025-06-15 12:34:57.999999, 1979-12-31, 2108-01-01, 2000-02-30, 2000-13-01, hour 24, minute 60, second 60, all zero, microsecond 1,000,000, 0001-01-01, 9999-12-31. `7777` is the probe's untouched fill value. </details> ### Tested - PS5 (firmware 13.60): the payload resolves both functions by NID in `libSceRtc.sprx`; a host build of the same cases against AnyPS5 gives identical output. - Linux: `guest_rtc` passes with the added cases. - Windows Server 2025 VM, WinLibs GCC 15.2, CI configure flags: CTest 1102 tests with no failures (the GPU tests skip in this VM). - No title I have calls these functions. ### 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 (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: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hugodearaujo commented 2026-10-14 13:12:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-14T13:12:34Z.


Closing this myself for the same reason #5475, #5476 and #5540 were closed: no title is known to reach sceRtcGetDosTime or sceRtcSetDosTime. None of the dumps I have imports them, and no issue or PR names one that does. If a title turns out to stop on these on current main, I'll reopen with its ID and the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6169175172 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5544#issuecomment-6169175172). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-14T13:12:34Z. --- Closing this myself for the same reason #5475, #5476 and #5540 were closed: no title is known to reach `sceRtcGetDosTime` or `sceRtcSetDosTime`. None of the dumps I have imports them, and no issue or PR names one that does. If a title turns out to stop on these on current `main`, I'll reopen with its ID and the log line.

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!5544
No description provided.