Difference between revisions of "CECDU:OpenAndRead"

From 3dbrew
Jump to navigation Jump to search
(Use new template)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
=Request=
 
=Request=
{| class="wikitable" border="1"
+
{{IPC/Request}}
|-
+
{{#vardefine:ipc_offset|0}}
!  Index Word
+
{{IPC/RequestEntry|Header code [0x00120104]}}
!  Description
+
{{IPC/RequestEntry|buffer size (unused)}}
|-
+
{{IPC/RequestEntry|NCCH Program ID}}
| 0
+
{{IPC/RequestEntry|[[CECD_Services#CecDataPathType|Path type]]}}
| Header code [0x00120104]
+
{{IPC/RequestEntry|file open flag?}}
|-
+
{{IPC/ProcessID}}
| 1
+
{{IPC/MapPointerW|buffer address}}
| buffer size (unused)
+
{{IPC/RequestEnd}}
|-
 
| 2
 
| NCCH Program ID
 
|-
 
| 3
 
| [[CECD_Services#CecDataPathType|Path type]]
 
|-
 
| 4
 
| ?
 
|-
 
| 5
 
| 0x20
 
|-
 
| 7
 
| (buffer size << 4) <nowiki>|</nowiki> 0xC
 
|-
 
| 8
 
| buffer
 
|}
 
  
 
=Response=
 
=Response=
{| class="wikitable" border="1"
+
{{IPC/Request}}
|-
+
{{#vardefine:ipc_offset|0}}
!  Index Word
+
{{IPC/RequestEntry|Header code [0x00120082]}}
!  Description
+
{{IPC/RequestEntry|Result code}}
|-
+
{{IPC/RequestEntry|Total bytes read}}
| 0
+
{{IPC/MapPointerW|buffer address}}
| Header code
+
{{IPC/RequestEnd}}
|-
 
| 1
 
| Result code
 
|-
 
| 2
 
| Total bytes read
 
|-
 
|}
 
 
 
=Notes=
 
This reads to the buffer some data stored in "data:/CEC/<file>" (where "data:/" is mapped to the SystemSaveData archive).
 
<file> is determined by the "data type" argument.
 

Latest revision as of 10:20, 10 September 2016

Request[edit]

Index Word Description
0 Header code [0x00120104]
1 buffer size (unused)
2 NCCH Program ID
3 Path type
4 file open flag?
5 Descriptor for process ID
6 Placeholder for process ID
7 Descriptor for mapping a write-only buffer in the target process
8 buffer address

Response[edit]

Index Word Description
0 Header code [0x00120082]
1 Result code
2 Total bytes read
3 Descriptor for mapping a write-only buffer in the target process
4 buffer address