mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Fake real cpu frequencies as well
This commit is contained in:
1 parent
8b8cc2fea6
commit
aef53708dd
1 file changed
+10
-9
+10
-9
@@ -45,6 +45,7 @@ static int powerCbSlots[numberOfCBPowerSlots];
|
||||
|
||||
// this should belong here on in CoreTiming?
|
||||
static int pllFreq = 222;
|
||||
static int cpuFreq = 222;
|
||||
static int busFreq = 111;
|
||||
|
||||
void __PowerInit() {
|
||||
@@ -217,15 +218,16 @@ int sceKernelVolatileMemLock(int type, int paddr, int psize) {
|
||||
}
|
||||
|
||||
|
||||
void scePowerSetClockFrequency(u32 pllfreq, u32 cpufreq, u32 busfreq) {
|
||||
CoreTiming::SetClockFrequencyMHz(cpufreq);
|
||||
u32 scePowerSetClockFrequency(u32 pllfreq, u32 cpufreq, u32 busfreq) {
|
||||
pllFreq = pllfreq;
|
||||
busFreq = busfreq;
|
||||
cpuFreq = cpufreq;
|
||||
INFO_LOG(HLE,"scePowerSetClockFrequency(%i,%i,%i)", pllfreq, cpufreq, busfreq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 scePowerSetCpuClockFrequency(u32 cpufreq) {
|
||||
CoreTiming::SetClockFrequencyMHz(cpufreq);
|
||||
cpuFreq = cpufreq;
|
||||
DEBUG_LOG(HLE,"scePowerSetCpuClockFrequency(%i)", cpufreq);
|
||||
return 0;
|
||||
}
|
||||
@@ -237,9 +239,8 @@ u32 scePowerSetBusClockFrequency(u32 busfreq) {
|
||||
}
|
||||
|
||||
u32 scePowerGetCpuClockFrequencyInt() {
|
||||
int freq = CoreTiming::GetClockFrequencyMHz();
|
||||
DEBUG_LOG(HLE,"%i=scePowerGetCpuClockFrequencyInt()", freq);
|
||||
return freq;
|
||||
DEBUG_LOG(HLE,"%i=scePowerGetCpuClockFrequencyInt()", cpuFreq);
|
||||
return cpuFreq;
|
||||
}
|
||||
|
||||
u32 scePowerGetPllClockFrequencyInt() {
|
||||
@@ -302,11 +303,11 @@ static const HLEFunction scePower[] = {
|
||||
{0xBD681969,WrapU_V<scePowerGetBusClockFrequencyInt>,"scePowerGetBusClockFrequencyInt"},
|
||||
{0xB1A52C83,0,"scePowerGetCpuClockFrequencyFloat"},
|
||||
{0x9BADB3EB,0,"scePowerGetBusClockFrequencyFloat"},
|
||||
{0x737486F2,WrapV_UUU<scePowerSetClockFrequency>,"scePowerSetClockFrequency"},
|
||||
{0x737486F2,WrapU_UUU<scePowerSetClockFrequency>,"scePowerSetClockFrequency"},
|
||||
{0x34f9c463,WrapU_V<scePowerGetPllClockFrequencyInt>,"scePowerGetPllClockFrequencyInt"},
|
||||
{0xea382a27,0,"scePowerGetPllClockFrequencyFloat"},
|
||||
{0xebd177d6,WrapV_UUU<scePowerSetClockFrequency>,"scePower_driver_EBD177D6"}, //TODO: used in a few places, jpcsp says is the same as scePowerSetClockFrequency
|
||||
{0x469989ad,WrapV_UUU<scePowerSetClockFrequency>,"scePower_469989ad"}, // This is also the same as SetClockFrequency
|
||||
{0xebd177d6,WrapU_UUU<scePowerSetClockFrequency>,"scePower_driver_EBD177D6"}, //TODO: used in a few places, jpcsp says is the same as scePowerSetClockFrequency
|
||||
{0x469989ad,WrapU_UUU<scePowerSetClockFrequency>,"scePower_469989ad"}, // This is also the same as SetClockFrequency
|
||||
{0xa85880d0,WrapU_V<IsPSPNonFat>,"scePower_a85880d0_IsPSPNonFat"},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user