Filesystem services: Difference between revisions

Wwylele (talk | contribs)
Peachy (talk | contribs)
(12 intermediate revisions by 7 users not shown)
Line 554: Line 554:
| 0x086B00C2
| 0x086B00C2
|?
|?
|?
|SetOtherSaveDataSecureValue
| 00121004
| 00121004
|-
|-
| 0x086C00C2
| 0x086C00C2
|?
|?
|?
|GetOtherSaveDataSecureValue
| 00121004
| 00121004
|-
|-
Line 569: Line 569:
| 0x086E00C0
| 0x086E00C0
|Related to Secure Value? Used in Pokemon Sun/Moon.
|Related to Secure Value? Used in Pokemon Sun/Moon.
|?
|SetThisSaveDataSecureValue
|None?
|None?
|-
|-
| 0x086F0040
| 0x086F0040
|Related to Secure Value? Used in Pokemon Sun/Moon.
|Related to Secure Value? Used in Pokemon Sun/Moon.
|?
|GetThisSaveDataSecureValue
| 0xE
| 0xE
|-
|-
Line 644: Line 644:
| 0x087D0000
| 0x087D0000
| [[9.6.0-24|9.6.0-X]]
| [[9.6.0-24|9.6.0-X]]
| Writes an u32 from state to cmdreply[2]. Probably the total number of titles in the SEEDDB?
| GetNumSeeds. Writes the number of seeds to cmdreply[2]
| 0x00200000
| 0x00200000
|-
|-
Line 734: Line 734:
=File and directory access=
=File and directory access=
==Files==
==Files==
File session handles obtained via [[FS:OpenFile]] et al can be used to access files through a service-like interface, despite not being an actual service registered using [[SRV:RegisterService]].
File session handles obtained via [[FS:OpenFile]] and [[FS:OpenFileDirectly]] can be used to access files through a service-like interface, despite not being an actual service registered using [[SRV:RegisterService]]. To use this service-like interface, simply call the SendSyncRequest SVC with a file session handle, using the IPC buffer in thread-local storage for parameters and responses, just like you would with a proper service.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 788: Line 788:


==Directories==
==Directories==
Directory session handles obtained via [[FS:OpenDirectory]] are usable via a service-like interface, following the exact same procedure described above for file sessions.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,195: Line 1,196:
|-
|-
| 2
| 2
| Unknown. Game calculate this using formula <code><nowiki>(unknown_a & 0xFFFFFF00) | unknown_b</nowiki></code>
| Unknown. Game calculate this using formula <code><nowiki>0xFFFFFF00 | unknown_b</nowiki></code>
|}
|}


Line 1,231: Line 1,232:
|-
|-
| 3
| 3
| Reserved / ?
| Number of something? Hardcoded per-archive, 0 for ExeFS, 200 for area:, 100 for rate:, 40 for eula:, etc.
|}
|}


Line 1,314: Line 1,315:
| SD
| SD
|-
|-
| 2
| 3
| TWL Photo
| TWL Photo
|}
|}
Line 1,495: Line 1,496:
|  0x10
|  0x10
|  0x120
|  0x120
|  The [[nand/private/movable.sed]], encrypted with AES-CTR using the above MAC for the counter.
|  The [[nand/private/movable.sed]], encrypted with AES-CBC using the above MAC for the counter.
|}
|}