0 Members and 2 Guests are viewing this topic.
void set_cpu_150_mhz() { *(volatile unsigned*) 0x900B0000 = 0x00000002; *(volatile unsigned*) 0x900B000C = 4;}void set_cpu_90_mhz() { *(volatile unsigned*) 0x900B0000 = 0x00141002; *(volatile unsigned*) 0x900B000C = 4;}
#define SPEED_150MHZ 0x00000002#define SPEED_90MHZ 0x00141002unsigned set_cpu_speed(unsigned speed) { unsigned lastSpeed = *(volatile unsigned*) 0x900B0000; *(volatile unsigned*) 0x900B0000 = speed; *(volatile unsigned*) 0x900B000C = 4; return lastSpeed;}
unsigned speedBackup = set_cpu_speed(SPEED_150MHZ);//Code goes hereset_cpu_speed(speedBackup);
since v3.0. speed is one of CPU_SPEED_150MHZ, CPU_SPEED_120MHZ, CPU_SPEED_90MHZ. Returns the previous speed. You must restore the original speed before the program exits.
I suppose we could have a single function oc_cpu(bool), where true overclocks, while saving the original speed in a static variable, and false resets the cpu to its original state.
Also, how about functions for accessing the timers?
QuoteI suppose we could have a single function oc_cpu(bool), where true overclocks, while saving the original speed in a static variable, and false resets the cpu to its original state.Well, there's more than one overclocking clock frequency, so "bool" wouldn't do
Hey ExtendeD, what about being able to open the Scratchpad while in a game/program? I'd love that
Also, would it be possible to speed up the game like in some computer emulators?
But being able to suspend the current program execution and restore it would be possible. Maybe I could expose an API for this?