How Do I Port Applications


oqnet

Member
Joined
May 22, 2006
Messages
108
I have been looking into porting some things to the gp2x for fun like a different media player or picture viewer and I have never done anything like it before. I was wondering if theres a guide to porting over apps, I did find some info on the wiki but I was wonder if anyone had some general info that didn't involve games.
 
Porting requires a pretty good understanding of programming language, not just GP2X's SDK, but the language of the application you want to port over.

It's not something you can just jump straight into, but if programming does interest you there are plenty of C++ books out there that could get you started as beginner. Don't expect to be porting anytime soon though i'm afraid, it does take quite a lot of knowledge, dedication, and patience.

I don't think there's any general rule to porting, other than understand how it works on one system and can be replicated on another using a different language or enviroment.
 
Porting requires a pretty good understanding of programming language, not just GP2X's SDK, but the language of the application you want to port over.

It's not something you can just jump straight into, but if programming does interest you there are plenty of C++ books out there that could get you started as beginner. Don't expect to be porting anytime soon though i'm afraid, it does take quite a lot of knowledge, dedication, and patience.

I don't think there's any general rule to porting, other than understand how it works on one system and can be replicated on another using a different language or enviroment.
Well I do have quite a knowledge of C++, Java and other languages, I have writen a game from scratch before(a cool tank game that can be played online writen using MFC with GDI+ but not cool enough to port over to the gp2x :( ). I've just never tried to port anything before and thought it would be fun to give it a whirl for awhile(I don't plan on figuring it out over night). I just wondered if there was some specific reading in regards to what kinds of things need to be changed, if theres not I'll figure it out(or die trying :p) anyways I just thought I would ask :)
 
Last edited by a moderator:
Since porting is a case of translating the code from one platform to another platform. In most cases you can recompile the code from C and C++ on to the 2X using an arm compiler.

The problem is that not all libraries will be supported on the 2X, so you need to find out if there are libraries that do similar things, for example there is an OpenGL library for the 2X. There may also be other inconsistencies, Visual C++ has automatic garbage collection, so you would need to write extra code to delete unused pointers etc. if you ported across from .NET to ANSI

As Vynx mentioned you need to understand the code that you are porting, so that if necessary you can rewrite sections. Optimisation will also be a problem, you need to consider work-arounds to get the code running on a small platform (200MHZ 64MB ram, limited screen resolution / colour palette) These typically include - for speed - rewriting sections in Assembler (a chip specific instruction set, directly manipulates the hardware) and finding the 'best' compiler for efficient machine code - for screen - working out how to display things best (unless the app supports 320x240) - for controls - using some bits of code for a mouse pointer / virtual keyboard.

hope this helps...
 
Since porting is a case of translating the code from one platform to another platform. In most cases you can recompile the code from C and C++ on to the 2X using an arm compiler.

The problem is that not all libraries will be supported on the 2X, so you need to find out if there are libraries that do similar things, for example there is an OpenGL library for the 2X. There may also be other inconsistencies, Visual C++ has automatic garbage collection, so you would need to write extra code to delete unused pointers etc. if you ported across from .NET to ANSI

As Vynx mentioned you need to understand the code that you are porting, so that if necessary you can rewrite sections. Optimisation will also be a problem, you need to consider work-arounds to get the code running on a small platform (200MHZ 64MB ram, limited screen resolution / colour palette) These typically include - for speed - rewriting sections in Assembler (a chip specific instruction set, directly manipulates the hardware) and finding the 'best' compiler for efficient machine code - for screen - working out how to display things best (unless the app supports 320x240) - for controls - using some bits of code for a mouse pointer / virtual keyboard.

hope this helps...

yeah it was very helpful, gives me a few ideas of what to look into and get me started.
 
Last edited by a moderator:
Back
Top