Difference between revisions of "DSP:WriteProcessPipe"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x000D0082] |- | 1 | numb |- | 2 | size |- | 3 | 0x402 | (size <<14) |- | 4 | buff...")
 
(Add buffer details)
 
(6 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| numb
+
| Channel
 
|-
 
|-
 
| 2
 
| 2
| size
+
| Size
 
|-
 
|-
 
| 3
 
| 3
| 0x402 | (size <<14)
+
| (Size << 14) <nowiki>|</nowiki> 0x402
 
|-
 
|-
 
| 4
 
| 4
| buffer
+
| Buffer
 
|}
 
|}
  
Line 31: Line 31:
 
|-
 
|-
 
| 1
 
| 1
| Resultcode
+
| Result code
 
|}
 
|}
 +
 +
=Usage Notes=
 +
 +
One should call [[DSP:SetSemaphore]] with an argument of `0x4000`, then wait on the related [[DSP:RegisterInterruptEvents|interrupt event]].
 +
 +
==enum Channel==
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Channel
 +
!  Id
 +
|-
 +
| DEBUG
 +
| 0
 +
|-
 +
| DMA
 +
| 1
 +
|-
 +
| AUDIO
 +
| 2
 +
|-
 +
| BINARY
 +
| 3
 +
|}
 +
 +
==Buffer==
 +
When <code>Channel == AUDIO</code>,
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x0
 +
| 2
 +
| Unknown
 +
|-
 +
| 0x2
 +
| 2
 +
| Change DSP state
 +
|}
 +
 +
When <code>Channel == BINARY</code>,
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x0
 +
| 2
 +
| Codec enum
 +
|-
 +
| 0x2
 +
| 2
 +
| Codec Command
 +
|-
 +
| 0x4
 +
| 4
 +
| Result (0 = Success; 1 = Failed)
 +
|-
 +
| 0x8
 +
| 24
 +
| Command Args
 +
|}
 +
 +
===Command Args===

Latest revision as of 17:01, 2 July 2023

Request[edit]

Index Word Description
0 Header code [0x000D0082]
1 Channel
2 Size
3 (Size << 14) | 0x402
4 Buffer

Response[edit]

Index Word Description
0 Header code
1 Result code

Usage Notes[edit]

One should call DSP:SetSemaphore with an argument of `0x4000`, then wait on the related interrupt event.

enum Channel[edit]

Channel Id
DEBUG 0
DMA 1
AUDIO 2
BINARY 3

Buffer[edit]

When Channel == AUDIO,

Offset Size Description
0x0 2 Unknown
0x2 2 Change DSP state

When Channel == BINARY,

Offset Size Description
0x0 2 Codec enum
0x2 2 Codec Command
0x4 4 Result (0 = Success; 1 = Failed)
0x8 24 Command Args

Command Args[edit]