Difference between revisions of "SceRtc"
(→SceRtc) |
|||
(37 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | Real time clock. | ||
+ | |||
== Module == | == Module == | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Version | + | ! Version !! World !! Privilege |
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || Non-secure || Kernel |
|} | |} | ||
Line 17: | Line 18: | ||
! Version !! Name !! World !! Visibility !! NID | ! Version !! Name !! World !! Visibility !! NID | ||
|- | |- | ||
− | | 1.69 || [[SceRtc#SceRtcForDriver|SceRtcForDriver]] || Non-secure || Kernel || | + | | 1.69-3.60 || [[SceRtc#SceRtcForDriver|SceRtcForDriver]] || Non-secure || Kernel || 0x0351D827 |
+ | |- | ||
+ | | 1.69-3.60 || [[SceRtc#SceRtc|SceRtc]] || Non-secure || User || 0x3503487E | ||
+ | |} | ||
+ | |||
+ | == SceRtcForDriver == | ||
+ | |||
+ | === sceRtcConvertLocalTimeToUtcForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xAD2F3544 | ||
+ | |} | ||
+ | |||
+ | === sceRtcConvertUtcToLocalTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xC6E03DD4 | ||
+ | |} | ||
+ | |||
+ | === sceRtcFormatRFC2822ForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xBA3415F8 | ||
+ | |} | ||
+ | |||
+ | === sceRtcFormatRFC2822LocalTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x1F7FC209 | ||
+ | |} | ||
+ | |||
+ | === sceRtcFormatRFC3339ForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xD32AC698 | ||
+ | |} | ||
+ | |||
+ | <source lang="C">int sceRtcFormatRFC3339ForDriver(char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes);</source> | ||
+ | |||
+ | === sceRtcFormatRFC3339LocalTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x35925318 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetAccumulativeTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x0A86FB04 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetAlarmTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xC838275A | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentAdNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x3E3C09A0 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentClockForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xA930CD1A | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentClockLocalTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x7DC0DF93 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentDebugNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xC141632A | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentGpsTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xF69B610F | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xF1517B38 | ||
+ | |} | ||
+ | |||
+ | If the current NetworkTick is less than 2015/01/01, the system will ignore the registry setting and update the NetworkTick from the internet. | ||
+ | |||
+ | <source lang="C">int sceRtcGetCurrentNetworkTickForDriver(SceRtcTick *tick);</source> | ||
+ | |||
+ | === sceRtcGetCurrentRetainedNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x40B4BCFF | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xDEC408D4 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetCurrentSecureTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 1.03-3.60 || 0x401C0954 | ||
+ | |} | ||
+ | |||
+ | If the current SecureTick is less than 2015/01/01, it sets 0xDDDEF8B3A14000(1980/01/01 00:00:00 UTC) to the Secure Tick and returns error code 0x80251002. | ||
+ | |||
+ | <source lang="C">int sceRtcGetCurrentSecureTickForDriver(SceRtcTick *tick);</source> | ||
+ | |||
+ | === sceRtcConvertTickToDateTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 1.03-3.60 || 0x42A0DFCB | ||
+ | |} | ||
+ | |||
+ | This is a guessed name. | ||
+ | |||
+ | Used with the result of sceRtcGetCurrentSecureTickForDriver. Used by [[SceCoredump]], [[SceSblGcAuthMgr]]. | ||
+ | |||
+ | <source lang="C">int sceRtcConvertTickToDateTimeForDriver(SceDateTime *dst, SceRtcTick *src);</source> | ||
+ | |||
+ | === sceRtcConvertDateTimeToUnixTimeForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x497B5DC9 | ||
+ | |} | ||
+ | |||
+ | This is a guessed name. | ||
+ | |||
+ | Used by [[SceCoredump]]. | ||
+ | |||
+ | <source lang="C">int sceRtcConvertDateTimeToUnixTimeForDriver(const SceDateTime *src, SceUInt64 *dst);</source> | ||
+ | |||
+ | === SceRtcForDriver_A7236656 === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xA7236656 | ||
+ | |} | ||
+ | |||
+ | <source lang="C">int SceRtcForDriver_A7236656(SceRtcTick *tick);</source> | ||
+ | |||
+ | === sceRtcGetLastAdjustedTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x8A987573 | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetLastReincarnatedTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x3D614A9A | ||
+ | |} | ||
+ | |||
+ | === sceRtcGetSecureAlarmTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xBD53731C | ||
+ | |} | ||
+ | |||
+ | === SceRtcForDriver_A2D280B4 === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xA2D280B4 | ||
+ | |} | ||
+ | |||
+ | Initializes SceRtc internal flags. | ||
+ | |||
+ | <source lang="C">int SceRtcForDriver_A2D280B4(void);</source> | ||
+ | |||
+ | === SceRtcForDriver_ABA035B7 === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xABA035B7 | ||
+ | |} | ||
+ | |||
+ | Reset all SceRtc internal flags to 0. | ||
+ | |||
+ | Returns 0. | ||
+ | |||
+ | <source lang="C">int SceRtcForDriver_ABA035B7(void);</source> | ||
+ | |||
+ | === sceRtcGetCurrentToolSecureTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 0.990-3.60 || 0xA0D7899A | ||
+ | |} | ||
+ | |||
+ | This is a guessed name. | ||
+ | |||
+ | Used on Tool only. Used when checking DevKit activation license expire date. | ||
+ | |||
+ | Creates a tick using [[SceKernelThreadMgr#sceKernelGetSystemTimeWideForDriver]]. | ||
+ | |||
+ | <source lang="C">int sceRtcGetCurrentToolSecureTickForDriver(SceRtcTick *pTick);</source> | ||
+ | |||
+ | === sceRtcIsAlarmedForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xCD295F0C | ||
+ | |} | ||
+ | |||
+ | === sceRtcIsSecureAlarmedForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xE39F2ABE | ||
+ | |} | ||
+ | |||
+ | === sceRtcRegisterCallbackForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x5220870D | ||
+ | |} | ||
+ | |||
+ | === sceRtcRegisterSecureAlarmCallbackForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xCF84DFC0 | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetAlarmTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xD610C646 | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetConfForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xACFE5A9F | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetCurrentDebugNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xAAB6053F | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetCurrentNetworkTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x162E486E | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetCurrentSecureTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x7D431C87 | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetCurrentTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x70A78CD2 | ||
+ | |} | ||
+ | |||
+ | === sceRtcSetSecureAlarmTickForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x8333790D | ||
+ | |} | ||
+ | |||
+ | === sceRtcUnregisterCallbackForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x9546C68B | ||
+ | |} | ||
+ | |||
+ | === sceRtcUnregisterSecureAlarmCallbackForDriver === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0xEDDC2325 | ||
+ | |} | ||
+ | |||
+ | === SceRtcForDriver_9C8AF264 === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
|- | |- | ||
− | | 3.60 || | + | | 0.931-3.60 || 0x9C8AF264 |
+ | |} | ||
+ | |||
+ | Adds time (in second) to a time structure (in nanosecond). | ||
+ | |||
+ | <source lang="C"> | ||
+ | typedef struct SceRtcSomeTime { | ||
+ | SceUInt32 time_minor; // in nanosecond | ||
+ | SceUInt32 time_major; // in nanosecond | ||
+ | } SceRtcSomeTime; | ||
+ | |||
+ | int SceRtcForDriver_9C8AF264(SceRtcSomeTime *pDst, SceRtcSomeTime *pSrc, SceUInt32 time_minor_sec, SceUInt32 time_major_sec); | ||
+ | </source> | ||
+ | |||
+ | === SceRtcForDriver_CE51C2A1 === | ||
+ | {| class="wikitable" | ||
|- | |- | ||
− | + | ! Version !! NID | |
|- | |- | ||
− | | 3.60 || | + | | 0.931-3.60 || 0xCE51C2A1 |
|} | |} | ||
− | == | + | Adds time (in microseconds) to a time structure (in nanosecond). |
+ | |||
+ | <source lang="C"> | ||
+ | typedef struct SceRtcSomeTime { | ||
+ | SceUInt32 time_minor; // in nanosecond | ||
+ | SceUInt32 time_major; // in nanosecond | ||
+ | } SceRtcSomeTime; | ||
+ | |||
+ | int SceRtcForDriver_CE51C2A1(SceRtcSomeTime *pDst, SceRtcSomeTime *pSrc, SceUInt32 time_minor_usec, SceUInt32 time_major_usec); | ||
+ | </source> | ||
+ | |||
+ | === SceRtcForDriver_0CB72FAF === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Version !! NID | ||
+ | |- | ||
+ | | 3.60 || 0x0CB72FAF | ||
+ | |} | ||
+ | |||
+ | Used by [[SceCompat#sceCompatSetUpdateState]]. | ||
== SceRtc == | == SceRtc == | ||
Line 35: | Line 434: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x06F734FE |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcConvertLocalTimeToUtc === | === _sceRtcConvertLocalTimeToUtc === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 44: | Line 442: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x0FC8AC41 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcConvertUtcToLocalTime === | === _sceRtcConvertUtcToLocalTime === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 53: | Line 450: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x1E61DDA4 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentTick === | === _sceRtcGetCurrentTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 62: | Line 458: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x247EE33B |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentClock === | === _sceRtcGetCurrentClock === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 71: | Line 466: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x24947354 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== sceRtcGetAccumulativeTime === | === sceRtcGetAccumulativeTime === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 80: | Line 474: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x258BE8EC |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcFormatRFC2822 === | === _sceRtcFormatRFC2822 === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 89: | Line 482: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x2CD6AC86 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentGpsTick === | === _sceRtcGetCurrentGpsTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 98: | Line 490: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x3BA820E5 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentClockLocalTime === | === _sceRtcGetCurrentClockLocalTime === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 107: | Line 498: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x41A6C861 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcFormatRFC3339LocalTime === | === _sceRtcFormatRFC3339LocalTime === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 116: | Line 506: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x4836474D |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcFormatRFC2822LocalTime === | === _sceRtcFormatRFC2822LocalTime === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 125: | Line 514: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x4C7ED349 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcFormatRFC3339 === | === _sceRtcFormatRFC3339 === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 134: | Line 522: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0x7EE2CBEF |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentRetainedNetworkTick === | === _sceRtcGetCurrentRetainedNetworkTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 143: | Line 530: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0xC17EA809 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetLastReincarnatedTick === | === _sceRtcGetLastReincarnatedTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 152: | Line 538: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0xE13D0FE5 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetLastAdjustedTick === | === _sceRtcGetLastAdjustedTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 161: | Line 546: | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
− | | 1.69 | + | | 1.69-3.60 || 0xEA157EC5 |
− | |||
− | |||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentAdNetworkTick === | === _sceRtcGetCurrentAdNetworkTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 172: | Line 556: | ||
| 3.60 || 0x76EFA8FE | | 3.60 || 0x76EFA8FE | ||
|} | |} | ||
+ | |||
=== _sceRtcGetCurrentDebugNetworkTick === | === _sceRtcGetCurrentDebugNetworkTick === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 179: | Line 564: | ||
| 3.60 || 0xBF639B21 | | 3.60 || 0xBF639B21 | ||
|} | |} | ||
+ | |||
+ | == How to get current time and date == | ||
+ | |||
+ | Getting the current time and date involves [[Ernie#Syscon_Scratch_Pad|Syscon scratchpad]] and [[SceSyscon#SceSysconForDriver_D7BEFF8B|Syscon command 0x11]]. Syscon command 0x11 that returns twice the number of seconds the Syscon has been running since its power on. Syscon scratchpad at offset 0x10 contains the timestamp when syscon "started" running. It is stored in the following format: microseconds since 01/01/0001 and divided by 2^19. By adding those values together the OS obtains the current time. | ||
+ | |||
+ | In pseudocode: | ||
+ | <source lang="python"> | ||
+ | last_reincarnated_tick = syscon_read_scratchpad(offset=0x10, size=5) | ||
+ | up_time_half_seconds = syscon_cmd_read(cmd=0x11, size=4) | ||
+ | UTC = timedelta(microseconds=last_reincarnated_tick * (1<<19)) + datetime(1, 1, 1) + timedelta(seconds=up_time_half_seconds*2) | ||
+ | </source> | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 13:24, 29 October 2021
Real time clock.
Module
Version | World | Privilege |
---|---|---|
1.69-3.60 | Non-secure | Kernel |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
1.69-3.60 | SceRtcForDriver | Non-secure | Kernel | 0x0351D827 |
1.69-3.60 | SceRtc | Non-secure | User | 0x3503487E |
SceRtcForDriver
sceRtcConvertLocalTimeToUtcForDriver
Version | NID |
---|---|
3.60 | 0xAD2F3544 |
sceRtcConvertUtcToLocalTimeForDriver
Version | NID |
---|---|
3.60 | 0xC6E03DD4 |
sceRtcFormatRFC2822ForDriver
Version | NID |
---|---|
3.60 | 0xBA3415F8 |
sceRtcFormatRFC2822LocalTimeForDriver
Version | NID |
---|---|
3.60 | 0x1F7FC209 |
sceRtcFormatRFC3339ForDriver
Version | NID |
---|---|
3.60 | 0xD32AC698 |
int sceRtcFormatRFC3339ForDriver(char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes);
sceRtcFormatRFC3339LocalTimeForDriver
Version | NID |
---|---|
3.60 | 0x35925318 |
sceRtcGetAccumulativeTimeForDriver
Version | NID |
---|---|
3.60 | 0x0A86FB04 |
sceRtcGetAlarmTickForDriver
Version | NID |
---|---|
3.60 | 0xC838275A |
sceRtcGetCurrentAdNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0x3E3C09A0 |
sceRtcGetCurrentClockForDriver
Version | NID |
---|---|
3.60 | 0xA930CD1A |
sceRtcGetCurrentClockLocalTimeForDriver
Version | NID |
---|---|
3.60 | 0x7DC0DF93 |
sceRtcGetCurrentDebugNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0xC141632A |
sceRtcGetCurrentGpsTickForDriver
Version | NID |
---|---|
3.60 | 0xF69B610F |
sceRtcGetCurrentNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0xF1517B38 |
If the current NetworkTick is less than 2015/01/01, the system will ignore the registry setting and update the NetworkTick from the internet.
int sceRtcGetCurrentNetworkTickForDriver(SceRtcTick *tick);
sceRtcGetCurrentRetainedNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0x40B4BCFF |
sceRtcGetCurrentTickForDriver
Version | NID |
---|---|
3.60 | 0xDEC408D4 |
sceRtcGetCurrentSecureTickForDriver
Version | NID |
---|---|
1.03-3.60 | 0x401C0954 |
If the current SecureTick is less than 2015/01/01, it sets 0xDDDEF8B3A14000(1980/01/01 00:00:00 UTC) to the Secure Tick and returns error code 0x80251002.
int sceRtcGetCurrentSecureTickForDriver(SceRtcTick *tick);
sceRtcConvertTickToDateTimeForDriver
Version | NID |
---|---|
1.03-3.60 | 0x42A0DFCB |
This is a guessed name.
Used with the result of sceRtcGetCurrentSecureTickForDriver. Used by SceCoredump, SceSblGcAuthMgr.
int sceRtcConvertTickToDateTimeForDriver(SceDateTime *dst, SceRtcTick *src);
sceRtcConvertDateTimeToUnixTimeForDriver
Version | NID |
---|---|
3.60 | 0x497B5DC9 |
This is a guessed name.
Used by SceCoredump.
int sceRtcConvertDateTimeToUnixTimeForDriver(const SceDateTime *src, SceUInt64 *dst);
SceRtcForDriver_A7236656
Version | NID |
---|---|
3.60 | 0xA7236656 |
int SceRtcForDriver_A7236656(SceRtcTick *tick);
sceRtcGetLastAdjustedTickForDriver
Version | NID |
---|---|
3.60 | 0x8A987573 |
sceRtcGetLastReincarnatedTickForDriver
Version | NID |
---|---|
3.60 | 0x3D614A9A |
sceRtcGetSecureAlarmTickForDriver
Version | NID |
---|---|
3.60 | 0xBD53731C |
SceRtcForDriver_A2D280B4
Version | NID |
---|---|
3.60 | 0xA2D280B4 |
Initializes SceRtc internal flags.
int SceRtcForDriver_A2D280B4(void);
SceRtcForDriver_ABA035B7
Version | NID |
---|---|
3.60 | 0xABA035B7 |
Reset all SceRtc internal flags to 0.
Returns 0.
int SceRtcForDriver_ABA035B7(void);
sceRtcGetCurrentToolSecureTickForDriver
Version | NID |
---|---|
0.990-3.60 | 0xA0D7899A |
This is a guessed name.
Used on Tool only. Used when checking DevKit activation license expire date.
Creates a tick using SceKernelThreadMgr#sceKernelGetSystemTimeWideForDriver.
int sceRtcGetCurrentToolSecureTickForDriver(SceRtcTick *pTick);
sceRtcIsAlarmedForDriver
Version | NID |
---|---|
3.60 | 0xCD295F0C |
sceRtcIsSecureAlarmedForDriver
Version | NID |
---|---|
3.60 | 0xE39F2ABE |
sceRtcRegisterCallbackForDriver
Version | NID |
---|---|
3.60 | 0x5220870D |
sceRtcRegisterSecureAlarmCallbackForDriver
Version | NID |
---|---|
3.60 | 0xCF84DFC0 |
sceRtcSetAlarmTickForDriver
Version | NID |
---|---|
3.60 | 0xD610C646 |
sceRtcSetConfForDriver
Version | NID |
---|---|
3.60 | 0xACFE5A9F |
sceRtcSetCurrentDebugNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0xAAB6053F |
sceRtcSetCurrentNetworkTickForDriver
Version | NID |
---|---|
3.60 | 0x162E486E |
sceRtcSetCurrentSecureTickForDriver
Version | NID |
---|---|
3.60 | 0x7D431C87 |
sceRtcSetCurrentTickForDriver
Version | NID |
---|---|
3.60 | 0x70A78CD2 |
sceRtcSetSecureAlarmTickForDriver
Version | NID |
---|---|
3.60 | 0x8333790D |
sceRtcUnregisterCallbackForDriver
Version | NID |
---|---|
3.60 | 0x9546C68B |
sceRtcUnregisterSecureAlarmCallbackForDriver
Version | NID |
---|---|
3.60 | 0xEDDC2325 |
SceRtcForDriver_9C8AF264
Version | NID |
---|---|
0.931-3.60 | 0x9C8AF264 |
Adds time (in second) to a time structure (in nanosecond).
typedef struct SceRtcSomeTime {
SceUInt32 time_minor; // in nanosecond
SceUInt32 time_major; // in nanosecond
} SceRtcSomeTime;
int SceRtcForDriver_9C8AF264(SceRtcSomeTime *pDst, SceRtcSomeTime *pSrc, SceUInt32 time_minor_sec, SceUInt32 time_major_sec);
SceRtcForDriver_CE51C2A1
Version | NID |
---|---|
0.931-3.60 | 0xCE51C2A1 |
Adds time (in microseconds) to a time structure (in nanosecond).
typedef struct SceRtcSomeTime {
SceUInt32 time_minor; // in nanosecond
SceUInt32 time_major; // in nanosecond
} SceRtcSomeTime;
int SceRtcForDriver_CE51C2A1(SceRtcSomeTime *pDst, SceRtcSomeTime *pSrc, SceUInt32 time_minor_usec, SceUInt32 time_major_usec);
SceRtcForDriver_0CB72FAF
Version | NID |
---|---|
3.60 | 0x0CB72FAF |
Used by SceCompat#sceCompatSetUpdateState.
SceRtc
_sceRtcGetCurrentNetworkTick
Version | NID |
---|---|
1.69-3.60 | 0x06F734FE |
_sceRtcConvertLocalTimeToUtc
Version | NID |
---|---|
1.69-3.60 | 0x0FC8AC41 |
_sceRtcConvertUtcToLocalTime
Version | NID |
---|---|
1.69-3.60 | 0x1E61DDA4 |
_sceRtcGetCurrentTick
Version | NID |
---|---|
1.69-3.60 | 0x247EE33B |
_sceRtcGetCurrentClock
Version | NID |
---|---|
1.69-3.60 | 0x24947354 |
sceRtcGetAccumulativeTime
Version | NID |
---|---|
1.69-3.60 | 0x258BE8EC |
_sceRtcFormatRFC2822
Version | NID |
---|---|
1.69-3.60 | 0x2CD6AC86 |
_sceRtcGetCurrentGpsTick
Version | NID |
---|---|
1.69-3.60 | 0x3BA820E5 |
_sceRtcGetCurrentClockLocalTime
Version | NID |
---|---|
1.69-3.60 | 0x41A6C861 |
_sceRtcFormatRFC3339LocalTime
Version | NID |
---|---|
1.69-3.60 | 0x4836474D |
_sceRtcFormatRFC2822LocalTime
Version | NID |
---|---|
1.69-3.60 | 0x4C7ED349 |
_sceRtcFormatRFC3339
Version | NID |
---|---|
1.69-3.60 | 0x7EE2CBEF |
_sceRtcGetCurrentRetainedNetworkTick
Version | NID |
---|---|
1.69-3.60 | 0xC17EA809 |
_sceRtcGetLastReincarnatedTick
Version | NID |
---|---|
1.69-3.60 | 0xE13D0FE5 |
_sceRtcGetLastAdjustedTick
Version | NID |
---|---|
1.69-3.60 | 0xEA157EC5 |
_sceRtcGetCurrentAdNetworkTick
Version | NID |
---|---|
3.60 | 0x76EFA8FE |
_sceRtcGetCurrentDebugNetworkTick
Version | NID |
---|---|
3.60 | 0xBF639B21 |
How to get current time and date
Getting the current time and date involves Syscon scratchpad and Syscon command 0x11. Syscon command 0x11 that returns twice the number of seconds the Syscon has been running since its power on. Syscon scratchpad at offset 0x10 contains the timestamp when syscon "started" running. It is stored in the following format: microseconds since 01/01/0001 and divided by 2^19. By adding those values together the OS obtains the current time.
In pseudocode:
last_reincarnated_tick = syscon_read_scratchpad(offset=0x10, size=5)
up_time_half_seconds = syscon_cmd_read(cmd=0x11, size=4)
UTC = timedelta(microseconds=last_reincarnated_tick * (1<<19)) + datetime(1, 1, 1) + timedelta(seconds=up_time_half_seconds*2)