Hello,
can you replace function _psp_ticks_to_time in psp_tkti.c and rebuild psp and test this:
boolean _psp_ticks_to_time
(
/* [IN] Pointer to the tick struct to store the results in */
PSP_TICK_STRUCT_PTR tick_ptr,
/* [OUT] Pointer to the time struct to convert */
TIME_STRUCT_PTR time_ptr
)
{ /* Body */
uint_64 tmp, hwt;
uint_32 tps;
KERNEL_DATA_STRUCT_PTR kernel_data;
_GET_KERNEL_DATA(kernel_data);
tps = kernel_data->TICKS_PER_SECOND;
/* Saturate if ticks go out of range of time struct */
if ( (tick_ptr->TICKS[0] / tps) > MAX_UINT_32) {
time_ptr->SECONDS = MAX_UINT_32;
time_ptr->MILLISECONDS = 999;
return FALSE;
} /* Endif */
/* */
tmp = (tick_ptr->TICKS[0] * 1000) + (tick_ptr->HW_TICKS[0] * 1000 / kernel_data->HW_TICKS_PER_TICK);
tmp = tmp / tps;
time_ptr->SECONDS = tmp / 1000;
time_ptr->MILLISECONDS = tmp - time_ptr->SECONDS * 1000;
return TRUE;
} /* Endbody */
Regards,
MartinK