Difference between revisions of "NACP"

From Nintendo Switch Brew
Jump to navigation Jump to search
(Removed info which is also in the table.)
 
(35 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
This is '''control.nacp''', "nn::ns::ApplicationControlProperty".
 +
 
Roughly equivalent to non-gfx areas of 3DS SMDH. All strings for language-entries are UTF-8, unlike SMDH which uses UTF-16.
 
Roughly equivalent to non-gfx areas of 3DS SMDH. All strings for language-entries are UTF-8, unlike SMDH which uses UTF-16.
  
 
Total size is 0x4000-bytes.
 
Total size is 0x4000-bytes.
  
=Structure=
+
= Structure =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 11: Line 13:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 0x2400
+
| 0x3000 (0x300*0x10)
| Language entries
+
| [[#ApplicationTitle|Title]]
 
|-
 
|-
| 0x2400
+
| 0x3000
| 0xC00
+
| 0x25
| Normally all-zero? Maybe more language entries?
+
| Isbn
 
|-
 
|-
| 0x3000
+
| 0x3025
| 0x24
+
| 0x1
| Zeros?
+
| StartupUserAccount
 +
|-
 +
| 0x3026
 +
| 0x1
 +
| UserAccountSwitchLock
 
|-
 
|-
| 0x3024
+
| 0x3027
| 0x4
+
| 0x1
| ?
+
| AddOnContentRegistrationType
 
|-
 
|-
 
| 0x3028
 
| 0x3028
 
| 0x4
 
| 0x4
| ?
+
| AttributeFlag
 
|-
 
|-
 
| 0x302C
 
| 0x302C
 
| 0x4
 
| 0x4
| ?
+
| SupportedLanguageFlag
 
|-
 
|-
 
| 0x3030
 
| 0x3030
 
| 0x4
 
| 0x4
| ?
+
| ParentalControlFlag
 
|-
 
|-
 
| 0x3034
 
| 0x3034
| 0x4
+
| 0x1
| ?
+
| Screenshot
 +
|-
 +
| 0x3035
 +
| 0x1
 +
| [[#VideoCapture]]
 +
|-
 +
| 0x3036
 +
| 0x1
 +
| DataLossConfirmation
 +
|-
 +
| 0x3037
 +
| 0x1
 +
| [[#PlayLogPolicy]]
 
|-
 
|-
 
| 0x3038
 
| 0x3038
 
| 0x8
 
| 0x8
| Application titleID
+
| PresenceGroupId
 
|-
 
|-
 
| 0x3040
 
| 0x3040
 
| 0x20
 
| 0x20
| ?
+
| RatingAge
 
|-
 
|-
 
| 0x3060
 
| 0x3060
 
| 0x10
 
| 0x10
| Application version string, encoding unknown.
+
| DisplayVersion
 
|-
 
|-
 
| 0x3070
 
| 0x3070
 
| 0x8
 
| 0x8
| Base titleID for DLC, set even when DLC is not used. Usually app_titleID+0x1000?
+
| AddOnContentBaseId
 
|-
 
|-
 
| 0x3078
 
| 0x3078
 
| 0x8
 
| 0x8
| Application titleID
+
| SaveDataOwnerId
 
|-
 
|-
 
| 0x3080
 
| 0x3080
| 0x4
+
| 0x8
| ?
+
| UserAccountSaveDataSize
 
|-
 
|-
| 0x3084
+
| 0x3088
| 0x4
+
| 0x8
| ?
+
| UserAccountSaveDataJournalSize
 
|-
 
|-
| 0x3088
+
| 0x3090
| 0x4
+
| 0x8
| ?
+
| DeviceSaveDataSize
 
|-
 
|-
| 0x308C
+
| 0x3098
| 0x24
+
| 0x8
| Zeros?
+
| DeviceSaveDataJournalSize
 
|-
 
|-
| 0x30B0
+
| 0x30A0
 +
| 0x8
 +
| BcatDeliveryCacheStorageSize
 +
|-
 +
| 0x30A8
 
| 0x8
 
| 0x8
| Application titleID
+
| ApplicationErrorCodeCategory
 
|-
 
|-
| 0x30B8
+
| 0x30B0
| 0x38 (0x8*0x7)
+
| 0x40 (0x8*0x8)
| Array of application titleIDs, normally the same as the above app-titleIDs. Only set for game-updates?
+
| LocalCommunicationId
 
|-
 
|-
 
| 0x30F0
 
| 0x30F0
| 0x4
+
| 0x1
| ?
+
| LogoType
 +
|-
 +
| 0x30F1
 +
| 0x1
 +
| LogoHandling
 +
|-
 +
| 0x30F2
 +
| 0x1
 +
| RuntimeAddOnContentInstall
 +
|-
 +
| 0x30F3
 +
| 0x1
 +
| RuntimeParameterDelivery
 
|-
 
|-
 
| 0x30F4
 
| 0x30F4
| 0x4
+
| 0x1
| ?
+
| AppropriateAgeForChina
 +
|-
 +
| 0x30F5
 +
| 0x1
 +
| Reserved
 +
|-
 +
| 0x30F6
 +
| 0x1
 +
| CrashReport
 +
|-
 +
| 0x30F7
 +
| 0x1
 +
| Hdcp
 
|-
 
|-
 
| 0x30F8
 
| 0x30F8
 
| 0x8
 
| 0x8
| Application titleID. Only set for game-updates?
+
| SeedForPseudoDeviceId
 
|-
 
|-
 
| 0x3100
 
| 0x3100
| 0x40
+
| 0x41
| [[BCAT_Content_Container|BCAT]] passphrase, all-zero when unused.
+
| [[BCAT_Content_Container|BcatPassphrase]] (all-zero when unused)
 
|-
 
|-
| 0x3140
+
| 0x3141
| 0xEC0
+
| 0x1
| Normally all-zero?
+
| StartupUserAccountOption
 +
|-
 +
| 0x3142
 +
| 0x6
 +
| ReservedForUserAccountSaveDataOperation
 +
|-
 +
| 0x3148
 +
| 0x8
 +
| UserAccountSaveDataSizeMax
 +
|-
 +
| 0x3150
 +
| 0x8
 +
| UserAccountSaveDataJournalSizeMax
 +
|-
 +
| 0x3158
 +
| 0x8
 +
| DeviceSaveDataSizeMax
 +
|-
 +
| 0x3160
 +
| 0x8
 +
| DeviceSaveDataJournalSizeMax
 +
|-
 +
| 0x3168
 +
| 0x8
 +
| TemporaryStorageSize
 +
|-
 +
| 0x3170
 +
| 0x8
 +
| CacheStorageSize
 +
|-
 +
| 0x3178
 +
| 0x8
 +
| CacheStorageJournalSize
 +
|-
 +
| 0x3180
 +
| 0x8
 +
| CacheStorageDataAndJournalSizeMax
 +
|-
 +
| 0x3188
 +
| 0x2
 +
| CacheStorageIndexMax
 +
|-
 +
| 0x318A
 +
| 0x1
 +
| Reserved
 +
|-
 +
| 0x318B
 +
| 0x1
 +
| RuntimeUpgrade
 +
|-
 +
| 0x318C
 +
| 0x4
 +
| SupportingLimitedLicenses
 +
|-
 +
| 0x3190
 +
| 0x80 (0x8*0x10)
 +
| PlayLogQueryableApplicationId
 +
|-
 +
| 0x3210
 +
| 0x1
 +
| PlayLogQueryCapability
 +
|-
 +
| 0x3211
 +
| 0x1
 +
| RepairFlag
 +
|-
 +
| 0x3212
 +
| 0x1
 +
| ProgramIndex
 +
|-
 +
| 0x3213
 +
| 0x1
 +
| RequiredNetworkServiceLicenseOnLaunchFlag
 +
|-
 +
| 0x3214
 +
| 0x4
 +
| Reserved
 +
|-
 +
| 0x3218
 +
| 0x198
 +
| [[#ApplicationNeighborDetectionClientConfiguration|NeighborDetectionClientConfiguration]]
 +
|-
 +
| 0x33B0
 +
| 0x10
 +
| [[#ApplicationJitConfiguration|JitConfiguration]]
 +
|-
 +
| 0x33C0
 +
| 0x40 (0x2*0x20)
 +
| RequiredAddOnContentsSetBinaryDescriptor
 +
|-
 +
| 0x3400
 +
| 0x1
 +
| PlayReportPermission
 +
|-
 +
| 0x3401
 +
| 0x1
 +
| CrashScreenshotForProd
 +
|-
 +
| 0x3402
 +
| 0x1
 +
| CrashScreenshotForDev
 +
|-
 +
| 0x3403
 +
| 0x1
 +
| ContentsAvailabilityTransitionPolicy
 +
|-
 +
| 0x3404
 +
| 0x4
 +
| Reserved
 +
|-
 +
| 0x3408
 +
| 0x40 (0x8*0x8)
 +
| AccessibleLaunchRequiredVersion
 +
|-
 +
| 0x3448
 +
| 0xBB8
 +
| Reserved
 
|}
 
|}
  
==Language Entry==
+
== ApplicationTitle ==
 
Total size is 0x300-bytes.
 
Total size is 0x300-bytes.
  
Line 118: Line 280:
 
| 0x0
 
| 0x0
 
| 0x200
 
| 0x200
| Application name string
+
| Application name strings
 
|-
 
|-
 
| 0x200
 
| 0x200
 
| 0x100
 
| 0x100
| Application developer string
+
| Application publisher strings
 +
|}
 +
 
 +
Entry index for each [[Settings_services#LanguageCode|language]]:
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Entry-index || Icon [[NCA_Content_FS#FS-type3|language]] filename
 +
|-
 +
| 0 || "AmericanEnglish"
 +
|-
 +
| 1 || "BritishEnglish"
 +
|-
 +
| 2 || "Japanese"
 +
|-
 +
| 3 || "French"
 +
|-
 +
| 4 || "German"
 +
|-
 +
| 5 || "LatinAmericanSpanish"
 +
|-
 +
| 6 || "Spanish"
 +
|-
 +
| 7 || "Italian"
 +
|-
 +
| 8 || "Dutch"
 +
|-
 +
| 9 || "CanadianFrench"
 +
|-
 +
| 10 || "Portuguese"
 +
|-
 +
| 11 || "Russian"
 +
|-
 +
| 12 || "Korean"
 +
|-
 +
| 13 || "TraditionalChinese"
 +
|-
 +
| 14 || "SimplifiedChinese"
 +
|}
 +
 
 +
Official apps tend to have the title entries' strings set only to English. Some apps don't have certain title entries set at all. In addition, official apps usually (?) don't have the following title entries set: Korean, Taiwanese, and Chinese.
 +
 
 +
== VideoCapture ==
 +
This is the enum used to determine how gameplay recording can occur, if at all.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Meaning
 +
|-
 +
| 0 || Disabled
 +
|-
 +
| 1 || Enabled
 +
|-
 +
| 2 || Automatic
 +
|}
 +
 
 +
When this value is 0, gameplay cannot be recorded. When this value is 1, the game must manually sacrifice some of its heap as transfer memory for AM's IApplicationProxy->InitializeGamePlayRecording(). When this value is 2, AM will call NS->BoostSystemMemoryResourceSize(), and allocate the required memory for recording automatically without the usermode process having to do anything.
 +
 
 +
== PlayLogPolicy ==
 +
[[Applet_Manager_services|AM]] passes [[Shared_Database_services#PlayLogPolicy|this]] to [[Shared_Database_services|pdm:ntfy]] cmd9.
 +
 
 +
== PlayLogQueryCapability ==
 +
This is used with [[Applet_Manager_services|AM]] commands QueryApplicationPlayStatistics and QueryApplicationPlayStatisticsByUid, to verify whether querying the specified titleIDs are allowed. When not allowed, error 0x3E880 is returned.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Meaning || Description
 +
|-
 +
| 0 || None || The specified titleIDs must match the user-process titleID.
 +
|-
 +
| 1 || WhiteList || The specified titleIDs must match the user-process titleID, or one of the titleIDs from PlayLogQueryableApplicationId.
 +
|-
 +
| 2 || All || All titleIDs are allowed.
 +
|}
 +
 
 +
== ApplicationNeighborDetectionClientConfiguration ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x18
 +
| [[#ApplicationNeighborDetectionGroupConfiguration|SendGroupConfiguration]]
 +
|-
 +
| 0x18
 +
| 0x180 (0x18 * 0x10)
 +
| [[#ApplicationNeighborDetectionGroupConfiguration|ReceivableGroupConfigurations]]
 +
|}
 +
 
 +
=== ApplicationNeighborDetectionGroupConfiguration ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| GroupId
 +
|-
 +
| 0x8
 +
| 0x10
 +
| Key
 +
|}
 +
 
 +
== ApplicationJitConfiguration ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| Flags
 +
|-
 +
| 0x8
 +
| 0x8
 +
| MemorySize
 
|}
 
|}

Latest revision as of 19:40, 11 October 2022

This is control.nacp, "nn::ns::ApplicationControlProperty".

Roughly equivalent to non-gfx areas of 3DS SMDH. All strings for language-entries are UTF-8, unlike SMDH which uses UTF-16.

Total size is 0x4000-bytes.

Structure

Offset Size Description
0x0 0x3000 (0x300*0x10) Title
0x3000 0x25 Isbn
0x3025 0x1 StartupUserAccount
0x3026 0x1 UserAccountSwitchLock
0x3027 0x1 AddOnContentRegistrationType
0x3028 0x4 AttributeFlag
0x302C 0x4 SupportedLanguageFlag
0x3030 0x4 ParentalControlFlag
0x3034 0x1 Screenshot
0x3035 0x1 #VideoCapture
0x3036 0x1 DataLossConfirmation
0x3037 0x1 #PlayLogPolicy
0x3038 0x8 PresenceGroupId
0x3040 0x20 RatingAge
0x3060 0x10 DisplayVersion
0x3070 0x8 AddOnContentBaseId
0x3078 0x8 SaveDataOwnerId
0x3080 0x8 UserAccountSaveDataSize
0x3088 0x8 UserAccountSaveDataJournalSize
0x3090 0x8 DeviceSaveDataSize
0x3098 0x8 DeviceSaveDataJournalSize
0x30A0 0x8 BcatDeliveryCacheStorageSize
0x30A8 0x8 ApplicationErrorCodeCategory
0x30B0 0x40 (0x8*0x8) LocalCommunicationId
0x30F0 0x1 LogoType
0x30F1 0x1 LogoHandling
0x30F2 0x1 RuntimeAddOnContentInstall
0x30F3 0x1 RuntimeParameterDelivery
0x30F4 0x1 AppropriateAgeForChina
0x30F5 0x1 Reserved
0x30F6 0x1 CrashReport
0x30F7 0x1 Hdcp
0x30F8 0x8 SeedForPseudoDeviceId
0x3100 0x41 BcatPassphrase (all-zero when unused)
0x3141 0x1 StartupUserAccountOption
0x3142 0x6 ReservedForUserAccountSaveDataOperation
0x3148 0x8 UserAccountSaveDataSizeMax
0x3150 0x8 UserAccountSaveDataJournalSizeMax
0x3158 0x8 DeviceSaveDataSizeMax
0x3160 0x8 DeviceSaveDataJournalSizeMax
0x3168 0x8 TemporaryStorageSize
0x3170 0x8 CacheStorageSize
0x3178 0x8 CacheStorageJournalSize
0x3180 0x8 CacheStorageDataAndJournalSizeMax
0x3188 0x2 CacheStorageIndexMax
0x318A 0x1 Reserved
0x318B 0x1 RuntimeUpgrade
0x318C 0x4 SupportingLimitedLicenses
0x3190 0x80 (0x8*0x10) PlayLogQueryableApplicationId
0x3210 0x1 PlayLogQueryCapability
0x3211 0x1 RepairFlag
0x3212 0x1 ProgramIndex
0x3213 0x1 RequiredNetworkServiceLicenseOnLaunchFlag
0x3214 0x4 Reserved
0x3218 0x198 NeighborDetectionClientConfiguration
0x33B0 0x10 JitConfiguration
0x33C0 0x40 (0x2*0x20) RequiredAddOnContentsSetBinaryDescriptor
0x3400 0x1 PlayReportPermission
0x3401 0x1 CrashScreenshotForProd
0x3402 0x1 CrashScreenshotForDev
0x3403 0x1 ContentsAvailabilityTransitionPolicy
0x3404 0x4 Reserved
0x3408 0x40 (0x8*0x8) AccessibleLaunchRequiredVersion
0x3448 0xBB8 Reserved

ApplicationTitle

Total size is 0x300-bytes.

Offset Size Description
0x0 0x200 Application name strings
0x200 0x100 Application publisher strings

Entry index for each language:

Entry-index Icon language filename
0 "AmericanEnglish"
1 "BritishEnglish"
2 "Japanese"
3 "French"
4 "German"
5 "LatinAmericanSpanish"
6 "Spanish"
7 "Italian"
8 "Dutch"
9 "CanadianFrench"
10 "Portuguese"
11 "Russian"
12 "Korean"
13 "TraditionalChinese"
14 "SimplifiedChinese"

Official apps tend to have the title entries' strings set only to English. Some apps don't have certain title entries set at all. In addition, official apps usually (?) don't have the following title entries set: Korean, Taiwanese, and Chinese.

VideoCapture

This is the enum used to determine how gameplay recording can occur, if at all.

Value Meaning
0 Disabled
1 Enabled
2 Automatic

When this value is 0, gameplay cannot be recorded. When this value is 1, the game must manually sacrifice some of its heap as transfer memory for AM's IApplicationProxy->InitializeGamePlayRecording(). When this value is 2, AM will call NS->BoostSystemMemoryResourceSize(), and allocate the required memory for recording automatically without the usermode process having to do anything.

PlayLogPolicy

AM passes this to pdm:ntfy cmd9.

PlayLogQueryCapability

This is used with AM commands QueryApplicationPlayStatistics and QueryApplicationPlayStatisticsByUid, to verify whether querying the specified titleIDs are allowed. When not allowed, error 0x3E880 is returned.

Value Meaning Description
0 None The specified titleIDs must match the user-process titleID.
1 WhiteList The specified titleIDs must match the user-process titleID, or one of the titleIDs from PlayLogQueryableApplicationId.
2 All All titleIDs are allowed.

ApplicationNeighborDetectionClientConfiguration

Offset Size Description
0x0 0x18 SendGroupConfiguration
0x18 0x180 (0x18 * 0x10) ReceivableGroupConfigurations

ApplicationNeighborDetectionGroupConfiguration

Offset Size Description
0x0 0x8 GroupId
0x8 0x10 Key

ApplicationJitConfiguration

Offset Size Description
0x0 0x8 Flags
0x8 0x8 MemorySize