Changes

236 bytes added ,  17:03, 16 November 2019
no edit summary
Line 14: Line 14:     
== OpenCodeFileSystem ==
 
== OpenCodeFileSystem ==
Takes an u64 TitleId and a [[#ContentPath]]. Returns an [[#IFileSystem]].
+
Takes an u64 [[NCM_services#ProgramId|ProgramId]] and a [[#ContentPath]]. Returns an [[#IFileSystem]].
    
== IsArchivedProgram ==
 
== IsArchivedProgram ==
Line 39: Line 39:     
== RegisterProgram ==
 
== RegisterProgram ==
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]
+
Takes a storageID, a pid, a [[NCM_services#ProgramId|ProgramId]], a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]
    
Final FS permissions are stored as (ACI0_perms & ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.
 
Final FS permissions are stored as (ACI0_perms & ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.
Line 554: Line 554:  
After the [[#FileSystemType]] specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.
 
After the [[#FileSystemType]] specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.
   −
When [[#FileSystemType]] is '''ContentMeta''', it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it's compared with the NCA titleID, then an error is thrown on mismatch.
+
When [[#FileSystemType]] is '''ContentMeta''', it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it's compared with the NCA [[NCM_services#ProgramId|ProgramId]], then an error is thrown on mismatch.
    
== OpenBisFileSystem ==
 
== OpenBisFileSystem ==
Line 656: Line 656:     
== OpenDataStorageByDataId ==
 
== OpenDataStorageByDataId ==
Takes a [[NCM_services#StorageId|StorageID]] and a TitleID.
+
Takes a [[NCM_services#StorageId|StorageID]] and a [[NCM_services#ProgramId|ProgramId]].
    
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.
 
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.
Line 1,036: Line 1,036:     
== GetGameCardUpdatePartitionInfo ==
 
== GetGameCardUpdatePartitionInfo ==
Returns a titleID and the title-version for it.
+
Returns a [[NCM_services#ProgramId|ProgramId]] and the title-version for it.
    
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.
 
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.
* Output u64 with ARMS-gamecard: titleID 0100000000000816.
+
* Output u64 with ARMS-gamecard: [[NCM_services#ProgramId|ProgramId]] 0100000000000816.
   −
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.
+
[[NS_Services|NS]] appears to only use this with [[NCM_services|NCM]] for checking whether a sysupdate is required.
    
== GetGameCardDeviceCertificate ==
 
== GetGameCardDeviceCertificate ==
Line 2,024: Line 2,024:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| TitleId (0 for SystemSaveData)</br>SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.
+
| [[NCM_services#ProgramId|ProgramId]] (0 for SystemSaveData)</br>SaveData: 0 can be used for accessing the savedata associated with the current FS session [[NCM_services#ProgramId|ProgramId]], otherwise when set this is the [[NCM_services#ProgramId|ProgramId]] associated with the savedata to access.
 
|-
 
|-
 
| 0x8
 
| 0x8
Line 2,090: Line 2,090:  
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| OwnerId</br>Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.
+
| OwnerId</br>Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[NCM_services#ProgramId|ProgramId]] of the bcat-sysmodule.
 
|-
 
|-
 
| 0x20
 
| 0x20
Line 2,115: Line 2,115:     
= BcatSaveData =
 
= BcatSaveData =
This is accessed using the same commands for SaveData with the same input u8. The [[#SaveDataAttribute]] is the same as DeviceSaveData, except that the titleID field is set to <input titleID>. See above regarding [[#SaveDataCreationInfo]].
+
This is accessed using the same commands for SaveData with the same input u8. The [[#SaveDataAttribute]] is the same as DeviceSaveData, except that the [[NCM_services#ProgramId|ProgramId]] field is set to <input ProgramId>. See above regarding [[#SaveDataCreationInfo]].
    
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.
 
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.
Line 2,154: Line 2,154:  
| 0x28
 
| 0x28
 
| 0x8
 
| 0x8
| Application titleID, for regular SaveData.
+
| Application [[NCM_services#ProgramId|ProgramId]], for regular SaveData.
 
|-
 
|-
 
| 0x30
 
| 0x30