Overclock Script Problems


Vynx

Member
Joined
May 1, 2006
Messages
253
I've been looking over a thread about how to use scripts, so I downloaded the cpu speed program, and set up this script:

#!/bin/sh

/mnt/sd/cpu_speed.gpe 1 2 280
cd /mnt/sd/games/GP2X-Sand/
./sand.gpe
sync

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

Can anyone tell me what i'm doing wrong?

I run the script and all I get is a black screen.
 
Oops, I used windows text editor, apparantly it has to be saved as a unix type file. I'll try that first :)

EDIT: Worked, didn't need to alter the file, the script above works, it just needed to be saved as a UNIX type file. :)
 
Oops, I used windows text editor, apparantly it has to be saved as a unix type file. I'll try that first :)

EDIT: Worked, didn't need to alter the file, the script above works, it just needed to be saved as a UNIX type file. :)

Ok, new problem. Someone kindly explained to me how to get the program to log FPS, so I can test how well the performance increase is. It greats the output.txt file, but it's empty, any ideas?

#!/bin/sh

/mnt/sd/cpu_speed.gpe 1 2 275
cd /mnt/sd/Games/GP2X-Sand/
./sand.gpe > output.txt
sync

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

I'd appreciate it if someone could just give me a link to a good bash script tutorial :)
 
Last edited by a moderator:
does it output to stdout or stderr? Probably best to do:

./sand.gpe >output.txt 2>output2.txt

and see which one isn't empty
 
does it output to stdout or stderr? Probably best to do:

./sand.gpe >output.txt 2>output2.txt

and see which one isn't empty

You'll have to forgive me, I have no idea what it outputs to. (pretty new at this) The file output.txt is created in my game directory, but it's empty.

I'll try that new line now though, see if it helps.


Edit: output2.txt has logged a fair bit of information, but no mention of framerate - probably didn't leave it run for long enough.

Hm, why would it log to that text file but not the other?


Edit edit: Leaving it run longer didn't help, so I assume that this log doesn't give me the FPS the game is running at? This is what I got;

SDL_GP2X: CreateDevice
SDL_GP2X: VideoInit
SDL_GP2X: Physical screen = 320x240 (ilace = 0)
SDL_GP2X: Looking for a mouse
SDL_GP2X: No mice found
SDL_GP2X: Creating cursor 16x16
SDL_GP2X: Allocated WMcursor @ 0x14de50 (32)
SDL_GP2X: SurfaceManager allocating 256 bytes
SDL_GP2X: ListModes
SDL_GP2X: Setting video mode 320x240 16 bpp, flags=0
SDL_GP2X: FreeHWSurfaces
SDL_GP2X: InitHWSurfaces 0x40025800, 5085184
SDL_GP2X: Screen bucket 0x14d3d8
SDL_GP2X: First free bucket 0x14de50 (size = 5085184)
SDL_GP2X: Creating cursor 16x16
SDL_GP2X: Allocated WMcursor @ 0x14de78 (32)
SDL_GP2X: SurfaceManager allocating 256 bytes
SDL_GP2X: SurfaceManager adding new free bucket of 5084928 bytes @ 0x14de90
SDL_GP2X: SurfaceManager allocated 256 bytes at 0x40025800
SDL_GP2X: Freeing cursor 0x14de78
SDL_GP2X: SurfaceManager freeing 256 bytes @ 0x40025800 from bucket 0x14de50
SDL_GP2X: merging with next bucket (0x14de90) making 5085184 bytes
SDL_GP2X: VideoQuit
SDL_GP2X: FreeHWSurfaces
SDL_GP2X: Freeing bucket 0x14de50 (size 5085184)
SDL_GP2X: FreeHWSurface 0x14d510
SDL_GP2X: SurfaceManager freeing 153600 bytes @ 0x40000000 from bucket 0x14d3d8
SDL_GP2X: DeleteDevice
Unable to load font: Couldn't open
 
Last edited by a moderator:
I tried it myself and it's just plain odd. It prints the fps to the consol when I use it through telnet, but redirecting the stdout to output.txt gives me nothing, it doesn't get printed to the console or output.txt, so it gets directed but it doesn't get written.

Some SDL messages get printed to output.txt, what does SDL do that i don't? I just use a plain call to printf like this:

printf ("FPS: %i\n", fps);
 
Back
Top