Emulators Speed Up Hack


craigix

Mega GP Mania
Joined
Feb 3, 2003
Messages
11,008
Location
England
Website
twitter.com
Following on from the mmu hack, this might speed things up even more...

We want to hear if these settings speed up emulators on your unit, or crash it, or slow it down etc.

Launch the cpu changer with (change for your path/file name obviously):

/mnt/sd/cpu_speed --upll --timing 1 --cpuclk 266 --trc 6 --tras 4 --twr 1 --tmrd 1 --trfc 1 --trp 2 --trcd 2

and report back if the emulator speed is faster/slower than just launching with 266mhz 'normal'.

Thanks,

Craig
 
what do the settings mean? what are all those parameters? just out of interest...
 
It just tightens the RAM timings so the CPU and RAM can communicate with less idle cycles in between. I tried it a while ago, with no noticable effect. RAM timings do extremely little when adjusted on PCs, too-- and often cause major stability problems. But it's still worth giving them a little tweaking if all stays stable.

One big thing to try, though, is changing your RAM divisor to 3 instead of 2 if you go past 266 MHz. Your RAM then will not be overclocked as well when you exceed 266. The rating for the SDRAM is 133 MHz, so at 200 Mhz, it is underclocked (200/2 = 100 Mhz.) At 266 Mhz it runs at full speed. At, say, 280 MHz, it's at 140 MHz. Go to 300 MHz with a Ram Divisor of 3 and you get just 100 Mhz RAM clock and possibly higher stability. Give it a shot.
 
woogal posted on Sep 30 2006 at 11:57 PM said:
Don't care about emulators, but on quake a standard 266mhz benchmarks at 16.7. These settings benchmark at 17.8 :).

Nice :)

Now... emulators?
 
Last edited by a moderator:
Epicenter posted on Oct 1 2006 at 12:37 AM said:
One big thing to try, though, is changing your RAM divisor to 3 instead of 2 if you go past 266 MHz. Your RAM then will not be overclocked as well when you exceed 266. The rating for the SDRAM is 133 MHz, so at 200 Mhz, it is underclocked (200/2 = 100 Mhz.) At 266 Mhz it runs at full speed. At, say, 280 MHz, it's at 140 MHz. Go to 300 MHz with a Ram Divisor of 3 and you get just 100 Mhz RAM clock and possibly higher stability. Give it a shot.
Ram already runs at half the cpu and according to the readme ramdiv just divides that even further. Using cpu_speed, 300mhz cpu with a ramdiv of 3 will be 50mhz ram not 100mhz.
 
Last edited by a moderator:
My mistake; I used it a long time ago (it didn't get me any higher than 305 Mhz with stability but I wasn't expecting that) so I'm a bit fuzzy on the details. I don't see a problem with a setting of 2 for a RAM clock of 75 MHz instead of 150 MHz with a CPU clock of 300 MHz, for example. Slower RAM access, sure, but it might be more beneficial in CPU-bound apps.
 
I've done some quick test with gngeo (@266 with sound, samplerate set to 11025)
I got approximativly a 9fps increase. :eek:
 
strange thing....I get like 10fps slowdown in Squidgesnes but I can actually overclock to 266 while without these extra options I can only go to 255 (I have gp2x mk1 not FE)
 
Okay, at the risk of sounding stoopid, how do I setup a batch file on the GP2X to launch this? Do I just create something like start.gpe with the following in it:
/mnt/sd/Util/cpu/cpu_speed --upll --timing 1 --cpuclk 266 --trc 6 --tras 4 --twr 1 --tmrd 1 --trfc 1 --trp 2 --trcd 2

If so I have done that and all I get is a blank screen :(
 
Epicenter posted on Oct 1 2006 at 12:17 AM said:
My mistake; I used it a long time ago (it didn't get me any higher than 305 Mhz with stability but I wasn't expecting that) so I'm a bit fuzzy on the details. I don't see a problem with a setting of 2 for a RAM clock of 75 MHz instead of 150 MHz with a CPU clock of 300 MHz, for example. Slower RAM access, sure, but it might be more beneficial in CPU-bound apps.
well it would be wise to to the same as i do for pc :
1/ checking the CPU's limit (let's say 300mhz for example)
2/ checking the RAM limit (something like 140? )

then applying the settings that are slose but not over those limits
but is the "cpu divider" the same setting as the "ram divider" ? they both say "the cpu clock will be divided by this value" ?

WarmFluffyUK posted on Oct 1 2006 at 09:17 AM said:
Okay, at the risk of sounding stoopid, how do I setup a batch file on the GP2X to launch this? Do I just create something like start.gpe with the following in it:
/mnt/sd/Util/cpu/cpu_speed --upll --timing 1 --cpuclk 266 --trc 6 --tras 4 --twr 1 --tmrd 1 --trfc 1 --trp 2 --trcd 2

If so I have done that and all I get is a blank screen :(

make a GPU file containing this:

Code:
#!/bin/sh

/mnt/sd/cpu_speed.gpe put your settings here
cd /mnt/sd/yourappfolder/
./yourapp.gpe
sync

cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu

so the GPU launches your app directly with the tuned settings (or the gp2x menu resets your frequencies :p )
 
Last edited by a moderator:
Thanks nik166, that worked perfectly.

Craig I just tried Quake and uae4all. Both definately appeared smoother with those settings.

Addition:
I just tried Squidge SNES, playing Bubsy it was averaging around 10 to 20 FPS. After applying your speed up hack, I got an average of 40 to 50 FPS. The game was very smooth indeed :)
 
WarmFluffyUK posted on Oct 1 2006 at 10:15 AM said:
I just tried Squidge SNES, playing Bubsy it was averaging around 10 to 20 FPS. After applying your speed up hack, I got an average of 40 to 50 FPS. The game was very smooth indeed :)

Most of that increase will be purely due to overclocking -- default for SquidgeSNES is 200mhz, and using that script will run at 266mhz. Try it at 266mhz with and without just the RAM tweaks (everything after cpuclk 266) to observe the diff.
 
Last edited by a moderator:
just while we are chatting about CPU Clock speeds, when I set something to a speed from GMenu2x it actually runs at that speed right? Or does it get reset after start?
 
To the dividers:

You have a Clockgen calles F-Clock (fpll) which is used for the CPU, system bus and ram (and LCD in FWs before 1.4) and runs at a specific rate ... 200mhz normally. Then you have a D-Clock which connects do the F-Clock and has the same frequency, but provides the frequency for the B-clock. The B-Clock has half the frequency of D-Clock and is the clock-source of the system Bus and the RAM. So the RAM and the Bus normally are clocked with 100mhz.

Now you have 3 dividers for this setup: DCLKDIV, A920TFDIV and A940TFDIV. The first one regulates the D-Clock.... if you set the divider from 1 to 2 (1 to the register), you get the half of the normal D and B-Clock ... which is half the normal frequency for D and a quarter for the B-clock. The Same goes for the other dividers ... which regulate the two CPU-clocks.
If you overclock the gp2x with the tweaker, you adjust the F-clock ... so you overclock not just the CPUs but the system-bus and the ram too. You can regulate the overclocking by using the dividers.
The maximal clockrate officially supported by the RAM should be 133MHZ (standard PC133 SD-RAM) ... but on most Systems it should be safe to overclock to 150mhz RAM-clock.
 
so by default, we just touch the FPLL, kinda like raising the ram speed on a PC, with 2 as multiplier, right?

for 266mhz on the CPU the ram is clocked 133, right? (and everything else raised the same way..) that's the easy part,

the one i don't get is the other dividers :p
the "cpu divider" is just dividing the CPU speed by the number?
like cpu to 266 with divider 2 makes cpu AND ram running at 133 together ? or is it also dividing the ram too, making the option totally useless ?
 
i get a 3 frame increase in super mario kart. from 18 fps to 21 fps... its now quite playble yea!

edit:
but i get those scanlines now.. the issue with the lcd you know. how can i insert different timings now?
 
Back
Top