02-20-2012, 08:48 AM
(02-19-2012, 11:56 AM)freefive Wrote: the scePower says that:
// PLL clock:
// Operates at fixed rates of 148MHz, 190MHz, 222MHz, 266MHz, 333MHz.
// Starts at 222MHz.
protected int pllClock = 222;
// CPU clock:
// Operates at variable rates from 1MHz to 333MHz.
// Starts at 222MHz.
// Note: Cannot have a higher frequency than the PLL clock's frequency.
protected int cpuClock = 222;
// BUS clock:
// Operates at variable rates from 37MHz to 166MHz.
// Starts at 111MHz.
// Note: Cannot have a higher frequency than 1/2 of the PLL clock's frequency
// or lower than 1/4 of the PLL clock's frequency.
protected int busClock = 111;
Well the references of "cpuClock" only occur in scePower.java. Which means they are just dummy values used to make some firmware functions return them happily when they ask for their values.
JPCSP is running the game the fastest it can regardless those values.
Again, there may be several factors where it is not perfect :
- VFPU is only interpreted AFAIK (suboptimal whatever you attempt).
- the synchronization between threads might lead to a poor parallelization of tasks (i had this vague feeling when reading how GE thread and CPU thread interact).
- Again, Java as fast as C is a myth. Those people who claimed Java is as fast as C are cheaters : they compared with a C binary compiled with no aggressive optimization, that is, a code even not intended for a release but usually for debug.