coastline 0.0.4
Loading...
Searching...
No Matches
sptask.h File Reference

RSP tasks. More...

#include <PR/ultratypes.h>
Include dependency graph for sptask.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OSTask_t
 A task for the RSP: its microcode, its stack and output buffers, and the data it runs. More...
union  OSTask
 A task for the RSP, aligned to 8 bytes. More...

Macros

#define OS_TASK_YIELDED   0x0001
#define OS_TASK_DP_WAIT   0x0002
#define OS_TASK_LOADABLE   0x0004
#define OS_TASK_SP_ONLY   0x0008
#define OS_YIELD_DATA_SIZE   0xC00
 The bytes of the buffer a yielding graphics task saves its state to.
#define M_GFXTASK   1
 The type of a graphics task.
#define SP_UCODE_SIZE   4096
#define SP_UCODE_DATA_SIZE   2048
#define SP_DRAM_STACK_SIZE8   0x400

Functions

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 IMEM.
void osSpTaskStartGo (OSTask *tp)
 Start the RSP on the task osSpTaskLoad() loaded.

Variables

OSTask tmp_task
 The physical copy of the last task osSpTaskLoad() loaded.

Detailed Description

RSP tasks.

Macro Definition Documentation

◆ OS_TASK_YIELDED

#define OS_TASK_YIELDED   0x0001

The task yielded and resumes from its yield buffer.

◆ OS_TASK_DP_WAIT

#define OS_TASK_DP_WAIT   0x0002

The task waits for the RDP before it ends.

◆ OS_TASK_LOADABLE

#define OS_TASK_LOADABLE   0x0004

The microcode of the task loads further microcode.

◆ OS_TASK_SP_ONLY

#define OS_TASK_SP_ONLY   0x0008

The task runs on the RSP alone.

◆ OS_YIELD_DATA_SIZE

#define OS_YIELD_DATA_SIZE   0xC00

The bytes of the buffer a yielding graphics task saves its state to.

◆ M_GFXTASK

#define M_GFXTASK   1

The type of a graphics task.

◆ SP_UCODE_SIZE

#define SP_UCODE_SIZE   4096

The bytes of the microcode text a task loads.

◆ SP_UCODE_DATA_SIZE

#define SP_UCODE_DATA_SIZE   2048

The bytes of the microcode data a task loads.

◆ SP_DRAM_STACK_SIZE8

#define SP_DRAM_STACK_SIZE8   0x400

The bytes of the matrix stack of the microcode.

Function Documentation

◆ osSpTaskLoad()

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 IMEM.

A yielded task resumes from its yield buffer.

Parameters
tpThe task, with virtual addresses. Its OS_TASK_YIELDED flag is cleared.
Ghidra address:
USA: 0x80264c7c
Ghidra address:
Asia: 0x802647CC
Ghidra address:
EUR: 0x8026640c
Ghidra address:
JPN: 0x80265f0c

◆ osSpTaskStartGo()

void osSpTaskStartGo ( OSTask * tp)

Start the RSP on the task osSpTaskLoad() loaded.

Parameters
tpThe task loaded, not read.
Ghidra address:
USA: 0x80264e0c
Ghidra address:
Asia: 0x8026495C
Ghidra address:
EUR: 0x8026659c
Ghidra address:
JPN: 0x8026609c

Variable Documentation

◆ tmp_task

OSTask tmp_task
extern

The physical copy of the last task osSpTaskLoad() loaded.

Ghidra address:
USA: 0x8037f330
Ghidra address:
Asia: 0x8037EDE0
Ghidra address:
EUR: 0x80381270
Ghidra address:
JPN: 0x8037fee0