31void *apaAllocMem(
int size)
38 mem = AllocSysMemory(ALLOC_FIRST, size, NULL);
40 APA_PRINTF(APA_DRV_NAME
": error: out of memory\n");
49void apaFreeMem(
void *ptr)
68 0, 7, 6, 5, 4, 3, 2000
71 for(i = 0; i < 20; i++)
77 if(ret!=0 && cdtime.
stat==0)
79 timeBuf.sec=btoi(cdtime.
second);
80 timeBuf.min=btoi(cdtime.
minute);
81 timeBuf.hour=btoi(cdtime.
hour);
82 timeBuf.day=btoi(cdtime.
day);
83 timeBuf.month=btoi(cdtime.
month & 0x7F);
84 timeBuf.year=btoi(cdtime.
year) + 2000;
87 if(!(cdtime.
stat & 0x80))
100 rawtime += (-9 * 60 * 60);
102 gmtime_s(&timeinfo, &rawtime);
104 gmtime_r(&rawtime, &timeinfo);
107 tm->sec = timeinfo.tm_sec;
108 tm->min = timeinfo.tm_min;
109 tm->hour = timeinfo.tm_hour;
110 tm->day = timeinfo.tm_mday;
111 tm->month = timeinfo.tm_mon + 1;
112 tm->year = timeinfo.tm_year + 1900;
118int apaGetIlinkID(u8 *idbuf)
127 memset(idbuf, 0, 32);
128 if((
sceCdRI(idbuf, &stat) != 0) && (stat == 0))
139 APA_PRINTF(APA_DRV_NAME
": Error: cannot get id\n");
142 memset(idbuf, 0, 32);
int CpuResumeIntr(int state)
int CpuSuspendIntr(int *state)
int sceCdReadClock(sceCdCLOCK *clock)
int sceCdRI(u8 *buffer, u32 *result)