11#include <irx_imports.h>
38static int start_thread(
void (*func)(
void *),
int size,
int attr,
int prio,
void *argp)
44 thread_param.attr = attr;
45 thread_param.thread = func;
46 thread_param.priority = prio;
47 thread_param.stacksize = size;
48 thread_param.option = 0;
49 thid = CreateThread(&thread_param);
52 printf(
"CreateThread (%d)\n", thid);
55 r = StartThread(thid, argp);
58 printf(
"StartThread (%d)\n", r);
65static void *sce_actest(
unsigned int fno,
void *data,
int size)
86 ret =
sceCdRI(datat->data.id, (u32 *)&(datat->ret));
91 ret =
sceCdWI(datat->data.id, (u32 *)&(datat->ret));
96 printf(
"sce_hddtest: unrecognized code %x\n", fno);
105void sce_hddtest_loop(
void *arg)
109 sceSifSetRpcQueue(&qd, GetThreadId());
110 sceSifRegisterRpc(&sd, 0xFFFF, (SifRpcFunc_t)sce_actest, &buffer, 0, 0, &qd);
114int _start(
int argc,
char **argv)
119 return start_thread(sce_hddtest_loop, 0x1000, 0x2000000, 32, 0) < 0;
int sceCdReadClock(sceCdCLOCK *clock)
int sceCdWI(const u8 *buffer, u32 *result)
int sceCdRI(u8 *buffer, u32 *result)
int sceCdWriteClock(sceCdCLOCK *clock)