Changes

Jump to navigation Jump to search
9,384 bytes added ,  17:45, 12 September 2019
m
no edit summary
Line 4: Line 4:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetApplicationLaunchProperty || Takes an input u64 ProcessId, returns an [[#ApplicationLaunchProperty]]
 +
|-
 +
| 1 || GetApplicationLaunchPropertyWithApplicationId || Takes an input u64 TitleId, returns an [[#ApplicationLaunchProperty]]
 
|-
 
|-
| 0 || GetApplicationLaunchProperty
+
| 2 || GetApplicationControlProperty || Takes an input u64 ProcessId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
 
|-
 
|-
| 1 || GetApplicationLaunchPropertyWithApplicationId
+
| 3 || GetApplicationControlPropertyWithApplicationId || Takes an input u64 TitleId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
 
|-
 
|-
| 2 || GetApplicationControlProperty
+
| 9998 || [9.0.0+] ||
 
|-
 
|-
| 3 || GetApplicationControlPropertyWithApplicationId
+
| 9999 || [9.0.0+] ||
 
|}
 
|}
  −
== GetApplicationControlPropertyWithApplicationId ==
  −
  −
Takes in a title id and a type-0x16 buffer. This is filled with the contents of control.nacp for that application.
      
= arp:w =
 
= arp:w =
Line 24: Line 24:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 
|-
 
|-
| 0 || AcquireRegistrar
+
| 0 || AcquireRegistrar || Returns an [[#IRegistrar]]
 
|-
 
|-
| 1 || DeleteProperties
+
| 1 || DeleteProperties || Takes an input u64 unknown
 
|}
 
|}
   Line 36: Line 36:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 
|-
 
|-
| 0 || Issue
+
| 0 || Issue || Takes an input u64 unknown
 
|-
 
|-
| 1 || SetApplicationLaunchProperty
+
| 1 || SetApplicationLaunchProperty || Takes an input [[#ApplicationLaunchProperty]]
 
|-
 
|-
| 2 || SetApplicationControlProperty
+
| 2 || SetApplicationControlProperty || Takes an input type-0x15 buffer filled with the contents of [[NACP_Format|control.nacp]]
|}
  −
 
  −
=== Launch Property Format ===
  −
 
  −
{| class="wikitable" border="1"
  −
|-
  −
! Offset
  −
! Size
  −
! Description
  −
|-
  −
| 0x0
  −
| 0x8
  −
| Title ID
  −
|-
  −
| 0x8
  −
| 0x4
  −
| Version
  −
|-
  −
| 0xC
  −
| 0x1
  −
| Base Game Storage ID
  −
|-
  −
| 0xD
  −
| 0x1
  −
| Update Storage ID
  −
|-
  −
| 0xE
  −
| 0x2
  −
| Padding
   
|}
 
|}
   Line 91: Line 62:  
| 5 || NotifyClientName
 
| 5 || NotifyClientName
 
|-
 
|-
| 6 || IsInFullAwake
+
| 6 || [3.0.0+] IsInFullAwake
 
|-
 
|-
 
| 11 || ScheduleTask
 
| 11 || ScheduleTask
Line 103: Line 74:  
| 15 || SchedulePeriodicTask
 
| 15 || SchedulePeriodicTask
 
|-
 
|-
| 101 || GetOperationMode
+
| 16 || [9.0.0+]
 
|-
 
|-
| 102 || WillDisconnectNetworkWhenEnteringSleep
+
| 101 || [3.0.0+] GetOperationMode
 
|-
 
|-
| 103 || WillStayHalfAwakeInsteadSleep
+
| 102 || [3.0.0+] WillDisconnectNetworkWhenEnteringSleep
 
|-
 
|-
 +
| 103 || [3.0.0+] WillStayHalfAwakeInsteadSleep
 
|}
 
|}
   Line 126: Line 98:  
| 4 || NotifyLeavingHalfAwake
 
| 4 || NotifyLeavingHalfAwake
 
|-
 
|-
| 5 || SetIsUsingSleepUnsupportedDevices
+
| 5 || [3.0.0+] SetIsUsingSleepUnsupportedDevices
 +
|}
 +
 
 +
= time:a, time:r, time:u =
 +
These are "nn::timesrv::detail::service::IStaticService".
 +
 
 +
These were added with [9.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetStandardUserSystemClock || Returns an [[#ISystemClock]].
 +
|-
 +
| 1 || GetStandardNetworkSystemClock || Returns an [[#ISystemClock]].
 +
|-
 +
| 2 || GetStandardSteadyClock || Returns an [[#ISteadyClock]].
 +
|-
 +
| 3 || GetTimeZoneService || Returns an [[#ITimeZoneService]].
 +
|-
 +
| 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClock]].
 +
|-
 +
| 5 || [4.0.0+] GetEphemeralNetworkSystemClock || Returns an [[#ISystemClock]].
 +
|-
 +
| 20 || [6.0.0+] GetSharedMemoryNativeHandle ||
 +
|-
 +
| 30 || [6.0.0-8.1.0] GetStandardNetworkClockOperationEventReadableHandle ||
 +
|-
 +
| 31 || [6.0.0-8.1.0] GetEphemeralNetworkClockOperationEventReadableHandle ||
 +
|-
 +
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset ||
 +
|-
 +
| 51 || [9.0.0+] GetStandardSteadyClockRtcValue ||
 +
|-
 +
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled ||
 +
|-
 +
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled ||
 +
|-
 +
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear ||
 +
|-
 +
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient ||
 +
|-
 +
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime ||
 +
|-
 +
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint ||
 +
|-
 +
| 400 || [4.0.0+] GetClockSnapshot ||
 +
|-
 +
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext ||
 +
|-
 +
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser ||
 +
|-
 +
| 501 || [4.0.0+] CalculateSpanBetween ||
 +
|}
 +
 
 +
== ISteadyClock ==
 +
This is "nn::timesrv::detail::service::ISteadyClock".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetCurrentTimePoint || No input, returns an output [[#SteadyClockTimePoint]].
 +
|-
 +
| 2 || GetTestOffset || No input, returns an output [[#TimeSpanType]].
 +
|-
 +
| 3 || SetTestOffset || Takes an input [[#TimeSpanType]], no output.
 +
|-
 +
| 100 || [2.0.0+] GetRtcValue || No input, returns an output s64.
 +
|-
 +
| 101 || [2.0.0+] IsRtcResetDetected || No input, returns an output u8 bool.
 +
|-
 +
| 102 || [2.0.0+] GetSetupResultValue || No input, returns an output u32.
 +
|-
 +
| 200 || [3.0.0+] GetInternalOffset || No input, returns an output [[#TimeSpanType]].
 +
|-
 +
| 201 || [3.0.0-3.0.2] SetInternalOffset || Takes an input [[#TimeSpanType]], no output.
 +
|}
 +
 
 +
=== SteadyClockTimePoint ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8|| A u64 representing a point in time.
 +
|-
 +
| 0x8 || 0x10 || An ID representing the clock source.
 +
|}
 +
 
 +
This is a 0x18-byte struct.
 +
 
 +
=== TimeSpanType ===
 +
This is an u64.
 +
 
 +
== ISystemClock ==
 +
This is "nn::timesrv::detail::service::ISystemClock".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetCurrentTime || Returns an output [[#PosixTime]].
 +
|-
 +
| 1 || SetCurrentTime || Takes an input [[#PosixTime]].
 +
|-
 +
| 2 || GetSystemClockContext || Returns an output [[#SystemClockContext]].
 +
|-
 +
| 3 || SetSystemClockContext || Takes an input [[#SystemClockContext]].
 +
|-
 +
| 4 || [9.0.0+] GetOperationEventReadableHandle ||
 +
|}
 +
 
 +
=== PosixTime ===
 +
This is an s64 for UTC POSIX time.
 +
 
 +
=== SystemClockContext ===
 +
This is an 0x20-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8|| a [[#PosixTime]] representing the system clock epoch.
 +
|-
 +
| 0x8 || 0x18 || a [[#SteadyClockTimePoint]]
 +
|}
 +
 
 +
== ITimeZoneService ==
 +
This is "nn::timesrv::detail::service::ITimeZoneService".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetDeviceLocationName || No input, returns an output [[#LocationName]].
 +
|-
 +
| 1 || SetDeviceLocationName || Takes an input [[#LocationName]], no output.
 +
|-
 +
| 2 || GetTotalLocationNameCount || No input, returns an output s32.
 +
|-
 +
| 3 || LoadLocationNameList ||
 +
|-
 +
| 4 || LoadTimeZoneRule || Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRule]], no output.
 +
|-
 +
| 5 || [2.0.0+] GetTimeZoneRuleVersion ||  No input, returns an output [[#TimeZoneRuleVersion]].
 +
|-
 +
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime ||
 +
|-
 +
| 7 || [9.0.0+] SetDeviceLocationNameWithTimeZoneRule ||
 +
|-
 +
| 8 || [9.0.0+] ParseTimeZoneBinary || Stubbed, return 0x7BC74.
 +
|-
 +
| 20 || [9.0.0+] GetDeviceLocationNameOperationEventReadableHandle ||
 +
|-
 +
| 100 || ToCalendarTime || Takes an input [[#PosixTime]] and a type-0x15 input buffer for [[#TimeZoneRule]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
 +
|-
 +
| 101 || ToCalendarTimeWithMyRule || Takes an input [[#PosixTime]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
 +
|-
 +
| 201 || ToPosixTime || Takes an input [[#CalendarTime]], a type-0x15 input buffer for [[#TimeZoneRule]], an type-0xA output buffer for [[#PosixTime]] array, and returns an output s32.
 +
|-
 +
| 202 || ToPosixTimeWithMyRule || Takes an input [[#CalendarTime]], an type-0xA output buffer for [[#PosixTime]] array, and returns an output s32.
 +
|}
 +
 
 +
=== LoadLocationNameList ===
 +
Takes an input s32 LocationName_index and a type-0x6 output buffer for [[#LocationName]], returns an output s32 for total output entries.
 +
 
 +
=== LocationName ===
 +
This contains a TimeZone location string with a max size of 0x24 bytes.
 +
 
 +
=== TimeZoneRule ===
 +
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
 +
 
 +
This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure.
 +
 
 +
The files contained under zoneinfo/ directory are Tzif2 files without Tzif1 header and data at the begining of them (see [https://tools.ietf.org/html/rfc8536 RFC8536] for more information).
 +
 
 +
The conversion of a Tzif2 file to a TimeZoneRule structure is based on [https://github.com/eggert/tz/blob/master/localtime.c tz database code] with some custom modifications (Leap seconds aren't handled, no usage of "posixrules" and Tzif1 support stripped out).
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || timecnt
 +
|-
 +
| 0x4 || 0x4 || typecnt
 +
|-
 +
| 0x8 || 0x4 || charcnt
 +
|-
 +
| 0xC || 0x1 || goback
 +
|-
 +
| 0xD || 0x1 || goahead
 +
|-
 +
| 0xE || 0x2 || Padding
 +
|-
 +
| 0x10 || 0x8 * 1000 || ats
 +
|-
 +
| 0x1f50 || 0x1 * 1000 || types
 +
|-
 +
| 0x2338 || 0x10 * 128 || ttis (time type information), struct ttinfo[1000]
 +
|-
 +
| 0x2b38 || 0x1 * 512 || chars
 +
|-
 +
| 0x2d38 || 0x4 || defaulttype
 +
|-
 +
| 0x2d3c || 0x12c4 || Reserved / Unused
 +
|}
 +
 
 +
=== ttinfo ===
 +
This is an 0x10-byte struct.
 +
Represent a Time Type Information used in [[#TimeZoneRule]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || tt_gmtoff
 +
|-
 +
| 0x4 || 0x1 || tt_isdst
 +
|-
 +
| 0x5 || 0x3 || Padding
 +
|-
 +
| 0x8 || 0x4 || tt_abbrind
 +
|-
 +
| 0xC || 0x1 || tt_ttisstd
 +
|-
 +
| 0xD || 0x1 || tt_ttisgmt
 +
|-
 +
| 0xE || 0x2 || Padding
 +
|}
 +
 
 +
=== TimeZoneRuleVersion ===
 +
This is an u128.
 +
 
 +
=== CalendarTime ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x2 || Year
 +
|-
 +
| 0x2 || 0x1 || Month
 +
|-
 +
| 0x3 || 0x1 || Day
 +
|-
 +
| 0x4 || 0x1 || Hour
 +
|-
 +
| 0x5 || 0x1 || Minute
 +
|-
 +
| 0x6 || 0x1 || Second
 +
|-
 +
| 0x7 || 0x1 || Padding / unknown?
 +
|}
 +
 
 +
This is an 0x8-byte struct.
 +
 
 +
=== CalendarAdditionalInfo ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || 0-based day-of-week.
 +
|-
 +
| 0x4 || 0x4 || 0-based day-of-year.
 +
|-
 +
| 0x8 || 0x8 || Timezone name string.
 +
|-
 +
| 0x10 || 0x4 || 0 = no DST, 1 = DST.
 +
|-
 +
| 0x14 || 0x4 || s32 seconds relative to UTC for this timezone.
 +
|}
 +
 
 +
This is an 0x18-byte struct. This stores timezone info.
 +
 
 +
= notif:a =
 +
This is "nn::notification::server::INotificationServicesForApplication".
 +
 
 +
This was added with [9.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 500 || RegisterAlarmSetting
 +
|-
 +
| 510 || UpdateAlarmSetting
 +
|-
 +
| 520 || ListAlarmSettings
 +
|-
 +
| 530 || LoadApplicationParameter
 +
|-
 +
| 540 || DeleteAlarmSetting
 
|-
 
|-
 +
| 1000 || Initialize
 +
|}
 +
 +
= notif:s =
 +
This is "nn::notification::server::INotificationServicesForSystem".
 +
 +
This was added with [9.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 500 || RegisterAlarmSetting
 +
|-
 +
| 510 || UpdateAlarmSetting
 +
|-
 +
| 520 || ListAlarmSettings
 +
|-
 +
| 530 || LoadApplicationParameter
 +
|-
 +
| 540 || DeleteAlarmSetting
 +
|-
 +
| 1000 || Initialize
 +
|-
 +
| 1010 ||
 +
|-
 +
| 1020 ||
 +
|-
 +
| 1030 ||
 +
|-
 +
| 1040 ||
 +
|-
 +
| 1500 ||
 +
|-
 +
| 1510 ||
 +
|-
 +
| 2000 ||
 +
|-
 +
| 2001 ||
 +
|-
 +
| 2010 ||
 +
|-
 +
| 2020 ||
 +
|-
 +
| 8000 ||
 +
|-
 +
| 8010 ||
 +
|-
 +
| 9000 ||
 +
|}
 +
 +
== Cmd1040 ==
 +
No input, returns an output [[#IUnknown0]].
 +
 +
== IUnknown0 ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|}
 +
 +
This was added with [9.0.0+].
 +
 +
Cmd0: no input, returns an output handle.
 +
 +
= ApplicationLaunchProperty =
 +
Total size is 0x10-bytes.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x00
 +
| 0x08
 +
| Title ID
 +
|-
 +
| 0x08
 +
| 0x04
 +
| Version
 +
|-
 +
| 0x0C
 +
| 0x01
 +
| Base Game [[Filesystem_services#StorageId|Storage Id]]
 +
|-
 +
| 0x0D
 +
| 0x01
 +
| Update [[Filesystem_services#StorageId|Storage Id]]
 +
|-
 +
| 0x0E
 +
| 0x02
 +
| Padding
 
|}
 
|}
    
[[Category:Services]]
 
[[Category:Services]]
28

edits

Navigation menu