Omnimaga > Ndless

Ndless suggestions thread

(1/11) > >>

fb39ca4:
What are some things you would like to see in the next version of ndless? I'm thinking more along the lines of functions and stuff, not major changes like a permanent installation.

Here's my first one:

--- Code: (Functions for overclocking and returning CPU to original speed) ---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;
}

--- End code ---

calc84maniac:
Original CPU speed isn't 90MHz on all OSes. It's probably possible to return the previous value from the function, though.

Edit: I guess it could go something like

--- Code: ---#define SPEED_150MHZ 0x00000002
#define SPEED_90MHZ 0x00141002

unsigned set_cpu_speed(unsigned speed) {
  unsigned lastSpeed = *(volatile unsigned*) 0x900B0000;
  *(volatile unsigned*) 0x900B0000 = speed;
  *(volatile unsigned*) 0x900B000C = 4;
  return lastSpeed;
}
--- End code ---

And then you'd use it like:

--- Code: ---unsigned speedBackup = set_cpu_speed(SPEED_150MHZ);

//Code goes here

set_cpu_speed(speedBackup);
--- End code ---

ExtendeD:
I like this thread :)

Thanks for this patch, here it is on the Ndless's SVN: http://hackspire.unsads.com/wiki/index.php/Libndls#CPU
Shouldn't CPU_SPEED_90MHZ be 0x00145002, as on OS < 2.1 according to this?
And is this one correct: #define CPU_SPEED_120MHZ 0x000A1002 ?

SolusIpse:

--- Quote from: hackspire ---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.
--- End quote ---

I wonder if this means Ndless 3.0 is almost ready?

DJ Omnimaga:
I hope so, although I understand it might be hard to achieve with everything TI did to block it.

If it comes out soon this will make a lot of people happy for school restart, though. We are already getting a bunch of new members lately O.O

Navigation

[0] Message Index

[#] Next page

Go to full version