Filesystem services: Difference between revisions
TimmSkiller (talk | contribs) |
TimmSkiller (talk | contribs) Rework system savedata + (shared) extdata path formats |
||
Line 1,142: | Line 1,142: | ||
Note that ExeFS files only support reading from offset=0 and with size=file_size. | Note that ExeFS files only support reading from offset=0 and with size=file_size. | ||
=== SystemSaveData Archive Path Data Format === | === SystemSaveData / Extdata / Shared Extdata Archive Path Data Format === | ||
==== | |||
==== DataAccessPath ==== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Offset !! Size !! Description | ! Offset !! Size !! Description | ||
|- | |- | ||
| 0x0 || 0x1 || u8 [[Mediatypes|Mediatype]] | | 0x0 || 0x1 || u8 [[Mediatypes|Mediatype]] | ||
|- | |- | ||
| 0x1 || 0x1 || | | 0x1 || 0x1 || only for NAND data (System Savedata / Shared Extdata), otherwise left 0: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,173: | Line 1,161: | ||
| 1 || Accesses from/to <code>nand:/fixdata</code> | | 1 || Accesses from/to <code>nand:/fixdata</code> | ||
|- | |- | ||
| 2 || Accesses from/to <code>nand:/data/<ID0 | | 2 || Accesses from/to <code>nand:/data/<ID0 from source console's [[Filesystem_services#DeviceMoveContext|Device Move Context]]></code> | ||
|} | |} | ||
|- | |- | ||
| 0x2 || 0x2 || padding | | 0x2 || 0x2 || padding | ||
|} | |} | ||
=== | ==== SystemSaveData ==== | ||
===== FS ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,187: | Line 1,178: | ||
|- | |- | ||
| 0 | | 0 | ||
| [[ | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|- | |- | ||
| 1 | | 1 | ||
| | | save ID low (save ID high is usually 0) | ||
|} | |} | ||
=== | ====== File Path ====== | ||
The file path is a cleartext ASCII or UTF16 file path (<code><file path></code>). | |||
The file path would access the file at <code><base path>/sysdata/<save ID low>/<save ID high>/<file path></code>. | |||
Note that <code>/<file path></code> refers to the virtual file system inside the </code><save ID high></code> file. | |||
===== FSPXI / FS System Savedata Transfer / FSPXI System Savedata Transfer ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,204: | Line 1,199: | ||
|- | |- | ||
| 0 | | 0 | ||
| [[ | | [[Filesystem_services#DataAccessPath|DataAccessPath]] | ||
|} | |} | ||
=== | ====== File Path ====== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Index word !! Description | ! Index word !! Description | ||
|- | |- | ||
| 0 || | | 0 || save ID low | ||
|- | |||
| 1 || save ID high | |||
|} | |||
The file path would access the file at <code><base path>/sysdata/<save ID low>/<save ID high></code>. | |||
==== Extdata / Shared Extdata ==== | |||
===== FS / FS Extdata Transfer / FSPXI Extdata Transfer ===== | |||
====== Archive Path ====== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! Index word | ||
! Description | |||
|- | |- | ||
| | | 0 | ||
| [[Filesystem_services#DataAccessPath|DataAccessPath]] | |||
|- | |- | ||
| | | 1 | ||
| ext save ID low | |||
|- | |- | ||
| | | 2 | ||
| | | ext save ID high | ||
|} | |} | ||
File path | This refers to the extdata filesystem structure's base directory at <code><base path>/extdata/<ext save ID low>/<ext save ID high></code>. | ||
====== File Path ====== | |||
The file path is a cleartext ASCII or UTF16 file path (<code><file path></code>). | |||
For FS Extdata, this would acccess <code><base path>/extdata/<save ID low>/<save ID high>/<directory ID>/<file ID>/<file path></code>, and <code>/<file path></code> refers to the virtual file system inside the </code><file ID></code> file. | |||
For FS / FSPXI Extdata Transfer, this accesses <code><base path>/extdata/<save ID low>/<save ID high>/<file path></code>. | |||
=== UserSaveDataForCheck Archive Path Data Format === | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Index word ! | ! 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. | ||
=== 0x567890B4 Archive Path Data Format === | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,252: | Line 1,271: | ||
|- | |- | ||
| 1 | | 1 | ||
| | | <code><nowiki>Lower_word_saveid >> 8</nowiki></code> ? | ||
|- | |- | ||
| 2 | | 2 | ||
| | | Unknown. Game calculate this using formula <code><nowiki>0xFFFFFF00 | unknown_b</nowiki></code> | ||
|} | |} | ||
=== 0x2345678A Archive Path Data Format === | === 0x2345678A Archive Path Data Format === |