Line 14: |
Line 14: |
| | | |
| == OpenCodeFileSystem == | | == OpenCodeFileSystem == |
− | Takes an [[NCM_services#ProgramId|ProgramId]] and a [[#ContentPath]]. Returns an [[#IFileSystem]]. | + | Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. |
| | | |
| [10.0.0+] This now takes an additional type-0x1A output buffer. | | [10.0.0+] This now takes an additional type-0x1A output buffer. |
| + | |
| + | [16.0.0+] This now takes an additional input [[#ContentAttributes]]. |
| + | |
| + | [17.0.0+] This now takes a type-0x6 output buffer instead of a type-0x1A output buffer. |
| | | |
| == IsArchivedProgram == | | == IsArchivedProgram == |
− | Takes an u64 ProcessId. Returns a bool (1 if the process id's [[#ContentPath]] ends in ".nca"). | + | Takes an input u64 ProcessId. Returns a bool (1 if the process id's [[#FspPath]] ends in ".nca"). |
| | | |
| == SetCurrentProcess == | | == SetCurrentProcess == |
− | Takes a ProcessId descriptor. | + | Takes an input u64 ProcessId. No output. |
| | | |
| = fsp-pr = | | = fsp-pr = |
Line 70: |
Line 74: |
| | 7 || [2.0.0+] [[#OpenFileSystemWithPatch]] | | | 7 || [2.0.0+] [[#OpenFileSystemWithPatch]] |
| |- | | |- |
− | | 8 || [16.0.0+] OpenFileSystemWithIdObsolete ([2.0.0-15.0.1] [[#OpenFileSystemWithId]]) | + | | 8 || [16.0.0+] [[#OpenFileSystemWithIdObsolete]] ([2.0.0-15.0.1] OpenFileSystemWithId) |
| |- | | |- |
| | 9 || [3.0.0+] OpenDataFileSystemByProgramId | | | 9 || [3.0.0+] OpenDataFileSystemByProgramId |
| |- | | |- |
− | | 10 || [16.0.0+] OpenFileSystemWithId | + | | 10 || [16.0.0+] [[#OpenFileSystemWithId]] |
| |- | | |- |
| | 11 || [[#OpenBisFileSystem]] | | | 11 || [[#OpenBisFileSystem]] |
Line 589: |
Line 593: |
| | | |
| == OpenFileSystem == | | == OpenFileSystem == |
− | Takes a type-0x19 input [[#ContentPath]] and a [[#FileSystemProxyType]] as parameters. Returns an [[#IFileSystem]]. | + | Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[#FileSystemProxyType]]. Returns an [[#IFileSystem]]. |
| | | |
| [2.0.0+] This function was removed. | | [2.0.0+] This function was removed. |
| | | |
| == SetCurrentProcess == | | == SetCurrentProcess == |
− | Takes a pid-descriptor. | + | Takes an input u64 ProcessId. No output. |
| | | |
| == OpenFileSystemWithPatch == | | == OpenFileSystemWithPatch == |
− | Takes an input [[#FileSystemProxyType]] and an u64 title-id. Returns an [[#IFileSystem]]. | + | Takes an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. |
| | | |
| Web-applet loads the [[#FileSystemProxyType]] (which must be '''Manual''') from u32_table[inparam]. | | Web-applet loads the [[#FileSystemProxyType]] (which must be '''Manual''') from u32_table[inparam]. |
Line 603: |
Line 607: |
| Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names. | | Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as "MountContent", but official nn_sf_sync symbols use "OpenXX" names. |
| | | |
− | == OpenFileSystemWithId == | + | == OpenFileSystemWithIdObsolete == |
− | Takes a type-0x19 input buffer, an [[#FileSystemProxyType]] and an u64 title-id. Returns an [[#IFileSystem]]. | + | Takes a type-0x19 input buffer containing a [[#FspPath]], an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. |
| | | |
| The [[#IFileSystem]] must be '''Meta''' if the NCA type is 0. | | The [[#IFileSystem]] must be '''Meta''' if the NCA type is 0. |
Line 617: |
Line 621: |
| | | |
| When [[#FileSystemProxyType]] is '''Meta''', 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. | | When [[#FileSystemProxyType]] is '''Meta''', 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. |
| + | |
| + | == OpenFileSystemWithId == |
| + | Takes a type-0x19 input buffer containing a [[#FspPath]], an input [[#ContentAttributes]], an input [[#FileSystemProxyType]] and an input [[NCM_services#ProgramId|ProgramId]]. Returns an [[#IFileSystem]]. |
| | | |
| == OpenBisFileSystem == | | == OpenBisFileSystem == |
− | Takes a type-0x19 input buffer string and a [[#BisPartitionId]]. Official user-process code sets instr[0] = 0 normally. Returns an [[#IFileSystem]]. | + | Takes a type-0x19 input buffer containing a [[#FspPath]] and an input [[#BisPartitionId]]. Returns an [[#IFileSystem]]. |
| + | |
| + | Official user-process code sets instr[0] = 0 normally. |
| | | |
| Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisStorage]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors. | | Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisStorage]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors. |
Line 1,875: |
Line 1,884: |
| |- | | |- |
| | 4 || Data | | | 4 || Data |
| + | |} |
| + | |
| + | = ContentAttributes = |
| + | This is "nn::fs::ContentAttributes". |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value || Name |
| + | |- |
| + | | 0 || None |
| + | |- |
| + | | 15 || All |
| |} | | |} |
| | | |
Line 2,683: |
Line 2,704: |
| |} | | |} |
| | | |
− | = ContentPath = | + | = FspPath = |
− | These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They're passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.
| + | This is "nn::fssrv::sf::FspPath". This is a 0x301-byte string. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |