Changes

Jump to navigation Jump to search
21 bytes added ,  12:14, 18 May 2016
Same for the path format.
Line 1,013: Line 1,013:     
The CARDSPI archive allows access to the gamecard CARD1 raw savedata flash(aka "cardspi:/" in [[FIRM|Process9]]), the file lowpath must be WCHAR "/". The "NAND W FS" archive allows access to the raw NAND image(aka "wnand:/" in Process9), the file lowpath must be WCHAR "/".
 
The CARDSPI archive allows access to the gamecard CARD1 raw savedata flash(aka "cardspi:/" in [[FIRM|Process9]]), the file lowpath must be WCHAR "/". The "NAND W FS" archive allows access to the raw NAND image(aka "wnand:/" in Process9), the file lowpath must be WCHAR "/".
 +
 +
== Filenames and Paths ==
 +
PathType:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 0x0
 +
| INVALID - Specifies an invalid path.
 +
|-
 +
| 0x1
 +
| EMPTY - Specifies an empty path.
 +
|-
 +
| 0x2
 +
| BINARY - Non-text based path. Meaning is per-archive.
 +
|-
 +
| 0x3
 +
| CHAR - Text-based path with 8-bit characters.
 +
|-
 +
| 0x4
 +
| WCHAR - Text-based path with 16-bit characters.
 +
|}
 +
 +
=== Binary LowPath ===
 +
The format of the data that a binary LowPath points to is custom per archive.
 +
 +
==== SystemSaveData Archive Path Data Format ====
 +
===== FS =====
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| [[Mediatypes|Mediatype]] (must be zero for NAND)
 +
|-
 +
| 1
 +
| saveid
 +
|}
 +
The file/directory lowpath is a text lowpath in the [[Savegames|savegame]] filesystem.
 +
 +
===== FSPXI =====
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| u8 [[Mediatypes|Mediatype]] (must be zero for NAND)
 +
|}
 +
The file lowpath is a binary lowpath containing the u64 saveid, however the high word of the saveid is always zero. The mounted file is the cleartext savegame image. Up to 32 SystemSaveData image files can be opened under a single mounted FSPXI archive.
 +
 +
==== UserSaveDataForCheck Archive Path Data Format ====
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| [[Mediatypes|Mediatype]] (must be non-zero)
 +
|-
 +
| 1
 +
| Lower word saveid
 +
|-
 +
| 2
 +
| Upper word saveid
 +
|}
 +
The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem.
 +
 +
==== ExtSaveData Archive Path Data Format ====
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| [[Mediatypes|Mediatype]]
 +
|-
 +
| 1
 +
| Lower word saveid
 +
|-
 +
| 2
 +
| Upper word saveid
 +
|}
 +
For FS, the file/directory lowpath is a text path in the [[extdata]] filesystem. For FSPXI, the file lowpath is a text path relative to the "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>" directory on SD/NAND, for the cleartext extdata image to mount.
 +
 +
==== 0x2345678A Archive Path Data Format ====
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| Lower word programID
 +
|-
 +
| 1
 +
| Upper word programID
 +
|-
 +
| 2
 +
| [[Mediatypes|Mediatype]]
 +
|-
 +
| 3
 +
| Reserved
 +
|}
 +
 +
File lowpath:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| 0 for NCCH data, 1 for savedata. The latter is only valid for FSPXI. Value 2 is allowed via archive 0x3, it's unknown what this is.
 +
|-
 +
| 1
 +
| TMD content index / NCSD partition index.
 +
|-
 +
| 2
 +
| Type: 0=romfs(0 for non-NCCH as well), 1=exefs ".code"(?), 2=exefs "icon"/"banner"/"logo", 3=unknown, 4=unknown, 5=unknown.
 +
|-
 +
| 3-4
 +
| Filename for ExeFS.
 +
|}
 +
 +
The 0x14-byte lowpath is all-zero for accessing the title's main RomFS.
 +
 +
==== [[RomFS]] ====
 +
The raw FS image for the main CXI RomFS(for the current app this is accessible via archiveid 0x3) can be accessed via an all-zero 0xc-byte binary file-lowpath. The update RomFS for the current app can be accessed with the first u32 in the binary file-lowpath being set to 0x5. This allows access to the raw level-3 IVFC image: the user process must handle parsing the filesystem used in this image itself.
 +
 +
In this scenario, OpenFile returns a handle to the RomFS archive.
 +
 +
The 0x3 archive is an interface for the 0x2345678E archive with the current process programID+mediatype. The file lowpath is 3-words. These words are written to 0x2345678E-archive file_lowpath+0, with the rest of that lowpath set to all-zero(lowpath is different from archive 0x2345678A). File lowpath:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Index word
 +
!  Description
 +
|-
 +
| 0
 +
| See above. The only values which FS-module doesn't allow to be used here are:
 +
* 0x1: Error 0xE0E046BE.
 +
* 0x3: Error 0xE0E046BE.
 +
* 0x4: FS-module executes svcBreak when using this.
 +
|-
 +
| 1-2
 +
| See above. Not validated by FS-module.
 +
|}
    
=SEEDDB=
 
=SEEDDB=
Line 1,177: Line 1,324:  
| 0x4
 
| 0x4
 
| Available free space in clusters
 
| Available free space in clusters
|}
  −
  −
== PathType ==
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Value
  −
!  Description
  −
|-
  −
| 0x0
  −
| INVALID - Specifies an invalid path.
  −
|-
  −
| 0x1
  −
| EMPTY - Specifies an empty path.
  −
|-
  −
| 0x2
  −
| BINARY - Non-text based path. Meaning is per-archive.
  −
|-
  −
| 0x3
  −
| CHAR - Text-based path with 8-bit characters.
  −
|-
  −
| 0x4
  −
| WCHAR - Text-based path with 16-bit characters.
  −
|}
  −
  −
=== Binary LowPath ===
  −
The format of the data that a binary LowPath points to is custom per archive.
  −
  −
==== SystemSaveData Archive Path Data Format ====
  −
===== FS =====
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| [[Mediatypes|Mediatype]] (must be zero for NAND)
  −
|-
  −
| 1
  −
| saveid
  −
|}
  −
The file/directory lowpath is a text lowpath in the [[Savegames|savegame]] filesystem.
  −
  −
===== FSPXI =====
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| u8 [[Mediatypes|Mediatype]] (must be zero for NAND)
  −
|}
  −
The file lowpath is a binary lowpath containing the u64 saveid, however the high word of the saveid is always zero. The mounted file is the cleartext savegame image. Up to 32 SystemSaveData image files can be opened under a single mounted FSPXI archive.
  −
  −
==== UserSaveDataForCheck Archive Path Data Format ====
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| [[Mediatypes|Mediatype]] (must be non-zero)
  −
|-
  −
| 1
  −
| Lower word saveid
  −
|-
  −
| 2
  −
| Upper word saveid
  −
|}
  −
The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem.
  −
  −
==== ExtSaveData Archive Path Data Format ====
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| [[Mediatypes|Mediatype]]
  −
|-
  −
| 1
  −
| Lower word saveid
  −
|-
  −
| 2
  −
| Upper word saveid
  −
|}
  −
For FS, the file/directory lowpath is a text path in the [[extdata]] filesystem. For FSPXI, the file lowpath is a text path relative to the "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>" directory on SD/NAND, for the cleartext extdata image to mount.
  −
  −
==== 0x2345678A Archive Path Data Format ====
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| Lower word programID
  −
|-
  −
| 1
  −
| Upper word programID
  −
|-
  −
| 2
  −
| [[Mediatypes|Mediatype]]
  −
|-
  −
| 3
  −
| Reserved
  −
|}
  −
  −
File lowpath:
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| 0 for NCCH data, 1 for savedata. The latter is only valid for FSPXI. Value 2 is allowed via archive 0x3, it's unknown what this is.
  −
|-
  −
| 1
  −
| TMD content index / NCSD partition index.
  −
|-
  −
| 2
  −
| Type: 0=romfs(0 for non-NCCH as well), 1=exefs ".code"(?), 2=exefs "icon"/"banner"/"logo", 3=unknown, 4=unknown, 5=unknown.
  −
|-
  −
| 3-4
  −
| Filename for ExeFS.
  −
|}
  −
  −
The 0x14-byte lowpath is all-zero for accessing the title's main RomFS.
  −
  −
==== [[RomFS]] ====
  −
The raw FS image for the main CXI RomFS(for the current app this is accessible via archiveid 0x3) can be accessed via an all-zero 0xc-byte binary file-lowpath. The update RomFS for the current app can be accessed with the first u32 in the binary file-lowpath being set to 0x5. This allows access to the raw level-3 IVFC image: the user process must handle parsing the filesystem used in this image itself.
  −
  −
In this scenario, OpenFile returns a handle to the RomFS archive.
  −
  −
The 0x3 archive is an interface for the 0x2345678E archive with the current process programID+mediatype. The file lowpath is 3-words. These words are written to 0x2345678E-archive file_lowpath+0, with the rest of that lowpath set to all-zero(lowpath is different from archive 0x2345678A). File lowpath:
  −
{| class="wikitable" border="1"
  −
|-
  −
!  Index word
  −
!  Description
  −
|-
  −
| 0
  −
| See above. The only values which FS-module doesn't allow to be used here are:
  −
* 0x1: Error 0xE0E046BE.
  −
* 0x3: Error 0xE0E046BE.
  −
* 0x4: FS-module executes svcBreak when using this.
  −
|-
  −
| 1-2
  −
| See above. Not validated by FS-module.
   
|}
 
|}
  
549

edits

Navigation menu