NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
dsp_task.h
1
#ifndef RVL_SDK_DSP_TASK_H
2
#define RVL_SDK_DSP_TASK_H
3
#include <types.h>
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
#define DSP_SEND_MAIL_SYNC(x) \
9
do { \
10
DSPSendMailToDSP((DSPMail)(x)); \
11
while (DSPCheckMailToDSP()) { \
12
; \
13
} \
14
} while (0)
15
16
// Forward declarations
17
typedef
struct
DSPTask
DSPTask
;
18
typedef
struct
OSContext
OSContext
;
19
20
typedef
enum
{
21
DSP_TASK_ACTIVE = (1 << 0),
22
DSP_TASK_CANCELED = (1 << 1),
23
} DSPTaskFlags;
24
25
typedef
enum
{
26
DSP_TASK_STATE_0,
27
DSP_TASK_STATE_1,
28
DSP_TASK_STATE_2,
29
DSP_TASK_STATE_3,
30
} DSPTaskState;
31
32
typedef
void (*DSPTaskCallback)(
DSPTask
* task);
33
34
typedef
struct
DSPTask
{
35
u32 state;
// at 0x0
36
volatile
u32 prio;
// at 0x4
37
u32 flags;
// at 0x8
38
void
* iramMmemAddr;
// at 0xC
39
u32 iramMmemLen;
// at 0x10
40
uintptr_t iramDspAddr;
// at 0x14
41
void
* dramMmemAddr;
// at 0x18
42
u32 dramMmemLen;
// at 0x1C
43
uintptr_t dramDspAddr;
// at 0x20
44
u16 startVector;
// at 0x24
45
u16 resumeVector;
// at 0x26
46
DSPTaskCallback initCallback;
// at 0x28
47
DSPTaskCallback resumeCallback;
// at 0x2C
48
DSPTaskCallback doneCallback;
// at 0x30
49
DSPTaskCallback requestCallback;
// at 0x34
50
DSPTask
* next;
// at 0x38
51
DSPTask
* prev;
// at 0x3C
52
char
UNK_0x40[0x50 - 0x40];
53
}
DSPTask
;
54
55
extern
BOOL __DSP_rude_task_pending;
56
extern
DSPTask
* __DSP_rude_task;
57
extern
DSPTask
* __DSP_tmp_task;
58
extern
DSPTask
* __DSP_last_task;
59
extern
DSPTask
* __DSP_first_task;
60
extern
DSPTask
* __DSP_curr_task;
61
62
void
__DSPHandler(s16 intr,
OSContext
* ctx);
63
void
__DSP_exec_task(
DSPTask
* task1,
DSPTask
* task2);
64
void
__DSP_boot_task(
DSPTask
* task);
65
void
__DSP_insert_task(
DSPTask
* task);
66
void
__DSP_remove_task(
DSPTask
* task);
67
68
#ifdef __cplusplus
69
}
70
#endif
71
#endif
DSPTask
Definition
dsp_task.h:34
OSContext
Definition
OSContext.h:12
include
lib
revolution
DSP
dsp_task.h
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2