//------------------------------------------------------------------------- void *rpcSCmd_cdreadclock(u32 fno, void *buf, int size) { // CD Read Clock RPC SCMD cdvdreadclock_res_t *r = (cdvdreadclock_res_t *)buf; r->result = sceCdReadClock(&r->rtc); return buf; }
int apaGetTime(apa_ps2time_t *tm) { sceCdCLOCK cdtime; apa_ps2time_t timeBuf={ 0, 7, 6, 5, 4, 3, 2000 }; if(sceCdReadClock(&cdtime)!=0 && cdtime.stat==0) { timeBuf.sec=btoi(cdtime.second); timeBuf.min=btoi(cdtime.minute); timeBuf.hour=btoi(cdtime.hour); timeBuf.day=btoi(cdtime.day); timeBuf.month=btoi(cdtime.month & 0x7F); //The old CDVDMAN sceCdReadClock() function does not automatically file off the highest bit. timeBuf.year=btoi(cdtime.year)+2000; } memcpy(tm, &timeBuf, sizeof(apa_ps2time_t)); return 0; }