FSDir:Read: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Luigi2us (talk | contribs)
ElementW (talk | contribs)
m Convert to IPC templates
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Request=
=Request=
{| class="wikitable" border="1"
{{IPC/Request}}
|-
{{IPC/RequestHeader|0x0801|1|2}}
!  Index Word
{{IPC/RequestEntry|[[Filesystem_services#DirectoryEntry|Entry]] Count}}
!  Description
{{IPC/MapPointerW|[[Filesystem_services#DirectoryEntry|Entry]] Output Pointer|(Entry Count × 0x228)}}
|-
{{IPC/RequestEnd}}
| 0
| Header code [0x08010042]
|-
| 1
| Entrycount, number of entries to read.
|-
| 2
| ((entrycount*0x228)<<4) <nowiki>|</nowiki> 12;
|-
| 3
| Entry receive ptr
|}


=Response=
=Response=
{| class="wikitable" border="1"
{{IPC/Request}}
|-
{{#vardefine:ipc_offset|0}}
!  Index Word
{{IPC/RequestHeader|0x0801|2|0}}
!  Description
{{IPC/RequestEntry|Result code}}
|-
{{IPC/RequestEntry|Actual Entry Count}}
| 0
{{IPC/RequestEnd}}
| Header code
|-
| 1
| Result code
|-
| 2
| Actually read entrycount
|}
 
=Entry format=
Below are the values that have been identified so far. There are unknown values from 0x219 to 0x227. The values following the entry name up to 0x20C appear to be untouched by the system.
{| class="wikitable" border="1"
|-
!  Byte offset
!  Description
|-
| 0x000
| Entry name (UTF-16, null-terminated)
|-
| 0x20C
| 8.3 file name (8 characters, 'longfilename' -> 'LONGFI~1')
|-
| 0x214
| Unknown value (2 bytes)
|-
| 0x216
| 8.3 file extension (3 characters, set to spaces for directories)
|-
| 0x21A
| (byte) unknown (always 0x01)
|-
| 0x21B
| (byte) unknown (0x00 or 0x08)
|-
| 0x21C
| (byte) 0x00 for files, 0x01 for directories
|-
| 0x21E
| (byte) 0x01 for files, 0x00 for directories
|-
| 0x221
| (byte) unknown (observed values: 0x00, 0x02, 0x08, 0x82)
|-
| 0x222
| (byte) unknown (observed values: 0x00, 0x08, 0x10, 0x20, 0x30, 0x40)
|}

Latest revision as of 19:37, 1 March 2025

Request

Index Word Description
0
Header 0x08010042 Cmd 0x0801 Param 1 Xlat 2
1 Entry Count
2 Descriptor for mapping a (Entry Count × 0x228) byte write-only buffer in the target process
3 Entry Output Pointer

Response

Index Word Description
0
Header 0x08010080 Cmd 0x0801 Param 2 Xlat 0
1 Result code
2 Actual Entry Count