psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
spu.h
Go to the documentation of this file.
1
9#ifndef __LV2_SPU_H__
10#define __LV2_SPU_H__
11
12#include <ppu-types.h>
13
15#define SPU_SEGMENT_TYPE_COPY 0x01
17#define SPU_SEGMENT_TYPE_FILL 0x02
19#define SPU_SEGMENT_TYPE_INFO 0x04
20
21#define SPU_IMAGE_TYPE_USER 0x00
22#define SPU_IMAGE_TYPE_KERNEL 0x00
23
24#define SPU_IMAGE_PROTECT 0x00
25#define SPU_IMAGE_DIRECT 0x01
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
32typedef struct _sys_spu_segment
33{
41 u32 type;
42 u32 lsStart;
43 u32 size;
45 union {
50 u32 value;
51 };
53
62
63
64s32 sysSpuElfGetInformation(const void *elf,u32 *entryPoint,u32 *segmentCount);
65s32 sysSpuElfGetSegments(const void *elf,sysSpuSegment *segments,u32 segmentCount);
66
77s32 sysSpuRawLoad(sys_raw_spu_t spu,const char *path,u32 *entryPoint);
78
87s32 sysSpuRawImageLoad(sys_raw_spu_t spu,sysSpuImage *image);
88
96
107s32 sysSpuImageImport(sysSpuImage *image,const void *elf,u32 type);
116s32 sysSpuPrintfInitialize(int prio, void (*entry)(void*));
117
124s32 sysSpuPrintfAttachGroup(sys_spu_group_t group);
125
132s32 sysSpuPrintfDetachGroup(sys_spu_group_t group);
133
140s32 sysSpuPrintfAttachThread(sys_spu_thread_t thread);
141
148s32 sysSpuPrintfDetachThread(sys_spu_thread_t thread);
149
156
157s32 sysSpuImageOpenELF(sysSpuImage* image, const char* path);
158
159#ifdef __cplusplus
160 }
161#endif
162
163#endif
s32 sysSpuImageClose(sysSpuImage *image)
Close an opened SPU image file.
s32 sysSpuRawLoad(sys_raw_spu_t spu, const char *path, u32 *entryPoint)
Load a SPU program file into a raw SPU's local store.
s32 sysSpuImageOpenELF(sysSpuImage *image, const char *path)
s32 sysSpuPrintfDetachGroup(sys_spu_group_t group)
Disable Spu printf service from each of the SPU thread in the specified SPU thread group.
s32 sysSpuPrintfInitialize(int prio, void(*entry)(void *))
Initialize Spu printf service on ppu.
s32 sysSpuElfGetInformation(const void *elf, u32 *entryPoint, u32 *segmentCount)
struct _sys_spu_image sysSpuImage
SPU image data structure.
s32 sysSpuImageImport(sysSpuImage *image, const void *elf, u32 type)
Import a SPU image from an ELF file in memory.
s32 sysSpuPrintfAttachGroup(sys_spu_group_t group)
Enable Spu printf service from each of the SPU thread in the specified SPU thread group.
s32 sysSpuElfGetSegments(const void *elf, sysSpuSegment *segments, u32 segmentCount)
s32 sysSpuRawImageLoad(sys_raw_spu_t spu, sysSpuImage *image)
Load a SPU image into a raw SPU's local store.
struct _sys_spu_segment sysSpuSegment
SPU segment data structure.
s32 sysSpuPrintfAttachThread(sys_spu_thread_t thread)
Enable Spu printf service in the specified SPU thread.
s32 sysSpuPrintfFinalize()
Terminate Spu printf service.
s32 sysSpuPrintfDetachThread(sys_spu_thread_t thread)
Disable Spu printf service in the specified SPU thread.
SPU image data structure.
Definition spu.h:56
u32 entryPoint
entry point
Definition spu.h:58
u32 segments
address of segments
Definition spu.h:59
u32 segmentCount
number of segments
Definition spu.h:60
u32 type
type
Definition spu.h:57
SPU segment data structure.
Definition spu.h:33
u32 value
fill value if type is SPU_SEGMENT_TYPE_FILL
Definition spu.h:50
u32 lsStart
start address in local store
Definition spu.h:42
u32 paStart
start address in main memory to be copied if type is SPU_SEGMENT_TYPE_COPY
Definition spu.h:48