Usec2Sysclock fixes

This commit is contained in:
Henrik Rydgard 2013-02-03 22:14:19 +01:00
parent 7fbf914821
commit 3f0816cd05
3 changed files with 9 additions and 10 deletions

View File

@ -617,11 +617,10 @@ const HLEFunction ThreadManForUser[] =
{0xDAA3F564,WrapI_IU<sceKernelReferAlarmStatus>,"sceKernelReferAlarmStatus"},
{0xba6b92e2,WrapI_UUU<sceKernelSysClock2USec>,"sceKernelSysClock2USec"},
{0x110DEC9A,0,"sceKernelUSec2SysClock"},
{0xC8CD158C,WrapU_U<sceKernelUSec2SysClockWide>,"sceKernelUSec2SysClockWide"},
{0x110dec9a,WrapI_UU<sceKernelUSec2SysClock>,"sceKernelUSec2SysClock"},
{0xC8CD158C,WrapU64_U<sceKernelUSec2SysClockWide>,"sceKernelUSec2SysClockWide"},
{0xE1619D7C,WrapI_UUUU<sceKernelSysClock2USecWide>,"sceKernelSysClock2USecWide"},
{0x110dec9a,WrapI_UU<sceKernelUSec2SysClock>,"sceKernelUSec2SysClock"},
{0x278C0DF5,WrapI_IU<sceKernelWaitThreadEnd>,"sceKernelWaitThreadEnd"},
{0xd59ead2f,sceKernelWakeupThread,"sceKernelWakeupThread"}, //AI Go, audio?

View File

@ -90,6 +90,12 @@ int sceKernelUSec2SysClock(u32 microsec, u32 clockPtr)
return 0;
}
u64 sceKernelUSec2SysClockWide(u32 usec)
{
DEBUG_LOG(HLE, "sceKernelUSec2SysClockWide(%i)", usec);
return usec; // ?
}
int sceKernelSysClock2USec(u32 sysclockPtr, u32 highPtr, u32 lowPtr)
{
DEBUG_LOG(HLE, "sceKernelSysClock2USec(clock = %08x, lo = %08x, hi = %08x)", sysclockPtr, highPtr, lowPtr);
@ -114,12 +120,6 @@ int sceKernelSysClock2USecWide(u32 lowClock, u32 highClock, u32 lowPtr, u32 high
return 0;
}
u32 sceKernelUSec2SysClockWide(u32 usec)
{
DEBUG_LOG(HLE, "sceKernelUSec2SysClockWide(%i)", usec);
return usec * 1000000; // ?
}
u32 sceKernelLibcClock()
{
u32 retVal = (u32) (CoreTiming::GetTicks() / CoreTiming::GetClockFrequencyMHz());

View File

@ -25,7 +25,7 @@ u32 sceKernelGetSystemTimeLow();
u64 sceKernelGetSystemTimeWide();
int sceKernelSysClock2USec(u32 sysclockPtr, u32 highPtr, u32 lowPtr);
int sceKernelSysClock2USecWide(u32 lowClock, u32 highClock, u32 lowPtr, u32 highPtr);
u32 sceKernelUSec2SysClockWide(u32 usec);
u64 sceKernelUSec2SysClockWide(u32 usec);
u32 sceKernelLibcClock();
void __KernelTimeInit();