Changes

Jump to navigation Jump to search
6,356 bytes added ,  17:25, 30 November 2019
no edit summary
Line 9: Line 9:  
! Cmd || Name || Arguments || Notes
 
! Cmd || Name || Arguments || Notes
 
|-
 
|-
| 0 || OpenLocationResolver || [[Filesystem_services#StorageId|StorageID]] ||
+
| 0 || OpenLocationResolver || [[#StorageId]] ||
 
|-
 
|-
 
| 1 || OpenRegisteredLocationResolver || None ||  
 
| 1 || OpenRegisteredLocationResolver || None ||  
 
|-
 
|-
| 2 || RefreshLocationResolver || [[Filesystem_services#StorageId|StorageID]] ||
+
| 2 || RefreshLocationResolver || [[#StorageId]] ||
 
|-
 
|-
 
| 3 || [2.0.0+] OpenAddOnContentLocationResolver || None  ||
 
| 3 || [2.0.0+] OpenAddOnContentLocationResolver || None  ||
Line 25: Line 25:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Cmd || Name || Notes
 +
|-
 +
| 0 || [[#ResolveProgramPath]] ||
 +
|-
 +
| 1 || [[#RedirectProgramPath]] ||
 
|-
 
|-
| 0 || [[#ResolveProgramPath]]
+
| 2 || [[#ResolveApplicationControlPath]] ||
 
|-
 
|-
| 1 || [[#RedirectProgramPath]]
+
| 3 || [[#ResolveApplicationHtmlDocumentPath]] ||
 
|-
 
|-
| 2 || [[#ResolveApplicationControlPath]]
+
| 4 || [[#ResolveDataPath]] ||
 
|-
 
|-
| 3 || [[#ResolveApplicationHtmlDocumentPath]]
+
| 5 || [[#RedirectApplicationControlPath]] ||
 
|-
 
|-
| 4 || [[#ResolveDataPath]]
+
| 6 || [[#RedirectApplicationHtmlDocumentPath]] ||
 
|-
 
|-
| 5 || [[#RedirectApplicationControlPath]]
+
| 7 || [[#ResolveApplicationLegalInformationPath]] ||
 
|-
 
|-
| 6 || [[#RedirectApplicationHtmlDocumentPath]]
+
| 8 || [[#RedirectApplicationLegalInformationPath]] ||
 
|-
 
|-
| 7 || [[#ResolveApplicationLegalInformationPath]]
+
| 9 || [[#Refresh]] ||
 
|-
 
|-
| 8 || [[#RedirectApplicationLegalInformationPath]]
+
| 10 || [5.0.0+] [[#RedirectApplicationProgramPath]] ||
 
|-
 
|-
| 9 || [[#Refresh]]
+
| 11 || [5.0.0+] [[#ClearApplicationRedirection]] ||
 
|-
 
|-
| 10 || [5.0.0+] [[#SetProgramNcaPath2]]
+
| 12 || [5.0.0+] [[#EraseProgramRedirection]] ||
 
|-
 
|-
| 11 || [5.0.0+] [[#ClearLocationResolver2]]
+
| 13 || [5.0.0+] [[#EraseApplicationControlRedirection]] ||
 
|-
 
|-
| 12 || [5.0.0+] [[#DeleteProgramNcaPath]]
+
| 14 || [5.0.0+] [[#EraseApplicationHtmlDocumentRedirection]] ||
 
|-
 
|-
| 13 || [5.0.0+] [[#DeleteControlNcaPath]]
+
| 15 || [5.0.0+] [[#EraseApplicationLegalInformationRedirection]] ||
 
|-
 
|-
| 14 || [5.0.0+] [[#DeleteDocHtmlNcaPath]]
+
| 16 || [7.0.0+] [[#ResolveProgramPathForDebug]] || Unofficial name
 
|-
 
|-
| 15 || [5.0.0+] [[#DeleteInfoHtmlNcaPath]]
+
| 17 || [7.0.0+] [[#RedirectProgramPathForDebug]] || Unofficial name
 +
|-
 +
| 18 || [7.0.0+] [[#RedirectApplicationProgramPathForDebug]] || Unofficial name
 +
|-
 +
| 19 || [7.0.0+] [[#EraseProgramRedirectionForDebug]] || Unofficial name
 
|}
 
|}
   −
If the supplied [[Filesystem_services#StorageId|StorageID]] is 1 (Host), a different set of internal functions is used to handle these commands. In this more restricted set of functions, GetControlNcaPath is stubbed and only returns error 0x608.
+
If the supplied [[#StorageId]] is 1 (Host), a different set of internal functions is used to handle these commands. In this more restricted set of functions, [[#ResolveApplicationControlPath]] is stubbed and only returns error 0x608.
   −
The Get* commands load the [[Filesystem_services|ContentPath]] from linked-lists' [[#Location_List_Entry|entries]] in memory using the input TitleID. When the command fails to find an entry for the specified TitleID, 0x408 is returned for GetProgramNcaPath and 0xA08 is returned for the rest.
+
The Get* commands load the [[Filesystem_services#ContentPath|ContentPath]] from linked-lists' [[#Location_List_Entry|entries]] in memory using the input [[#ProgramId]]. When the command fails to find an entry for the specified [[#ProgramId]], 0x408 is returned for [[#ResolveProgramPath]] and 0xA08 is returned for the rest.
    
The Set* commands always return 0 and add a new entry to the list. If a matching entry is found, it's removed first.
 
The Set* commands always return 0 and add a new entry to the list. If a matching entry is found, it's removed first.
    
==== ResolveProgramPath ====
 
==== ResolveProgramPath ====
Takes an u64 '''TitleID''' and a C descriptor. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
+
Takes an [[#ProgramId]] and a C descriptor. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
    
==== RedirectProgramPath ====
 
==== RedirectProgramPath ====
Takes an u64 '''TitleID''' and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
+
Takes an [[#ProgramId]] and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
    
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 0.
 
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 0.
    
==== ResolveApplicationControlPath ====
 
==== ResolveApplicationControlPath ====
Takes an u64 '''TitleID''' and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
+
Takes an [[#ApplicationId]] and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
    
==== ResolveApplicationHtmlDocumentPath====
 
==== ResolveApplicationHtmlDocumentPath====
Takes an u64 '''TitleID''' and a C descriptor. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
+
Takes an [[#ApplicationId]] and a C descriptor. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
    
==== ResolveDataPath ====
 
==== ResolveDataPath ====
Takes an u64 '''TitleID''' and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
+
Takes an [[#DataId]] and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
    
==== RedirectApplicationControlPath ====
 
==== RedirectApplicationControlPath ====
Takes an u64 '''TitleID''' and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
+
Takes an [[#ApplicationId]] and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
 +
 
 +
[9.0.0+] Now takes an additional 8-bytes of input.
    
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
 
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
    
==== RedirectApplicationHtmlDocumentPath ====
 
==== RedirectApplicationHtmlDocumentPath ====
Takes an u64 '''TitleID''' and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
+
Takes an [[#ApplicationId]] and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
 +
 
 +
[9.0.0+] Now takes an additional 8-bytes of input.
    
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
 
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
    
==== ResolveApplicationLegalInformationPath ====
 
==== ResolveApplicationLegalInformationPath ====
Takes an u64 '''TitleID''' and a C descriptor. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
+
Takes an [[#ApplicationId]] and a C descriptor. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
    
==== RedirectApplicationLegalInformationPath ====
 
==== RedirectApplicationLegalInformationPath ====
Takes an u64 '''TitleID''' and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
+
Takes an [[#ApplicationId]] and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
 +
 
 +
[9.0.0+] Now takes an additional 8-bytes of input.
    
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
 
Inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
Line 104: Line 118:  
Takes no input. Frees all linked-lists' entries that have '''flag''' set to 0.
 
Takes no input. Frees all linked-lists' entries that have '''flag''' set to 0.
   −
==== SetProgramNcaPath2 ====
+
==== RedirectApplicationProgramPath ====
Same as [[#SetProgramNcaPath|SetProgramNcaPath]], but inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
+
Same as [[#RedirectProgramPath|RedirectProgramPath]], but inserts a new [[#Location_List_Entry|entry]] with '''flag''' set to 1.
 +
 
 +
[9.0.0+] Now takes an additional 8-bytes of input.
   −
==== ClearLocationResolver2 ====
+
==== ClearApplicationRedirection ====
 
Takes no input. Frees all linked-lists' entries that have '''flag''' set to 1.
 
Takes no input. Frees all linked-lists' entries that have '''flag''' set to 1.
   −
==== DeleteProgramNcaPath ====
+
[9.0.0+] Now takes a type-0x5 input buffer, no output.
Takes an u64 '''TitleID'''. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
+
 
 +
==== EraseProgramRedirection ====
 +
Takes an [[#ProgramnId]]. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
   −
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.
+
Removes the [[#Location_List_Entry|entry]] that matches the input ProgramId.
   −
==== DeleteControlNcaPath ====
+
==== EraseApplicationControlRedirection ====
Takes an u64 '''TitleID'''. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
+
Takes an [[#ApplicationId]]. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].
   −
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.
+
Removes the [[#Location_List_Entry|entry]] that matches the input ApplicationId.
   −
==== DeleteDocHtmlNcaPath ====
+
==== EraseApplicationHtmlDocumentRedirection ====
Takes an u64 '''TitleID'''. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
+
Takes an [[#ApplicationId]]. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].
   −
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.
+
Removes the [[#Location_List_Entry|entry]] that matches the input ApplicationId.
   −
==== DeleteInfoHtmlNcaPath ====
+
==== EraseApplicationLegalInformationRedirection ====
Takes an u64 '''TitleID'''. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
+
Takes an [[#ApplicationId]]. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].
   −
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.
+
Removes the [[#Location_List_Entry|entry]] that matches the input ApplicationId.
 +
 
 +
==== ResolveProgramPathForDebug ====
 +
Same as [[#ResolveProgramPath|ResolveProgramPath]], but uses a redirection shim on top of the real program path.
 +
 
 +
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.
 +
 
 +
==== RedirectProgramPathForDebug ====
 +
Same as [[#RedirectProgramPath|RedirectProgramPath]], but uses a redirection shim on top of the real program path.
 +
 
 +
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.
 +
 
 +
==== RedirectApplicationProgramPathForDebug ====
 +
Same as [[#RedirectApplicationProgramPath |RedirectApplicationProgramPath ]], but uses a redirection shim on top of the real program path.
 +
 
 +
[9.0.0+] Like [[#RedirectApplicationProgramPath]] this now takes an additional 8-bytes of input.
 +
 
 +
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.
 +
 
 +
==== EraseProgramRedirectionForDebug ====
 +
Same as [[#EraseProgramRedirection |EraseProgramRedirection ]], but uses a redirection shim on top of the real program path.
 +
 
 +
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.
    
=== IRegisteredLocationResolver ===
 
=== IRegisteredLocationResolver ===
 
This is "nn::lr::IRegisteredLocationResolver".
 
This is "nn::lr::IRegisteredLocationResolver".
   −
This works like [[#ILocationResolver]], but only two types of NCA paths can be gotten/set. In addition, each type has a fallback path that can be set for a single title ID at a time.
+
This works like [[#ILocationResolver]], but only two types of NCA paths can be gotten/set. In addition, each type has a fallback path that can be set for a single [[#ProgramId]] at a time.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 139: Line 179:  
! Cmd || Name || Arguments || Notes
 
! Cmd || Name || Arguments || Notes
 
|-
 
|-
| 0 || ResolveProgramPath || u64 TitleID + C descriptor || Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
+
| 0 || ResolveProgramPath || [[#ProgramId]] + C descriptor || Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].
 
|-
 
|-
| 1 || RegisterProgramPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] || Sets the Type 0 fallback TID and path to the provided arguments.
+
| 1 || RegisterProgramPath || [[#ProgramId]] + X descriptor [[Filesystem_services#ContentPath|ContentPath]] [9.0.0+] Now takes an additional 8-bytes of input. || Sets the Type 0 fallback TID and path to the provided arguments.
 
|-
 
|-
| 2 || UnregisterProgramPath || u64 TitleID || If the Type 0 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.
+
| 2 || UnregisterProgramPath || [[#ProgramId]] || If the Type 0 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.
 
|-
 
|-
| 3 || RedirectProgramPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] ||
+
| 3 || RedirectProgramPath || [[#ProgramId]] + X descriptor [[Filesystem_services#ContentPath|ContentPath]] [9.0.0+] Now takes an additional 8-bytes of input. ||
 
|-
 
|-
| 4 || [2.0.0+] ResolveHtmlDocumentPath || u64 TitleID + C descriptor ||
+
| 4 || [2.0.0+] ResolveHtmlDocumentPath || [[#ApplicationId]] + C descriptor ||
 
|-
 
|-
| 5 || [2.0.0+] RegisterHtmlDocumentPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] || Sets the Type 1 fallback TID and path to the provided arguments.
+
| 5 || [2.0.0+] RegisterHtmlDocumentPath || [[#ApplicationId]] + X descriptor [[Filesystem_services#ContentPath|ContentPath]] [9.0.0+] Now takes an additional 8-bytes of input. || Sets the Type 1 fallback TID and path to the provided arguments.
 
|-
 
|-
| 6 || [2.0.0+] UnregisterHtmlDocumentPath || u64 TitleID || If the Type 1 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.
+
| 6 || [2.0.0+] UnregisterHtmlDocumentPath || [[#ApplicationId]] || If the Type 1 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.
 
|-
 
|-
| 7 || [2.0.0+] RedirectHtmlDocumentPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] ||
+
| 7 || [2.0.0+] RedirectHtmlDocumentPath || [[#ApplicationId]] + X descriptor [[Filesystem_services#ContentPath|ContentPath]] [9.0.0+] Now takes an additional 8-bytes of input. ||
 +
|-
 +
| 8 || [7.0.0+] Refresh || No input/output. ||
 +
|-
 +
| 9 || [9.0.0+] RefreshExcluding || Type-5 buffer || Unofficial name. Refreshes entries excluding those with application ProgramIds contained in the buffer.
 
|}
 
|}
   Line 163: Line 207:  
! Cmd || Name || Arguments || Notes
 
! Cmd || Name || Arguments || Notes
 
|-
 
|-
| 0 || ResolveAddOnContentPath || u64 TitleID + C descriptor ||  
+
| 0 || ResolveAddOnContentPath || [[#ApplicationId]] + C descriptor ||  
 
|-
 
|-
| 1 || RegisterAddOnContentStorage || [[Filesystem_services#StorageId|StorageID]] + u64 TitleID ||  
+
| 1 || RegisterAddOnContentStorage || [[#StorageId]] + [[#ApplicationId]] [9.0.0+] Now takes an additional [[#ApplicationId]] for the owner application. ||  
 
|-
 
|-
 
| 2 || UnregisterAllAddOnContentPath || None || Clears all registered titles here.
 
| 2 || UnregisterAllAddOnContentPath || None || Clears all registered titles here.
 +
|-
 +
| 3 || [9.0.0+] [[#RefreshApplicationAddOnContent]] || Type-5 buffer || Unofficial name
 +
|-
 +
| 4 || [9.0.0+] [[#UnregisterApplicationAddOnContent]] || [[#ApplicationId]] || Unofficial name
 
|}
 
|}
 +
 +
==== RefreshApplicationAddOnContent ====
 +
Takes an type-5 buffer containing an array of [[#ApplicationId]]. Unregisters entries with IDs absent from the input buffer.
 +
 +
==== UnregisterApplicationAddOnContent====
 +
Takes an [[#ApplicationId]] for the application to unregister add on content entries for.
    
=== Location List Entry ===
 
=== Location List Entry ===
Line 181: Line 235:  
| 0x8 || 0x8|| Pointer to next entry
 
| 0x8 || 0x8|| Pointer to next entry
 
|-
 
|-
| 0x10 || 0x8|| TitleID
+
| 0x10 || 0x8|| [[#ProgramId]]
 
|-
 
|-
| 0x18 || 0x300 || [[Filesystem_services|ContentPath]]
+
| 0x18 || 0x300 || [[Filesystem_services#ContentPath|ContentPath]]
 
|-
 
|-
 
| 0x318 || 0x4 || Flag
 
| 0x318 || 0x4 || Flag
Line 198: Line 252:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || CreateContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 0 || CreateContentStorage || Takes a [[#StorageId]].
 
|-
 
|-
| 1 || CreateContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 1 || CreateContentMetaDatabase || Takes a [[#StorageId]].
 
|-
 
|-
| 2 || VerifyContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 2 || VerifyContentStorage || Takes a [[#StorageId]].
 
|-
 
|-
| 3 || VerifyContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 3 || VerifyContentMetaDatabase || Takes a [[#StorageId]].
 
|-
 
|-
| 4 || OpenContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.
+
| 4 || OpenContentStorage || Takes a [[#StorageId]], [2.0.0+] Only returns a storage if one has previously been opened globally via CreateContentStorage.
 
|-
 
|-
| 5 || OpenContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.
+
| 5 || OpenContentMetaDatabase || Takes a [[#StorageId]], [2.0.0+] Only returns a storage if one has previously been opened globally via CreateContentStorage.
 
|-
 
|-
| 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[Filesystem_services#StorageId|StorageID]]. Calls IContentStorage->CloseAndFlushStorage().
+
| 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[#StorageId]]. Calls IContentStorage->DisableForcibly().
 
|-
 
|-
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[Filesystem_services#StorageId|StorageID]].  Calls IContentMetaDatabase->CloseMetaDatabase().
+
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[#StorageId]].  Calls IContentMetaDatabase->DisableForcibly().
 
|-
 
|-
| 8 || CleanupContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and deletes the associated savedata.
+
| 8 || CleanupContentMetaDatabase || Takes a [[#StorageId]], and deletes the associated savedata.
 
|-
 
|-
| 9 || [2.0.0+] OpenContentStorage2 || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage. Note: Name is not official.
+
| 9 || [2.0.0+] ActivateContentStorage || Takes a [[#StorageId]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage. Note: Name is not official.
 
|-
 
|-
| 10 || [2.0.0+] CloseContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentStorage. Note: Name is not official.
+
| 10 || [2.0.0+] InactivateContentStorage || Takes a [[#StorageId]], and closes the associated IContentStorage.
 
|-
 
|-
| 11 || [2.0.0+] OpenContentMetaDatabase2 || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentMetaDatabase for the StorageID to be gotten with GetIContentMetaDatabase. Note: Name is not official.
+
| 11 || [2.0.0+] ActivateContentMetaDatabase || Takes a [[#StorageId]], and opens an IContentMetaDatabase for the StorageID to be gotten with CreateContentMetaDatabase.
 
|-
 
|-
| 12 || [2.0.0+] CloseContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentMetaDatabase. Note: Name is not official.
+
| 12 || [2.0.0+] InactivateContentMetaDatabase || Takes a [[#StorageId]], and closes the associated IContentMetaDatabase.
 +
|-
 +
| 13 || [9.0.0+] InvalidateRightsIdCache ||
 
|}
 
|}
   Line 234: Line 290:  
| 0 || [[#GeneratePlaceHolderId]] || Returns a random UUID for the Content Storage.
 
| 0 || [[#GeneratePlaceHolderId]] || Returns a random UUID for the Content Storage.
 
|-
 
|-
| 1 || CreatePlaceHolder || Takes two [[#NcaID]]s, and a u64 filesize.
+
| 1 || CreatePlaceHolder || Takes a [[#ContentId]], a [[#PlaceHolderId]], and a s64 filesize.
 
|-
 
|-
| 2 || DeletePlaceHolder || Takes a [[#NcaID]].
+
| 2 || DeletePlaceHolder || Takes a [[#PlaceHolderId]].
 
|-
 
|-
| 3 || HasPlaceHolder ||  Takes a [[#NcaID]].
+
| 3 || HasPlaceHolder ||  Takes a [[#PlaceHolderId]] and returns an output u8 bool.
 
|-
 
|-
| 4 || WritePlaceHolder || Takes a [[#NcaID]], a u64-offset, and type 5 buffer. Writes the buffer to the file for the NcaID's placeholder path at the specified offset.
+
| 4 || WritePlaceHolder || Takes a [[#PlaceHolderId]], a u64-offset, and type-0x5 input buffer. Writes the buffer to the file for the placeholder path at the specified offset.
 
|-
 
|-
| 5 || Register || Takes two [[#NcaID]]s, moves the Placeholder NCA content to the registered NCA path.
+
| 5 || Register || Takes a [[#ContentId]] and a [[#PlaceHolderId]], no output. Moves the Placeholder NCA content to the registered NCA path.
 
|-
 
|-
| 6 || Delete || Takes a [[#NcaID]].
+
| 6 || Delete || Takes a [[#ContentId]].
 
|-
 
|-
| 7 || Has || Takes a [[#NcaID]].
+
| 7 || Has || Takes a [[#ContentId]].
 
|-
 
|-
| 8 || GetPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
+
| 8 || GetPath || Takes a [[#ContentId]] and a type-0x1A output buffer containing a [[Filesystem_services#ContentPath|ContentPath]].
 
|-
 
|-
| 9 || GetPlaceHolderPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
+
| 9 || GetPlaceHolderPath || Takes a [[#PlaceHolderId]] and a type-0x1A output buffer containing a [[Filesystem_services#ContentPath|ContentPath]].
 
|-
 
|-
| 10 || CleanupAllPlaceHolder || Deletes and re-creates the Placeholder directory.
+
| 10 || CleanupAllPlaceHolder || No input/output. Deletes and re-creates the Placeholder directory.
 
|-
 
|-
 
| 11 || ListPlaceHolder || This is like [[#GetNumberOfRegisteredEntries]], but for the Placeholder directory.
 
| 11 || ListPlaceHolder || This is like [[#GetNumberOfRegisteredEntries]], but for the Placeholder directory.
Line 260: Line 316:  
| 13 || [[#ListContentId]] ||
 
| 13 || [[#ListContentId]] ||
 
|-
 
|-
| 14 || [[#GetSize]] ||  
+
| 14 || [[#GetSizeFromContentId]] ||  
 
|-
 
|-
| 15 || DisableForcibly || Closes/Flushes all resources for the storage, and causes all future IPC commands to the current session to return error 0xC805.
+
| 15 || DisableForcibly || No input/output. Closes/Flushes all resources for the storage, and causes all future IPC commands to the current session to return error 0xC805.
 
|-
 
|-
| 16 || [2.0.0+] RevertToPlaceHolder || Takes three 0x10-sized [[#NcaID]]s. Creates the registered directory NCA path, and renames the placeholder path to the registered NCA path.
+
| 16 || [2.0.0+] RevertToPlaceHolder || Takes two [[#ContentId]] and a [[#PlaceHolderId]], no output. Creates the registered directory NCA path, and renames the placeholder path to the registered NCA path.
 
|-
 
|-
| 17 || [2.0.0+] SetPlaceHolderSize || Takes a [[#NcaID]], and a u64 size
+
| 17 || [2.0.0+] SetPlaceHolderSize || Takes a [[#PlaceHolderId]], and a s64 size, no output.
 
|-
 
|-
 
| 18 || [2.0.0+] [[#ReadContentIdFile]] ||
 
| 18 || [2.0.0+] [[#ReadContentIdFile]] ||
 
|-
 
|-
| 19 || [2.0.0+] GetRightsIdFromPlaceHolderId || Gets the Rights ID for the [[#NcaID]]'s placeholder path.
+
| 19 || [2.0.0+] [[#GetRightsIdFromPlaceHolderId]] ||
 
|-
 
|-
| 20 || [2.0.0+] GetRightsIdFromContentId || Gets the Rights ID for the [[#NcaID]]'s registered path
+
| 20 || [2.0.0+] [[#GetRightsIdFromContentId]] ||
 
|-
 
|-
| 21 || [2.0.0+] WriteContentForDebug || Takes a [[#NcaID]], a u64 offset, and a type 5 buffer. On debug units, writes the buffer to the NCA's registered path. On retail units, this just aborts.
+
| 21 || [2.0.0+] WriteContentForDebug || Takes a [[#ContentId]], a u64 offset, and a type-0x5 input buffer. On debug units, writes the buffer to the NCA's registered path. On retail units, this just aborts.
 
|-
 
|-
 
| 22 || [2.0.0+] GetFreeSpaceSize || Gets free space for the storage.
 
| 22 || [2.0.0+] GetFreeSpaceSize || Gets free space for the storage.
Line 280: Line 336:  
| 23 || [2.0.0+] GetTotalSpaceSize || Gets total space for the storage.
 
| 23 || [2.0.0+] GetTotalSpaceSize || Gets total space for the storage.
 
|-
 
|-
| 24 || [3.0.0+] FlushStorage || Flushes resources for the storage without closing it.
+
| 24 || [3.0.0+] FlushPlaceHolder || Flushes resources for the storage without closing it.
 +
|-
 +
| 25 || [4.0.0+] GetSizeFromPlaceHolderId ||
 
|-
 
|-
| 25 || [4.0.0+] ||  
+
| 26 || [4.0.0+] RepairInvalidFileAttribute ||  
 
|-
 
|-
| 26 || [4.0.0+] ||  
+
| 27 || [8.0.0+] GetRightsIdFromPlaceHolderIdWithCache ||  
 
|}
 
|}
    
==== GeneratePlaceHolderId ====
 
==== GeneratePlaceHolderId ====
Generates a random [[#NcaID]] for use as a placeholder.
+
Generates a random [[#PlaceHolderId]] for use as a placeholder.
    
Calls nn::util::GenerateUuid(), which internally calls nn::os::GenerateRandomBytes(16);
 
Calls nn::util::GenerateUuid(), which internally calls nn::os::GenerateRandomBytes(16);
Line 296: Line 354:     
==== ListContentId====
 
==== ListContentId====
Takes an output buffer, u32 offset and gets all entries starting at that offset.
+
Takes an output buffer, s32 offset and gets all entries starting at that offset.
 
Returns number of entries read.
 
Returns number of entries read.
   −
Each entry is a [[#NcaID]].
+
Each entry is a [[#ContentId]].
    
The total read entries is exactly the same as the number of "<hex>.nca" directories in the storage FS(or at least under the "registered" directory?).
 
The total read entries is exactly the same as the number of "<hex>.nca" directories in the storage FS(or at least under the "registered" directory?).
   −
==== GetSize ====
+
==== GetSizeFromContentId ====
Takes a [[#NcaID]] as input.
+
Takes a [[#ContentId]] as input.
   −
Returns the total size readable by ReadEntryRaw. This is the same as the size-field in the [[NAX0]] "<NcaID>.nca/00" file.
+
Returns the total size readable by [[#ReadContentIdFile]]. This is the same as the size-field in the [[NAX0]] "<ContentId>.nca/00" file.
    
==== ReadContentIdFile ====
 
==== ReadContentIdFile ====
Takes an output buffer, a [[#NcaID]] as input, and a u64 file offset.
+
Takes a type-0x6 output buffer, a [[#ContentId]] as input, and a s64 file offset.
 +
 
 +
Reads plaintext NCA file contents from the Registered path for the ContentId.
 +
 
 +
==== GetRightsIdFromPlaceHolderId ====
 +
Takes a [[#PlaceHolderId]], returns a [[#RightsId]].
 +
 
 +
Gets the Rights ID for the [[#PlaceHolderId]]'s placeholder path.
   −
Reads plaintext NCA file contents from the Registered path for the NcaID.
+
==== GetRightsIdFromContentId ====
 +
Takes a [[#ContentId]], returns a [[#RightsId]].
 +
 
 +
Gets the Rights ID for the [[#ContentId]]'s registered path
    
=== IContentMetaDatabase ===
 
=== IContentMetaDatabase ===
 
This is "nn::ncm::IContentMetaDatabase".
 
This is "nn::ncm::IContentMetaDatabase".
  −
Note the official name for Meta Record is "ContentMetaKey".
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 322: Line 388:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || Set || Takes a [[NCA#Meta_records|Meta Record]], a type-5 [[NCA#Content_records|Content Records]] buffer and a u64 size.
+
| 0 || Set || Takes a [[#ContentMetaKey]], a type-5 [[CNMT#Content_Records|Content Records]] buffer and a u64 size.
 
|-
 
|-
| 1 || Get || Takes a [[NCA#Meta_records|Meta Record]], a type-6 buffer to write [[NCA#Content_records|Content Records]] to and a u64 size. Returns the actual Content Records size read.
+
| 1 || Get || Takes a [[#ContentMetaKey]], a type-6 buffer to write [[CNMT#Content_Records|Content Records]] to and a u64 size. Returns the actual number of bytes read into the buffer. First 8 bytes of the data is header (u16 numExtraDataBytes, numContentRecords, numMetaRecords, padding). After the header is numExtraDataBytes of additional data, after which follow content records and content meta keys. Set takes this same data as input.
 
|-
 
|-
| 2 || Remove || Takes a [[NCA#Meta_records|Meta Record]], and removes the associated record.
+
| 2 || Remove || Takes a [[#ContentMetaKey]], and removes the associated record.
 
|-
 
|-
| 3 || GetContentIdByType || Takes a [[NCA#Meta_records|Meta Record]] and a u8 [[#Title_Types|Title Type]]. Returns a [[#NcaID]].
+
| 3 || GetContentIdByType || Takes a [[#ContentMetaKey]] and a u8 [[#ContentMetaType]]. Returns a [[#ContentId]].
 
|-
 
|-
| 4 || ListContentInfo || Takes a type-6 buffer to write [[NCA#Content_records|Content Record]] entries to, a [[NCA#Meta_records|Meta Record]], and a u32 index into the Content Record entries to start copying from. Returns a u32 entries_read.
+
| 4 || ListContentInfo || Takes a type-6 buffer to write [[CNMT#Content_Records|Content Record]] entries to, a [[#ContentMetaKey]], and a s32 index into the Content Record entries to start copying from. Returns a s32 entries_read.
 
|-
 
|-
| 5 || List || Takes a type-6 buffer to write [[NCA#Meta_records|Meta Record]]s to, a u32 [[#Title_Types|Title Type]], a u64 TID, a u64 TID_LOW, and u64 TID_HIGH. Writes into the buffer all Meta Records with low <= record->title_id <= high, and record->type == type. Additionally requires record->title_id == TID, if record->type is Application, Patch, Add-On, or Delta.
+
| 5 || List || Takes a type-6 buffer to write [[#ContentMetaKey]]s to, a u32 [[#ContentMetaType]], a [[#ProgramId]], a u64 ProgramId_Low, and u64 ProgramId_High. Writes into the buffer all Content Meta Keys with low <= record->title_id <= high, and record->type == type. Returns s32 numEntriesTotal, numEntriesWritten. Additionally requires record->title_id == TID, if record->type is Application, Patch, Add-On, or Delta, otherwise, you can pass 0 for type to ignore the type and list them all in the range.
 
|-
 
|-
| 6 || GetLatestContentMetaKey || Takes a u64 title id, and returns the [[NCA#Meta_records|Meta Record]] with the highest version field for that title id.
+
| 6 || GetLatestContentMetaKey || Takes a [[#ProgramId]], and returns the [[#ContentMetaKey]] with the highest version field for that ProgramId.
 
|-
 
|-
 
| 7 || [[#ListApplication]] ||
 
| 7 || [[#ListApplication]] ||
 
|-
 
|-
| 8 || Has || Takes a [[NCA#Meta_records|Meta Record]] and returns whether that record is present in the database.
+
| 8 || Has || Takes a [[#ContentMetaKey]] and returns an output u8 bool indicating whether that record is present in the database.
 
|-
 
|-
| 9 || HasAll || Takes a type-5 buffer containing [[NCA#Meta_records|Meta Records]] (code assumes there are size/sizeof(meta_record) records in the buffer), and returns whether all of those records are present in the database.
+
| 9 || HasAll || Takes a type-0x5 input buffer containing an array of [[#ContentMetaKey]], and returns whether all of those records are present in the database.
 
|-
 
|-
| 10 || GetSize || Takes a [[NCA#Meta_records|Meta Record]], and returns the size of the associated [[NCA#Content_records|Content Records]].
+
| 10 || GetSize || Takes a [[#ContentMetaKey]], and returns the size of the associated [[CNMT#Content_Records|Content Records]].
 
|-
 
|-
| 11 || GetRequiredSystemVersion || Takes a [[NCA#Meta_records|Meta Record]], and returns u32 from ContentRecords + 16 (only if the Meta record has type Application or Patch).
+
| 11 || GetRequiredSystemVersion || Takes a [[#ContentMetaKey]], and returns u32 from ContentRecords + 16 (only if the content meta key has type Application or Patch).
 
|-
 
|-
| 12 || GetPatchId || Takes a [[NCA#Meta_records|Meta Record]], and returns the update title id for that record.
+
| 12 || GetPatchId || Takes a [[#ContentMetaKey]], and returns the update [[#ProgramId]] for that record.
 
|-
 
|-
| 13 || DisableForcibly || Closes the meta database, and causes all future IPC commands to the current session to return error 0xDC05.
+
| 13 || DisableForcibly || Closes the meta database, and causes all future IPC commands to the current session to return error 0xDC05.
 
|-
 
|-
| 14 || [[#LookupOrphanContent]] || Takes a type-6 byte buffer, and a type-5 buffer of [[#NcaID]]s.
+
| 14 || [[#LookupOrphanContent]] || Takes a type-6 byte buffer, and a type-5 buffer of [[#ContentId]]s.
 
|-
 
|-
 
| 15 || Commit || Flushes the in-memory database to savedata.
 
| 15 || Commit || Flushes the in-memory database to savedata.
 
|-
 
|-
| 16 || HasContent || Takes a [[NCA#Meta_records|Meta Record]] and an [[#NcaID]]. Returns whether the content records for that meta record contain the NcaID.
+
| 16 || HasContent || Takes a [[#ContentMetaKey]] and an [[#ContentId]]. Returns whether the content records for that content meta key contain the ContentId.
 
|-
 
|-
| 17 || ListContentMetaInfo || Takes a type-6 [[NCA#Meta_records|Meta Record]] output buffer, a u32 eoffset into that buffer, and an input [[NCA#Meta_records|Meta Record]].
+
| 17 || ListContentMetaInfo || Takes a type-6 [[#ContentMetaKey]] output buffer, a s32 offset into that buffer, and an input [[#ContentMetaKey]].
 
|-
 
|-
| 18 || GetAttributes || Takes a [[NCA#Meta_records|Meta Record]], and returns u8 from ContentRecords + 6.
+
| 18 || GetAttributes || Takes a [[#ContentMetaKey]], and returns u8 from ContentRecords + 6.
 
|-
 
|-
| 19 || [2.0.0+] GetRequiredApplicationVersion || Does the same thing as GetEntryUnknownRecordSize, but for AddOnContents.
+
| 19 || [2.0.0+] GetRequiredApplicationVersion || Does the same thing as GetRequiredSystemVersion, but for AddOnContents.
 
|-
 
|-
| 20 || [5.0.0+] ||
+
| 20 || [5.0.0+] GetContentIdByTypeAndIdOffset ||
 
|}
 
|}
    
==== ListApplication ====
 
==== ListApplication ====
 
Each 24-byte entry (officially "ApplicationContentMetaKey") is as follows:
 
Each 24-byte entry (officially "ApplicationContentMetaKey") is as follows:
   [[NCA#Meta_records|meta_record]] meta_record;
+
   [[CNMT#Meta_records|meta_record]] meta_record;
 
   u64    base_title_id;
 
   u64    base_title_id;
    
This function takes in a type 6 buffer to write entries to, and a u8 "filter" [[#Title_Types|type]]. If filter is zero, all update records will be copied to to the output buffer (space permitting). Otherwise, only titles with type == filter_type will be copied to the output buffer.
 
This function takes in a type 6 buffer to write entries to, and a u8 "filter" [[#Title_Types|type]]. If filter is zero, all update records will be copied to to the output buffer (space permitting). Otherwise, only titles with type == filter_type will be copied to the output buffer.
   −
This func returns a u32 num_entries_written, and a u32 num_entries_total.
+
This func returns a s32 num_entries_total, and a s32 num_entries_written.
    
==== ReadEntryMetaRecords ====
 
==== ReadEntryMetaRecords ====
Takes a type-6 [[NCA#Meta_records|Meta Record]] output buffer, a u32 eoffset into that buffer, and an input [[NCA#Meta_records|Meta Record]] entry. Returns a u32 for total_read_entries.
+
Takes a type-6 [[#ContentMetaKey]] output buffer, a s32 offset into that buffer, and an input [[#ContentMetaKey]] entry. Returns a s32 for total_read_entries.
   −
Reads the meta records stored in the entry's content records into the output buffer.
+
Reads the content meta keys stored in the entry's content records into the output buffer.
   −
This is used, for example, with System Update title 0100000000000816, which contains Meta Records for all other systitles in its Content Records.
+
This is used, for example, with System Update title 0100000000000816, which contains content meta keys for all other systitles in its Content Records.
    
==== LookupOrphanContent ====
 
==== LookupOrphanContent ====
Takes a type-6 byte buffer, and a type-5 buffer containing [[#NcaID]]s.
+
Takes a type-6 byte buffer, and a type-0x5 buffer containing an array of [[#ContentId]].
    
This function was stubbed to return 0xDC05 in [[2.0.0]].
 
This function was stubbed to return 0xDC05 in [[2.0.0]].
   −
On 1.0.0: Initialized the output buffer to all 1s. Then, for each [[#NcaID]] in the input buffer, it checks if that NcaID is present anywhere in the database, and if so writes 0 to the corresponding output byte.
+
On 1.0.0: Initialized the output buffer to all 1s. Then, for each [[#ContentId]] in the input buffer, it checks if that ContentId is present anywhere in the database, and if so writes 0 to the corresponding output byte.
    
In pseudocode, the function basically does the following:
 
In pseudocode, the function basically does the following:
Line 393: Line 459:  
     out_buf[i] = 1
 
     out_buf[i] = 1
   −
for i, NcaID in NcaIDs:
+
for i, ContentId in ContentId:
     if is_present_in_database(NcaID):
+
     if is_present_in_database(ContentId):
 
         out_buf[i] = 0
 
         out_buf[i] = 0
   −
=== NcaID ===
+
=== ContentId ===
This is a 0x10-byte entry. This is originally from the hex portion of "<hex>.nca" directory-names from this storage FS(like [[SD_Filesystem|SD]]). This is also referred to as "ContentId" in the official SDK.
+
This is "nn::ncm::ContentId".
 +
 
 +
This is a 0x10-byte entry. This is originally from the hex portion of "<hex>.nca" directory-names from this storage FS(like [[SD_Filesystem|SD]]).
 +
 
 +
The ContentId is the same as the first 0x10-bytes from the calculated SHA256 hash, from hashing the entire output from [[#ReadContentIdFile]].
 +
 
 +
=== PlaceHolderId ===
 +
This is "nn::ncm::PlaceHolderId".
 +
 
 +
This is the same as [[#ContentId]], except this is for placeholder content and originates from [[#GeneratePlaceHolderId]].
 +
 
 +
== ProgramId ==
 +
This is "nn::ncm::ProgramId" or "nn::ncm::SystemProgramId".
   −
The NcaID is the same as the first 0x10-bytes from the calculated SHA256 hash, from hashing the entire output from ReadEntryRaw.
+
This is an u64 ID bound to a [[Title_list#System_Modules|program]].
   −
=== Enums ===
+
== DataId ==
==== Title Types ====
+
This is "nn::ncm::DataId" or "nn::ncm::SystemDataId".
 +
 
 +
This is an u64 ID bound to a [[Title_list#System_Data_Archives|data archive]].
 +
 
 +
== ApplicationId ==
 +
This is "nn::ncm::ApplicationId" or "nn::ncm::SystemApplicationId".
 +
 
 +
This is an u64 ID bound to an [[Title_list#System_Applications|application]].
 +
 
 +
== PatchId ==
 +
This is "nn::ncm::PatchId".
 +
 
 +
This is an u64 ID bound to a program patch.
 +
 
 +
== DeltaId ==
 +
This is "nn::ncm::DeltaId".
 +
 
 +
This is an u64 ID bound to a program delta fragment.
 +
 
 +
== AddOnContentId ==
 +
This is "nn::ncm::AddOnContentId".
 +
 
 +
This is an u64 ID bound to add-on content data.
 +
 
 +
== SystemUpdateId ==
 +
This is "nn::ncm::SystemUpdateId".
 +
 
 +
This is an u64 ID bound to system update data.
 +
 
 +
== StorageId ==
 +
This is "nn::ncm::StorageId".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Name
 +
|-
 +
| 0 || None
 +
|-
 +
| 1 || Host
 +
|-
 +
| 2 || GameCard
 +
|-
 +
| 3 || BuiltInSystem
 +
|-
 +
| 4 || BuiltInUser
 +
|-
 +
| 5 || SdCard
 +
|-
 +
| 6 || Any
 +
|}
 +
 
 +
"None" and "Any" are meta storages.
 +
 
 +
nn::ncm::IsInstallableStorage returns true for BuiltInSystem, BuiltInUser, SdCard, and Any.
 +
 
 +
nn::ncm::IsUniqueStorage returns true for != None && != Any.
 +
 
 +
== RightsId ==
 +
This is "nn::ncm::RightsId".
 +
 
 +
This is a 0x10-byte struct. [3.0.0+] This is a 0x18-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x10 || FS Rights ID
 +
|-
 +
| 0x10 || 0x1 || [3.0.0+] KeyGeneration
 +
|-
 +
| 0x11 || 0x7 || [3.0.0+] Padding
 +
|}
 +
 
 +
== ProgramLocation ==
 +
This is "nn::ncm::ProgramLocation".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x8 || [[#ProgramId]]
 +
|-
 +
| 0x8 || 0x1 || [[#StorageId]]
 +
|-
 +
| 0x9 || 0x7 || Padding
 +
|}
 +
 
 +
== Path ==
 +
This is "nn::ncm::Path".
 +
 
 +
This is a 0x300-byte structure, which contains a [[Filesystem_services#ContentPath|ContentPath]].
 +
 
 +
== ContentInstallType ==
 +
This is "nn::ncm::ContentInstallType"
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0x0
 +
| Full
 +
|-
 +
| 0x1
 +
| FragmentOnly
 +
|-
 +
| 0x7
 +
| Unknown (Invalid Content Install Type)
 +
|}
 +
 
 +
== ContentMetaType ==
 +
This is "nn::ncm::ContentMetaType"
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 409: Line 602:  
! Value
 
! Value
 
! Description
 
! Description
 +
|-
 +
| 0x00
 +
| Unknown (Invalid Content Meta Type)
 
|-
 
|-
 
| 0x01
 
| 0x01
| System Programs ([[Title_list#System_Modules|System Modules]] or [[Title_list#System_Applets|System Applets]])
+
| SystemProgram ([[Title_list#System_Modules|System Modules]] or [[Title_list#System_Applets|System Applets]])
 
|-
 
|-
 
| 0x02
 
| 0x02
| [[Title_list#System_Data_Archives|System Data Archives]]
+
| SystemData ([[Title_list#System_Data_Archives|System Data Archives]])
 
|-
 
|-
 
| 0x03
 
| 0x03
| System Update
+
| SystemUpdate
 
|-
 
|-
 
| 0x04
 
| 0x04
| [[Title_list|Firmware package A]]
+
| BootImagePackage ([[Title_list|Firmware package A or C]])
 
|-
 
|-
 
| 0x05
 
| 0x05
| [[Title_list|Firmware package B]]
+
| BootImagePackageSafe ([[Title_list|Firmware package B or D]])
 
|-
 
|-
 
| 0x80
 
| 0x80
| Regular application
+
| Application
 
|-
 
|-
 
| 0x81
 
| 0x81
| Update title
+
| Patch
 
|-
 
|-
 
| 0x82
 
| 0x82
| Add-on content
+
| AddOnContent
 
|-
 
|-
 
| 0x83
 
| 0x83
| Delta title
+
| Delta
 +
|}
 +
 
 +
== ContentMetaKey ==
 +
This is "nn::ncm::ContentMetaKey"
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| [[#ProgramId]]
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Version
 +
|-
 +
| 0xC
 +
| 0x1
 +
| [[#ContentMetaType]]
 +
|-
 +
| 0xD
 +
| 0x1
 +
| [[#ContentInstallType]]
 +
|-
 +
| 0xE
 +
| 0x2
 +
| Padding
 
|}
 
|}
  

Navigation menu