ArchiveId
|
Description
|
Accessible via FS
|
Accessible via FSPXI
|
Only accessible by Process9 internally
|
Requires binary Lowpath
|
Required exheader FS access info bitmask
|
0x00000003
|
SelfNCCH (including RomFS)
|
Yes
|
No
|
No
|
No
|
None
|
0x00000004
|
SaveData (the saveID/mediatype for this is loaded from data originally from the user process' exheader)
|
Yes
|
No
|
No
|
No
|
None
|
0x00000006
|
ExtSaveData
|
Yes
|
No
|
No
|
Yes
|
0x100D, when the input extdataID isn't listed in the exheader.
|
0x00000007
|
Shared ExtSaveData
|
Yes
|
No
|
No
|
Yes
|
None
|
0x00000008
|
SystemSaveData
|
Yes
|
No
|
No
|
Yes
|
0x4, when the input saveID doesn't match the exheader system-saveID.
|
0x00000009
|
SDMC
|
Yes
|
Yes
|
No
|
No
|
0x8E
|
0x0000000A
|
SDMC Write-Only
|
Yes
|
No
|
No
|
No
|
0x808E
|
0x12345678
|
ExtSaveData for BOSS
|
Yes
|
No
|
No
|
Yes
|
0x44
|
0x12345679
|
CARD SPI FS
|
Yes
|
Yes
|
No
|
No
|
0x16
|
0x1234567B
|
ExtSaveData, and ExtSaveData for BOSS
|
No
|
Yes
|
No
|
Yes
|
|
0x1234567C
|
SystemSaveData
|
No
|
Yes
|
No
|
Yes
|
|
0x1234567D
|
NAND RW
|
Yes
|
Yes
|
No
|
No
|
0x800
|
0x1234567E
|
NAND RO
|
Yes
|
Yes
|
No
|
No
|
0x200
|
0x1234567F
|
NAND RO Write FS
|
No
|
Yes
|
No
|
No
|
?
|
0x12345680
|
Extdata transfer. Used for transferring NAND Shared Extdata during system tranfers.
|
Yes
|
Yes
|
No
|
Yes
|
?
|
0x12345681
|
System Savedata transfer. Used for transferring System Save Data during system tranfers.
|
Yes
|
Yes
|
No
|
Yes
|
?
|
0x12345682
|
Unknown. There's code for this in spider v9.9, but that code isn't actually used.
|
Yes
|
?
|
No
|
Yes
|
?
|
0x2345678A
|
Title access. With FS, this allows accessing NCCH/NCSD contents (ExeFS, RomFS, checking if a content uses a seed, checking the validity of the installed seed). FSPXI, additionally, allows opening raw NCCH/NCSD NCCH contents and DSiWare contents for reading, along with encrypted save data.
|
Yes
|
Yes
|
No
|
Yes
|
0x1005
|
0x2345678B
|
Used internally by Process9 as the lowest level title access archive. Allows for opening various sections of a title (TMD, CMD, raw contents, DLC contents, raw save data (including public/private/banner saves for DSiWare), title and/or content import context files and /data directories for save data.
|
No
|
No
|
Yes
|
Yes
|
|
0x2345678C
|
Used internally to access Title Database (/dbs) files. For SD, title.db and import.db . For NAND, title.db , import.db , tmp_t.db , tmp_i.db , and jumpid.db .
|
No
|
No
|
Yes
|
Yes
|
|
0x2345678D
|
Used internally to access non-title /dbs files on the NAND: certs.db and ticket.db .
|
No
|
No
|
Yes
|
No
|
|
0x2345678E
|
FSPXI: Program Access (limited subset of merged main title + update/patch title access). For fs:LDR(used by the "loader" FIRM ARM11-process), only exefs:/.code . Not accessible with fs:USER.
|
Yes
|
Yes
|
No
|
Yes
|
None, see description.
|
0x567890AB
|
NAND CTR FS
|
No
|
Yes
|
No
|
No
|
?
|
0x567890AC
|
TWL PHOTO
|
Yes
|
Yes
|
No
|
No
|
?
|
0x567890AD
|
TWLS (DSi Sound stores recordings here). This is mapped to the FAT12 image stored in the file at Twln/shared2/0000.
|
No
|
Yes
|
No
|
No
|
?
|
0x567890AE
|
NAND TWL FS
|
Yes
|
Yes
|
No
|
No
|
0x100
|
0x567890AF
|
NAND W FS
|
Yes
|
Yes
|
No
|
No
|
0x100
|
0x567890B0
|
Internally creates the same "ID Storage" wrapper over the NAND that is used for SystemSaveData and Shared ExtData, but all operations are stubbed and return 0xE0C046F8.
|
No
|
Yes
|
No
|
No
|
|
0x567890B1
|
Gamecard SaveData (for check). This is a wrapper for UserSaveDataForCheck: the OpenArchive code for that is called with archive-lowpath TID=0/mediatype=2(gamecard).
|
Yes
|
No
|
No
|
No
|
0x6
|
0x567890B2
|
UserSaveData (for check). This is the same as the regular SaveData archive, except with this the savedata ID and mediatype is loaded from the input archive lowpath.
|
Yes
|
No
|
No
|
Yes
|
0x6
|
0x567890B3
|
AGB Save Data
|
No
|
No
|
Yes
|
No
|
-
|
0x567890B4
|
Similar to 0x567890B2 but can only access Accessible Save specified in exheader?
|
Yes
|
No
|
No
|
Yes
|
?
|
Archives listed as not requiring a binary lowpath, use lowpath type empty.
The above permission bitmasks are from v2.x, see the above Services section for how these are handled.
Archives CTR NAND, NAND RO Write FS, TWL NAND, NAND W FS, and CARD SPI FS require the corresponding process exheader access control mount flag to be set, in the exheader for any of the currently running ARM11 processes, for FSPXI. The access rights checked by FS module for archive mounting with fs:USER, are stored in the process' exheader accessinfo.
The CARDSPI archive allows access to the gamecard CARD1 raw savedata flash(aka "cardspi:/" in 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 "/".
PathType:
Value
|
Description
|
-1
|
Returned internally by Process9, when errors occur it seems(in particular when no nul-terminator was found in the input path). The data ptr is set to NULL.
|
0x0
|
INVALID - Specifies an invalid path
|
0x1
|
EMPTY - Specifies an empty path
|
0x2
|
BINARY - Non-text based path. Meaning is per-archive
|
0x3
|
ASCII - Text-based path with 7-bit ASCII characters padded to 8-bits each (signed char)
|
0x4
|
UTF16 - Text-based path with UTF-16 characters
|
In IPC requests, sizes of ASCII and UTF16 paths must include space for the null-terminator.
Binary LowPath
The format of the data that a binary LowPath points to is custom per archive.
SelfNCCH File Path Data Format
Index word
|
Description
|
0
|
Type:
- 0x0: RomFS
- 0x1: error 0xD9004676
- 0x2: ExeFS
- 0x3: Error 0xE0E046BE.
- 0x4: FS-module crashes on this
- 0x5: Update RomFS?
|
1-2
|
File name for ExeFS ("icon"/"banner"/"logo"). ".code" is not allowed
|
Note that ExeFS files only support reading from offset=0 and with size=file_size.
SystemSaveData / Extdata / Shared Extdata Archive Path Data Format
DataAccessPath
Offset |
Size |
Description
|
0x0 |
0x1 |
u8 Mediatype
|
0x1 |
0x1 |
only for NAND data (System Savedata / Shared Extdata), otherwise left 0:
Value |
Description
|
0 |
Accesses from/to nand:/data/<ID0 of current system>
|
1 |
Accesses from/to nand:/fixdata
|
2 |
Accesses from/to nand:/data/<ID0 from Device Move Context>
|
|
0x2 |
0x2 |
padding
|
SystemSaveData
FS
Archive Path
Index word
|
Description
|
0
|
DataAccessPath
|
1
|
save ID low (save ID high is 0)
|
File Path
The file path is a cleartext ASCII or UTF16 file path (<file path>
).
The file path would access the file at <base path>/sysdata/<save ID low>/<save ID high>/<file path>
.
Note that /<file path>
refers to the virtual file system inside the <save ID high> file.
FSPXI / FS System Savedata Transfer / FSPXI System Savedata Transfer
Archive Path
File Path
Index word |
Description
|
0 |
save ID low
|
1 |
save ID high
|
The file path would access the file at <base path>/sysdata/<save ID low>/<save ID high>
.
Extdata / Shared Extdata
FS / FS Extdata Transfer / FSPXI Extdata Transfer
Archive Path
Index word
|
Description
|
0
|
DataAccessPath
|
1
|
ext save ID low
|
2
|
ext save ID high
|
This refers to the extdata filesystem structure's base directory at <base path>/extdata/<ext save ID low>/<ext save ID high>
.
File Path
The file path is a cleartext ASCII or UTF16 file path (<file path>
).
For FS Extdata, this would acccess <base path>/extdata/<save ID low>/<save ID high>/<directory ID>/<file ID>/<file path>
, and /<file path>
refers to the virtual file system inside the <file ID> file.
For FS / FSPXI Extdata Transfer, this accesses <base path>/extdata/<save ID low>/<save ID high>/<file path>
.
UserSaveDataForCheck Archive Path Data Format
Index word
|
Description
|
0
|
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 savegame filesystem.
0x567890B4 Archive Path Data Format
Index word
|
Description
|
0
|
Mediatype
|
1
|
Lower_word_saveid >> 8 ?
|
2
|
Unknown. Game calculate this using formula 0xFFFFFF00 | unknown_b
|
Title Access Archive Path Data Format
Title Access Type
Value |
Description
|
0 |
High-level NCCH content access
|
1 |
Save data access (high-level, decrypted)
|
2 |
Raw content (low-level NCCH/SRL) access
|
3 |
Banner save data access (for DSiWare titles)
|
4 |
FS only: Save data transfer (internally uses generated data from FS:BeginSaveDataMove as the IV for "Save data access (low-level, encrypted)")
|
5 |
Save data access (low-level, encrypted)
|
NCCH Access Type
Value |
Description
|
0 |
RomFS
|
1 |
exefs:/.code
|
2 |
System Menu Data (exefs:/icon , exefs:/banner , exefs:/logo )
|
3 |
NCCH Header(s)
|
4 |
"is seeded" check
|
5 |
Seed verify/validate
|
Archive Path
Offset |
Size |
Description
|
0x0 |
0x8 |
Program ID (Title ID)
|
0xB |
0x1 |
Media Type
|
0xC |
0x4 |
padding
|
File Path
Offset |
Size |
Description
|
0x0 |
0x4 |
Title Access Type
|
0x4 |
0x10 |
Dynamic data depending on Title Access Type:
High Level NCCH Access |
Save Data Access (high level) |
Raw Content |
FS only: Save Data Transfer
|
Offset |
Size |
Description
|
0x0 |
0x4 |
Content index from TMD for NAND/SD titles
NCSD partition index for gamecards
|
0x4 |
0x4 |
NCCH Access Type
|
0x8 |
0x8 |
Dynamic data depending on NCCH Access Type:
For ExeFS, (System Menu Data / exefs:/.code ),
For Header Access,
For RomFS,
|
|
Offset |
Size |
Description
|
0x0 |
0x10 |
16-byte IV for save data crypto
|
|
Offset |
Size |
Description
|
0x0 |
0x4 |
Content index from TMD for NAND/SD titles
NCSD partition index for gamecards
|
0x4 |
0xC |
padding
|
|
|
|
0x14 |
0x10 |
16-byte seed for titles that require one, or for validating a seed against the check value in the NCCH Header's check value.
If the title does not use a seed, this should not be included and size 0x14 should be used instead of 0x24.
|
For encrypted save data access and banner save data access, the entire 0x10 portion of the dynamic data is left blank.
The "is seeded check" NCCH access type opens a virtual 1-byte file that reads either 0 or 1; this value is generated on-the-fly and will be 1 if ncchflags[7] has bit5 set (content uses seed), and 0 otherwise.
For NCCH sections that require a seed (e.g. .code
, RomFS, etc.), the additional seed portion of the low path must be populated with the correct seed.
The "Seed Verify/Validate" NCCH access type also requires the seed portion of the lowpath. The target NCCH content is opened (with the opened file interface being stubbed, meaning no real reads/writes can be performed on it), and the given seed is used to calculate the seed check hash, and part of it is compared to the check value in the NCCH header. If it matches, opening the "file" succeeds, otherwise 0xD900458C is returned. If attempt is made to use the seed validation type on a content that does not use a seed, error 0xC92044E6 is returned.
FS Limitations
For FS, this archive functions the same, except for the following limitations:
- Only the title access types "High Level NCCH Access" and "High Level Save Data Access", and "Save Data Transfer" are allowed.
- For high level NCCH access, the types "RomFS", "System Menu Data", "Seeded check", and "Seed Check/Verify" are allowed.
- For "Seed Check/Verify", rather than providing the title seed in the file path (as is the case for FSPXI), the seed is retrieved from the seed database (meaning the file lowpath size is always 0x14 for FS).
Program Access / SelfNCCH access
Provides access to a "merged" archive of a base title and, optionally, a separate update (patch) title.
If no patch title exists, the base title is considered to be the patch title, i.e. turning all "patch" accesses into accesses to the base title.
Program Access Type
Value |
Description |
Accesses
|
0 |
RomFS ("unspecified" content type, the default) |
Base title
|
1 |
exefs:/.code |
Patch title
|
2 |
System Menu Data (exefs:/icon , exefs:/banner , exefs:/logo ) |
Base title
|
3 |
Save Data (high level, decrypted) |
-
|
4 |
RomFS (all content types) |
Base title
|
5 |
RomFS ("unspecified" content type, the default) |
Patch title
|
Archive Path
File Path
Offset |
Size |
Description
|
0x0 |
0x4 |
Program Access Type
|
0x4 |
0x8 |
Dynamic data depending on Program Access Type:
ExeFS files (System Menu Data, etc.) |
RomFS of base title (all content types)
|
8-character ExeFS filename
|
|
Offset |
Size |
Description
|
0x0 |
0x4 |
u32, content index of target content
|
0x4 |
0x4 |
padding
|
|
|
FS Limitations
- When used through fs:LDR by loader, FS only provides access to exefs:/.code
.
- For SelfNCCH access, the only allowed access types are "RomFS ("unspecified" content type, the default)" of the Base or Patch title, and "System Menu Data". Attempting to access "Save Data" results in error 0xE0E046BE, "RomFS (all content types)" in 0xF9604784, and "exefs:/.code
" in 0xD9004676.
Archives 0x3 and 0x2345678E both allow for accessing the level-3 IVFC images for RomFS access. The main CXI RomFS is accessible via an all-zero 0xc-byte binary file-lowpath. The update RomFS can be accessed with the first u32 in the binary file-lowpath being set to 0x5. The user must handle parsing the filesystem used in the exposed image itself.
With FSPXI the returned data for RomFS is the entire RomFS section from the NCCH, starting at the IVFC header.
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:
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.
|