coastline 0.0.4
Loading...
Searching...
No Matches
sptask.h
Go to the documentation of this file.
1#ifndef PR_SPTASK_H
2#define PR_SPTASK_H
3
8
9#include <PR/ultratypes.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#if TGR_BOSS_RALLY
16struct GbiCommand;
17#endif
18
42
44typedef union {
47} OSTask;
48
49/* The flags of a task. */
50#define OS_TASK_YIELDED 0x0001
51#define OS_TASK_DP_WAIT 0x0002
52#define OS_TASK_LOADABLE 0x0004
53#define OS_TASK_SP_ONLY 0x0008
54
56#define OS_YIELD_DATA_SIZE 0xC00
57
59#define M_GFXTASK 1
60
61/* The sizes of what an RSP task loads. */
62#define SP_UCODE_SIZE 4096
63#define SP_UCODE_DATA_SIZE 2048
64#define SP_DRAM_STACK_SIZE8 0x400
65
74extern OSTask tmp_task;
75
82OSTask *_VirtualToPhysicalTask(OSTask *intp);
83
95
106
113void __osSpSetStatus(u32 data);
114
121s32 __osSpSetPc(u32 pc);
122
129s32 __osSpRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size);
130
137u32 __osSpDeviceBusy(void);
138
139#ifdef __cplusplus
140}
141#endif
142
143#endif /* PR_SPTASK_H */
void osSpTaskLoad(OSTask *tp)
Load a task into the RSP, copying its header to the end of the DMEM and its boot microcode to the IME...
OSTask tmp_task
The physical copy of the last task osSpTaskLoad() loaded.
void osSpTaskStartGo(OSTask *tp)
Start the RSP on the task osSpTaskLoad() loaded.
A command of a display list of the game.
Definition gbicommand.h:30
A task for the RSP: its microcode, its stack and output buffers, and the data it runs.
Definition sptask.h:20
u64 * ucode
Definition sptask.h:25
u64 * data_ptr
Definition sptask.h:36
u32 yield_data_size
Definition sptask.h:40
u32 flags
Definition sptask.h:22
u64 * ucode_boot
Definition sptask.h:23
u32 ucode_data_size
Definition sptask.h:28
u64 * yield_data_ptr
Definition sptask.h:39
u32 type
Definition sptask.h:21
u64 * ucode_data
Definition sptask.h:27
u64 * output_buff_size
Definition sptask.h:32
u32 data_size
Definition sptask.h:38
u32 ucode_size
Definition sptask.h:26
u64 * output_buff
Definition sptask.h:31
u32 ucode_boot_size
Definition sptask.h:24
u32 dram_stack_size
Definition sptask.h:30
u64 * dram_stack
Definition sptask.h:29
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
int s32
Definition ultratypes.h:25
unsigned long long u64
Definition ultratypes.h:21
A task for the RSP, aligned to 8 bytes.
Definition sptask.h:44
OSTask_t t
Definition sptask.h:45
long long int force_structure_alignment
Definition sptask.h:46