Changes

Jump to navigation Jump to search
11,347 bytes added ,  21:13, 15 October 2023
no edit summary
Line 4: Line 4:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#GetApplicationLaunchProperty|GetApplicationLaunchProperty]]
 +
|-
 +
| 1 || [10.0.0+] [[#GetApplicationControlProperty|GetApplicationControlProperty]] ([1.0.0-9.2.0] [[#GetApplicationLaunchPropertyWithApplicationId|GetApplicationLaunchPropertyWithApplicationId]])
 +
|-
 +
| 2 || [10.0.0+] [[#GetApplicationProcessProperty|GetApplicationProcessProperty]] ([1.0.0-9.2.0] [[#GetApplicationControlProperty|GetApplicationControlProperty]])
 +
|-
 +
| 3 || [10.0.0+] [[#GetApplicationInstanceId|GetApplicationInstanceId]] ([1.0.0-9.2.0] [[#GetApplicationControlPropertyWithApplicationId|GetApplicationControlPropertyWithApplicationId]])
 +
|-
 +
| 4 || [10.0.0+] [[#GetApplicationInstanceUnregistrationNotifier|GetApplicationInstanceUnregistrationNotifier]]
 
|-
 
|-
| 0 || GetApplicationLaunchProperty || Takes an input u64 ProcessId, returns an [[#ApplicationLaunchProperty]]
+
| 5 || [10.0.0+] [[#ListApplicationInstanceId|ListApplicationInstanceId]]
 
|-
 
|-
| 1 || GetApplicationLaunchPropertyWithApplicationId || Takes an input u64 TitleId, returns an [[#ApplicationLaunchProperty]]
+
| 6 || [10.0.0+] [[#GetMicroApplicationInstanceId|GetMicroApplicationInstanceId]]
 
|-
 
|-
| 2 || GetApplicationControlProperty || Takes an input u64 ProcessId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
+
| 7 || [10.0.0+] [[#GetApplicationCertificate|GetApplicationCertificate]]
 
|-
 
|-
| 3 || GetApplicationControlPropertyWithApplicationId || Takes an input u64 TitleId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
+
| 9998 || [9.0.0-9.2.0] [[#GetPreomiaApplicationLaunchProperty|GetPreomiaApplicationLaunchProperty]]
 
|-
 
|-
| 9998 || [9.0.0+] ||
+
| 9999 || [9.0.0-9.2.0] [[#GetPreomiaApplicationControlProperty|GetPreomiaApplicationControlProperty]]
 +
|}
 +
 
 +
== GetApplicationLaunchProperty ==
 +
Takes an input u64 ProcessId. Returns an [[#ApplicationLaunchProperty]].
 +
 
 +
[10.0.0+] Now takes an input [[#ApplicationInstanceId]] instead of ProcessId.
 +
 
 +
== GetApplicationLaunchPropertyWithApplicationId ==
 +
Takes an input u64 ApplicationId. Returns an [[#ApplicationLaunchProperty]].
 +
 
 +
== GetApplicationControlProperty ==
 +
Takes an input u64 ProcessId and a type-0x16 output buffer containing an [[NACP|ApplicationControlProperty]]. No output.
 +
 
 +
[10.0.0+] Now takes an input [[#ApplicationInstanceId]] instead of ProcessId.
 +
 
 +
== GetApplicationControlPropertyWithApplicationId ==
 +
Takes an input u64 ApplicationId and a type-0x16 output buffer containing an [[NACP|ApplicationControlProperty]]. No output.
 +
 
 +
== GetApplicationProcessProperty ==
 +
Takes an input [[#ApplicationInstanceId]]. Returns an [[#ApplicationProcessProperty]].
 +
 
 +
== GetApplicationInstanceId ==
 +
Takes an input u64 ProcessId. Returns an [[#ApplicationInstanceId]].
 +
 
 +
== GetApplicationInstanceUnregistrationNotifier ==
 +
No input. Returns an [[#IUnregistrationNotifier]].
 +
 
 +
== ListApplicationInstanceId ==
 +
Takes a type-0x6 output buffer containing an array of [[#ApplicationInstanceId]]. Returns an s32 '''Count'''.
 +
 
 +
== GetMicroApplicationInstanceId ==
 +
Same as [[#GetApplicationInstanceId]].
 +
 
 +
== GetApplicationCertificate ==
 +
Takes an input [[#ApplicationInstanceId]] and a type-0x16 output buffer containing an [[#ApplicationCertificate]]. No output.
 +
 
 +
== GetPreomiaApplicationLaunchProperty ==
 +
Same as [[#GetApplicationLaunchProperty]].
 +
 
 +
== GetPreomiaApplicationControlProperty ==
 +
Same as [[#GetApplicationControlProperty]].
 +
 
 +
== IUnregistrationNotifier ==
 +
This is "nn::arp::detail::IUnregistrationNotifier".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 
|-
 
|-
| 9999 || [9.0.0+] ||
+
| 0 || [[#GetReadableHandle|GetReadableHandle]]
 
|}
 
|}
 +
 +
=== GetReadableHandle ===
 +
No input. Returns an output readable Event handle.
    
= arp:w =
 
= arp:w =
Line 24: Line 85:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#AcquireRegistrar|AcquireRegistrar]]
 +
|-
 +
| 1 || [10.0.0+] [[#UnregisterApplicationInstance|UnregisterApplicationInstance]] ([1.0.0-9.2.0] DeleteProperties)
 
|-
 
|-
| 0 || AcquireRegistrar || Returns an [[#IRegistrar]]
+
| 2 || [15.0.0+] [[#AcquireApplicationProcessPropertyUpdater|AcquireApplicationProcessPropertyUpdater]] ([10.0.0-14.1.2] [[#AcquireUpdater|AcquireUpdater]])
 
|-
 
|-
| 1 || DeleteProperties || Takes an input u64 unknown
+
| 3 || [15.0.0+] [[#AcquireApplicationCertificateUpdater|AcquireApplicationCertificateUpdater]]
 
|}
 
|}
 +
 +
== AcquireRegistrar ==
 +
No input. Returns an [[#IRegistrar]].
 +
 +
== UnregisterApplicationInstance ==
 +
Takes an input [[#ApplicationInstanceId]]. No output.
 +
 +
== AcquireUpdater ==
 +
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
 +
 +
== AcquireApplicationProcessPropertyUpdater ==
 +
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
 +
 +
== AcquireApplicationCertificateUpdater ==
 +
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
    
== IRegistrar ==
 
== IRegistrar ==
Line 36: Line 116:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 +
|-
 +
| 0 || [[#Issue|Issue]]
 +
|-
 +
| 1 || [[#SetApplicationLaunchProperty|SetApplicationLaunchProperty]]
 +
|-
 +
| 2 || [[#SetApplicationControlProperty|SetApplicationControlProperty]]
 +
|}
 +
 
 +
=== Issue ===
 +
No input. Returns an output [[#ApplicationInstanceId]].
 +
 
 +
=== SetApplicationLaunchProperty ===
 +
Takes an input [[#ApplicationLaunchProperty]]. No output.
 +
 
 +
=== SetApplicationControlProperty ===
 +
Takes a type-0x15 input buffer containing an [[NACP|ApplicationControlProperty]]. No output.
 +
 
 +
== IUpdater ==
 +
This is "nn::arp::detail::IUpdater".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#Issue_2|Issue]]
 
|-
 
|-
| 0 || Issue || Takes an input u64 unknown
+
| 1 || [[#SetApplicationProcessProperty|SetApplicationProcessProperty]]
 
|-
 
|-
| 1 || SetApplicationLaunchProperty || Takes an input [[#ApplicationLaunchProperty]]
+
| 2 || [[#DeleteApplicationProcessProperty|DeleteApplicationProcessProperty]]
 
|-
 
|-
| 2 || SetApplicationControlProperty || Takes an input type-0x15 buffer filled with the contents of [[NACP_Format|control.nacp]]
+
| 3 || [[#SetApplicationCertificate|SetApplicationCertificate]]
 
|}
 
|}
 +
 +
=== Issue ===
 +
No input/output.
 +
 +
=== SetApplicationProcessProperty ===
 +
Takes an input u64 ProcessId and an input [[#ApplicationProcessProperty]]. No output.
 +
 +
=== DeleteApplicationProcessProperty ===
 +
No input/output.
 +
 +
=== SetApplicationCertificate ===
 +
Takes a type-0x15 input buffer containing an [[#ApplicationCertificate]]. No output.
    
= bgtc:t =
 
= bgtc:t =
 +
This is "nn::bgtc::ITaskService".
 +
 +
[11.0.0+] This is "nn::bgtc::ITaskServiceRoot".
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 100 || [[#CreateTaskService]]
 +
|}
 +
 +
== CreateTaskService ==
 +
No input. Returns an [[#ITaskService]].
 +
 +
== ITaskService ==
 
This is "nn::bgtc::ITaskService".
 
This is "nn::bgtc::ITaskService".
   Line 74: Line 206:  
| 15 || SchedulePeriodicTask
 
| 15 || SchedulePeriodicTask
 
|-
 
|-
| 16 || [9.0.0+]
+
| 16 || [9.0.0+] ScheduleStrictTask
 
|-
 
|-
 
| 101 || [3.0.0+] GetOperationMode
 
| 101 || [3.0.0+] GetOperationMode
Line 81: Line 213:  
|-
 
|-
 
| 103 || [3.0.0+] WillStayHalfAwakeInsteadSleep
 
| 103 || [3.0.0+] WillStayHalfAwakeInsteadSleep
 +
|-
 +
| 200 || [12.0.0+] EnableStayHalfAwake
 
|}
 
|}
   Line 100: Line 234:  
| 5 || [3.0.0+] SetIsUsingSleepUnsupportedDevices
 
| 5 || [3.0.0+] SetIsUsingSleepUnsupportedDevices
 
|}
 
|}
 +
 +
[10.0.0+] NotifyEnteringHalfAwake now takes 1-byte of input.
    
= time:a, time:r, time:u =
 
= time:a, time:r, time:u =
Line 396: Line 532:     
== RegisterAlarmSetting ==
 
== RegisterAlarmSetting ==
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type type-0x5 input buffer. Returns an u16 '''AlarmSettingId'''.
+
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type-0x5 input buffer. Returns an [[#AlarmSettingId]].
 +
 
 +
The second buffer can be empty (addr=0/size=0). Size must be <=0x400. This is the ApplicationParameter.
 +
 
 +
A maximum of 8 Alarms can be registered by an Application at the same time.
 +
 
 +
Before using the cmd, sdknso uses [[HID_services|hid]] IsFirmwareUpdateNeededForNotification then if needed launches the controller-applet for firmware-update.
 +
 
 +
After using the cmd when it failed, [[Error_Applet|ShowError]] will be used when the Result is in a certain range, otherwise this will assert.
    
== UpdateAlarmSetting ==
 
== UpdateAlarmSetting ==
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type type-0x5 input buffer. No output.
+
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type-0x5 input buffer. No output.
 +
 
 +
The second buffer can be empty (addr=0/size=0). Size must be <=0x400. This is the ApplicationParameter.
    
== ListAlarmSettings ==
 
== ListAlarmSettings ==
Takes a type-0x6 output buffer to receive an array of [[#AlarmSetting]]. Returns an u32 '''AlarmSettingsCount'''.
+
Takes a type-0x6 output buffer to receive an array of [[#AlarmSetting]]. Returns a s32 '''AlarmSettingsCount'''.
    
== LoadApplicationParameter ==
 
== LoadApplicationParameter ==
Takes an input u16 '''AlarmSettingId''' and a type-0x6 output buffer. Returns an u32.
+
Takes an input [[#AlarmSettingId]] and a type-0x6 output buffer containing the ApplicationParameter. Returns an u32 actual_size.
    
== DeleteAlarmSetting ==
 
== DeleteAlarmSetting ==
Takes an input u16 '''AlarmSettingId'''.
+
Takes an input [[#AlarmSettingId]].
    
== Initialize ==
 
== Initialize ==
Takes a PID-descriptor and an input u64.
+
Takes a PID-descriptor and an input u64 pid_reserved.
    
= notif:s =
 
= notif:s =
This is "nn::notification::server::INotificationServicesForSystem".
+
This is "nn::notification::server::INotificationServices".
    
This was added with [9.0.0+].
 
This was added with [9.0.0+].
Line 432: Line 578:  
| 540 || [[#DeleteAlarmSetting]]
 
| 540 || [[#DeleteAlarmSetting]]
 
|-
 
|-
| 1000 ||  
+
| 1000 || [[#GetNotificationCount]]
 
|-
 
|-
| 1010 || GetNotification
+
| 1010 || ListNotifications
 
|-
 
|-
 
| 1020 || DeleteNotification
 
| 1020 || DeleteNotification
 
|-
 
|-
| 1030 ||  
+
| 1030 || ClearNotifications
 +
|-
 +
| 1040 || [[#GetNotificationSendingNotifier]]
 +
|-
 +
| 1500 || SetNotificationPresentationSetting
 +
|-
 +
| 1510 || GetNotificationPresentationSetting
 +
|-
 +
| 2000 || [[#GetAlarmSetting]]
 +
|-
 +
| 2001 || GetAlarmSettingWithApplicationParameter
 +
|-
 +
| 2010 || [[#SetAlarmSettingIsMuted]]
 +
|-
 +
| 2020 || [[#IsAlarmSettingDeletable]]
 +
|-
 +
| 8000 || RegisterAppletResourceUserId
 +
|-
 +
| 8010 || UnregisterAppletResourceUserId
 +
|-
 +
| 8999 || [10.0.0+] GetCurrentTime
 +
|-
 +
| 9000 || [[#GetAlarmSettingNextNotificationTime]]
 +
|}
 +
 
 +
== GetNotificationCount ==
 +
No input. Returns a total of 4-bytes of output.
 +
 
 +
== GetNotificationSendingNotifier ==
 +
No input. Returns an output [[#INotificationSystemEventAccessor]].
 +
 
 +
== INotificationSystemEventAccessor ==
 +
This is "nn::notification::server::INotificationSystemEventAccessor".
 +
 
 +
This was added with [9.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || GetSystemEvent
 +
|}
 +
 
 +
== GetAlarmSetting ==
 +
Takes an input [[#AlarmSettingId]]. Returns an [[#AlarmSetting]].
 +
 
 +
== SetAlarmSettingIsMuted ==
 +
Takes an input [[#AlarmSettingId]] and a bool. No output.
 +
 
 +
== IsAlarmSettingDeletable ==
 +
Takes an input [[#AlarmSettingId]]. Returns a bool.
 +
 
 +
== GetAlarmSettingNextNotificationTime ==
 +
Takes an input [[#AlarmSettingId]]. Returns an u8 '''IsAlarmScheduled''' and a [[Glue_services#PosixTime|PosixTime]] for the next scheduled alarm.
 +
 
 +
= ectx:w =
 +
This is "nn::err::context::IWriterForSystem".
 +
 
 +
This was added with [11.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#CreateContextRegistrar]]
 +
|-
 +
| 1 || CommitContext
 
|-
 
|-
| 1040 ||  
+
| 2 || RemoveContext
 +
|}
 +
 
 +
== CreateContextRegistrar ==
 +
No input. Returns an [[#IContextRegistrar]].
 +
 
 +
== IContextRegistrar ==
 +
This is "nn::err::context::IContextRegistrar".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 1500 || SetPresentationSetting
+
! Cmd || Name
 
|-
 
|-
| 1510 || GetPresentationSetting
+
| 0 || Complete
 +
|}
 +
 
 +
= ectx:r =
 +
This is "nn::err::context::IReaderForSystem".
 +
 
 +
This was added with [11.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 2000 ||  
+
! Cmd || Name
 
|-
 
|-
| 2001 ||
+
| 0 || GetContextInfo
 
|-
 
|-
| 2010 || MuteAlarm
+
| 1 || PullContext
 
|-
 
|-
| 2020 || IsAlarmMuted
+
| 2 || ListContextDescriptorWithResultForDebug
 +
|}
 +
 
 +
= ectx:aw =
 +
This is "nn::err::context::IWriterForApplication".
 +
 
 +
This was added with [11.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 8000 ||
+
! Cmd || Name
 
|-
 
|-
| 8010 ||
+
| 0 || [[#CreateContextRegistrar]]
 
|-
 
|-
| 9000 ||
+
| 1 || CommitContext
 
|}
 
|}
   −
== Cmd1040 ==
+
= pl:u =
No input, returns an output [[#IUnknown0]].
+
This is "nn::pl::sharedresource::detail::IPlatformSharedResourceManager".
 +
 
 +
This was added with [16.0.0+].
 +
 
 +
This has max_sessions 5.
   −
== IUnknown0 ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 ||  
+
| 0 || [[#RequestLoad]]
 +
|-
 +
| 1 || [[#GetLoadState]]
 +
|-
 +
| 2 || [[#GetSize]]
 +
|-
 +
| 3 || [[#GetSharedMemoryAddressOffset]]
 +
|-
 +
| 4 || [[#GetSharedMemoryNativeHandle]]
 +
|-
 +
| 5 || [[#GetSharedFontInOrderOfPriority]]
 +
|-
 +
| 6 || GetSharedFontInOrderOfPriorityForSystem
 +
|}
 +
 
 +
== RequestLoad ==
 +
Takes a [[#SharedFontType]] (uint32), no output.
 +
 
 +
== GetLoadState ==
 +
Takes a [[#SharedFontType]] (uint32), returns the [[#LoadState]] (uint32).
 +
 
 +
=== LoadState ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Description
 +
|-
 +
| 0x00 || Loading
 +
|-
 +
| 0x01 || Loaded
 
|}
 
|}
   −
This was added with [9.0.0+].
+
== GetSize ==
 +
Takes a [[#SharedFontType]] (uint32), returns the Font Size (uint32).
 +
 
 +
== GetSharedMemoryAddressOffset ==
 +
Takes a [[#SharedFontType]] (uint32), returns the offset (uint32) to the Font Address.
 +
 
 +
== GetSharedMemoryNativeHandle ==
 +
No input, returns an output SharedMemory handle.
 +
 
 +
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.
 +
 
 +
Font data is TTF, located at the offset returned by [[#GetSharedMemoryAddressOffset]].
 +
 
 +
== GetSharedFontInOrderOfPriority ==
 +
Takes an input u64 [[Settings_services#LanguageCode|LanguageCode]] and 3 type-0x6 output buffers, returns an output u8 and u32. The u8 is a bool to specify if the fonts are loaded or not and the u32 is the font count.
 +
The first buffer contains a list of [[#SharedFontType|Shared font types]], the second buffer contains the font offsets and the final buffer contains the font sizes.
 +
The buffers are an array of u32s which specify information about a specific font. Buffer1[n] is related to Buffer2[n] and Buffer3[n].
 +
Example: Font index 0s offset is at Buffer2[0], size is at Buffer3[0].
 +
The fonts are relative to the shared memory created by [[#GetSharedFontSharedMemoryHandle]]
 +
 
 +
== SharedFontType ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Description
 +
|-
 +
| 0x00 || Japan, US and Europe (Standard)
 +
|-
 +
| 0x01 || Chinese Simplified
 +
|-
 +
| 0x02 || Extended Chinese Simplified
 +
|-
 +
| 0x03 || Chinese Traditional
 +
|-
 +
| 0x04 || Korean (Hangul)
 +
|-
 +
| 0x05 || Nintendo Extended
 +
|}
 +
 
 +
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons,  etc.
 +
 
 +
= ApplicationInstanceId =
 +
This is "nn::arp::ApplicationInstanceId".
 +
 
 +
This is an u64 ID bound to an application instance.
 +
 
 +
= ApplicationKind =
 +
This is "nn::arp::ApplicationKind".
   −
Cmd0: no input, returns an output handle.
+
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 || Application
 +
|-
 +
| 1 || MicroApplication
 +
|}
    
= ApplicationLaunchProperty =
 
= ApplicationLaunchProperty =
Total size is 0x10 bytes.
+
This is "nn::arp::ApplicationLaunchProperty".
 +
 
 +
This is a 0x10-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 487: Line 811:  
| 0x00
 
| 0x00
 
| 0x08
 
| 0x08
| Title ID
+
| [[NCM_services#ProgramId|Id]]
 
|-
 
|-
 
| 0x08
 
| 0x08
Line 495: Line 819:  
| 0x0C
 
| 0x0C
 
| 0x01
 
| 0x01
| Base Game [[Filesystem_services#StorageId|Storage Id]]
+
| [[Filesystem_services#StorageId|Storage]]
 
|-
 
|-
 
| 0x0D
 
| 0x0D
 
| 0x01
 
| 0x01
| Update [[Filesystem_services#StorageId|Storage Id]]
+
| [[Filesystem_services#StorageId|PatchStorage]]
 
|-
 
|-
 
| 0x0E
 
| 0x0E
| 0x02
+
| 0x01
| Padding
+
| [[#ApplicationKind|Kind]]
 +
|-
 +
| 0x0F
 +
| 0x01
 +
| Reserved
 +
|}
 +
 
 +
= ApplicationProcessProperty =
 +
This is "nn::arp::ApplicationProcessProperty".
 +
 
 +
This is a 0x1-byte struct.
 +
 
 +
[17.0.0+] This is a 0x10-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x00
 +
| 0x01
 +
| ProgramIndex
 +
|-
 +
| 0x01
 +
| 0x0F
 +
|  
 
|}
 
|}
 +
 +
= ApplicationCertificate =
 +
This is "nn::arp::ApplicationCertificate".
 +
 +
This is a 0x528-byte struct.
 +
 +
= AlarmSettingId =
 +
This is "nn::notification::AlarmSettingId". This is an u16.
    
= AlarmSetting =
 
= AlarmSetting =
Total size is 0x40 bytes.
+
This is "nn::notification::AlarmSetting". Total size is 0x40 bytes. When initializing this to the defaults, the entire struct is cleared then the last 0xE-bytes are set to 0xFF.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 517: Line 875:  
| 0x00
 
| 0x00
 
| 0x02
 
| 0x02
| Alarm ID
+
| [[#AlarmSettingId]]
 
|-
 
|-
 
| 0x02
 
| 0x02
Line 525: Line 883:  
| 0x03
 
| 0x03
 
| 0x01
 
| 0x01
| Muted
+
| u8 bool Muted (non-zero/true = AlarmSetting turned off, zero/false = on).
 +
|-
 +
| 0x04
 +
| 0x04
 +
| Padding
 
|-
 
|-
 
| 0x08
 
| 0x08
 +
| 0x10
 +
| UID. User account associated with this AlarmSetting. Used for the PreselectedUser when launching the Application when the system was previously in sleep-mode, instead of launching the applet for selecting the user.
 +
|-
 +
| 0x18
 
| 0x08
 
| 0x08
| UID high
+
| ApplicationId
 
|-
 
|-
| 0x10
+
| 0x20
 
| 0x08
 
| 0x08
| UID low
+
| Not set by sdksno, besides clearing it during initialization.
 
|-
 
|-
 +
| 0x28
 
| 0x18
 
| 0x18
| 0x08
+
| Alarm schedule (WeeklyScheduleAlarmSetting)
| Application ID
+
|}
 +
 
 +
Schedule:
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x28
+
! Offset
| 0x08
+
! Size
| Alarm schedule
+
! Description
 
|-
 
|-
| 0x30
+
| 0x00 || 0x0A || Not set by sdksno, besides clearing it during initialization.
| 0x08
  −
| Alarm schedule
   
|-
 
|-
| 0x38
+
| 0x0A || 0xE(7*2) || Array of 7 entries where each entry is 2-bytes. Index is <code>nn::time::DayOfWeek</code>, Sun-Sat.
| 0x08
  −
| Alarm schedule
   
|}
 
|}
 +
 +
Array entries:
 +
 +
Each byte is set using an input s32. An entry with value 0xFFFF (the default) indicates that it's disabled. The high byte is the hour, the low byte is the minute. This uses local-time.
 +
 +
sdknso checks whether an entry is enabled with: <code>return ({last 5-bits of the entry} < 3) && ((entry & 0xfc) < 60);</code>. The first check is equivalent to comparing the second entry byte with value 24.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu