Changes

144 bytes added ,  19:48, 21 October 2019
no edit summary
Line 571: Line 571:     
== CreateSaveDataFileSystem ==
 
== CreateSaveDataFileSystem ==
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.
+
Takes a 0x40-byte [[#SaveDataAttribute]], a 0x40-byte [[#SaveDataCreationInfo]], and a 0x10-byte input struct.
    
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.
 
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.
Line 578: Line 578:     
== CreateSaveDataFileSystemBySystemSaveDataId ==
 
== CreateSaveDataFileSystemBySystemSaveDataId ==
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.
+
Takes a 0x40-byte [[#SaveDataAttribute]] and a 0x40-byte [[#SaveDataCreationInfo]].
    
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.
 
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.
Line 594: Line 594:     
== OpenSaveDataFileSystem ==
 
== OpenSaveDataFileSystem ==
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.
+
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte [[#SaveDataAttribute]]. Official user-process code is only known to use value 1 for the u8.
    
Returns an [[#IFileSystem]].
 
Returns an [[#IFileSystem]].
Line 603: Line 603:     
== OpenSaveDataFileSystemBySystemSaveDataId ==
 
== OpenSaveDataFileSystemBySystemSaveDataId ==
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.
+
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte [[#SaveDataAttribute]]. Web-applet only uses value0 for the input u8.
    
Returns an [[#IFileSystem]].
 
Returns an [[#IFileSystem]].
Line 1,572: Line 1,572:     
= SaveDataType =
 
= SaveDataType =
 +
This is "nn::fs::SaveDataType".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,603: Line 1,605:  
= CloudBackupWorkStorageId =
 
= CloudBackupWorkStorageId =
 
This is "nn::fs::CloudBackupWorkStorageId".
 
This is "nn::fs::CloudBackupWorkStorageId".
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,658: Line 1,661:  
|}
 
|}
   −
= Save Struct =
+
= SaveDataAttribute =
 
This is "nn::fs::SaveDataAttribute".
 
This is "nn::fs::SaveDataAttribute".
   Line 1,712: Line 1,715:  
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field.
 
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field.
   −
= SaveCreate Struct =
+
= SaveDataCreationInfo =
 +
This is "nn::fs::SaveDataCreationInfo".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,755: Line 1,760:     
= DeviceSaveData =
 
= DeviceSaveData =
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.
+
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the [[#SaveDataAttribute]] field.
    
= BcatSaveData =
 
= BcatSaveData =
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to <input titleID>. See above regarding SaveCreate-struct.
+
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]].
    
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.