GP2X Sdl Engines Optimized?


L33F3R

Still Fresh
Joined
Oct 30, 2007
Messages
12
Hey im a tad noob to C/C++ but i was wondering what and how one would go about porting sdl doom or quake or w/e properly to the gp2x to run faster.

Now i know they need to be compiled for arm but I realize that developers optimize games by developing for specific hardware hense how so many great games came out on platforms with garbage processing power.

In this case how would one go about optimizing a game for gp2x?
 
There is the usual stuff, inlining small functions, loop inversion, replacing floats with fixed point, avoiding divisions where possible.
If you are doing distance calculations, just compare distance squared so that you don't have to use square root, etc etc.
 
no magic bullet eh. that kinda blows. but would it be possible to use threading to speed things up? perhaps making both arms handle a shared load insted of one for video?
 
No, as the OS thinks there's only one ARM chip there, plus technical difficulties prevent both being used to share the load in a typical manner.

It just comes down to: Profile code, and once you find the slow bits, make them run faster. That could mean writing bits in assembler, optimising algorithms, etc.
 
second core? are u saying that the gp2x is dual core or dual cpu?
 
Quiest said:
Could someone please explain what "profiling code" means?
Taking the CPU time each function in your program gets. After that you know what are the most used instructions and the most CPU expensive ones, so you center on improving them.

I hope you can understand my English :p
 
Last edited by a moderator:
Back
Top