In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
1,662 bytes added ,  00:17, 30 January 2016
Start /dev/fsa documentation
/dev/fsa is the IOSU device node for the virtual filesystem API. It exposes a generic interface for accessing various filesystems supported by the Wii U, including the internal storage filesystem (ISFS), game disc filesystems, and SD cards. These filesystems can be mounted on directories under /vol and accessed through a common API. Once opened, ioctl() and ioctlv() requests can be issued to the interface, which are documented below.

==ioctl() interface==
===0x0A - FSOpenDir()===
===0x0B - FSReadDir()===
===0x0E - FSOpenFile()===

==ioctlv() interface==
===0x0F - FSReadFile()===
This function is used to read data from an open file. It takes one input buffer through the ioctlv interface, a [[#Request Blocks|read request block]], and two output buffers, a buffer for file data and a [[#Status Blocks|status block]].

===0x10 - FSWriteFile()===
This function is used to read data from an open file. It takes two input buffers through the ioctlv interface, a [[#Request Blocks|read request block]] and a data buffer, and one output buffer, a [[#Status Blocks|status block]].

==Structures==
===Request Blocks===
The parameters to FSA functions are passed in a 0x520-byte request block. While the size is constant, the structure varies by call, as shown below:
<syntaxhighlight lang="C">
/* Read/write request block */
typedef struct
{
char unknown0[0x4-0x0];
void *buffer; // Not looked at by FSA
uint32_t size, count;
char unknown10[0x14-0x10];
uint32_t handle;
char unknown18[0x520-0x18];
} rw_req_t;
</syntaxhighlight>

===Status Blocks===
All FSA functions return the status of the call in a 0x293-byte buffer.
203

edits

Navigation menu