How to port applications


ToastBucket

Very Active Member
Joined
Oct 12, 2010
Messages
333
Location
Seattle
Hey all, I'm interested in learning how to port applications to the Pandora, but have absolutely no clue what to do. I've never ported anything before and don't know much about it. Is there anyone willing to tell me what goes into porting an application to the Pandora (or maybe just porting an application in general) and maybe helping me through my first port? I have very limited programming experience unfortunately, and have only learned how to do very basic things in C.
 
Hey all, I'm interested in learning how to port applications to the Pandora, but have absolutely no clue what to do. I've never ported anything before and don't know much about it. Is there anyone willing to tell me what goes into porting an application to the Pandora (or maybe just porting an application in general) and maybe helping me through my first port? I have very limited programming experience unfortunately, and have only learned how to do very basic things in C.

well I don't know how to port yet too, but I know there's a wiki ... http://pandorawiki.org/Porting_guide


i find it still lacks more centralized information, but maybe its just me...


anyway, comeback with the results (if you sucessfully ported anything), i'm really curious on the process... I'm 2nd batcher so... plenty of time to learn :)
 
Step 1: Be awesome


Step 2: ????


Step 3: profit


but seriously,


if you don't have a lot of programming experience, it's going to be rather difficult to port stuff that doesn't just recompile on Pandora. Basically a port is just taking source and tweaking the os or architecture-dependent parts of code and rewriting those parts so it works on the new system.


Some things need less porting effort than others. For example,



Code:
path = "C:\HARDCODED\SUBDIR\MY_FILE.JPG"

load(path)

is going to be kind of a pain to port, but



Code:
path = "SUBDIR/MY_FILE.JPG"

load(path)

will probably just work, because all major OSes support forward slashes as path separators, and since the path is relative, so long as your directory structure is right, you won't have to alter the code.


So a big part of porting is going to be choosing things that will port easily. For example - something written purely in Python will be very easy to port, you'll mostly have to change resolutions, and that might be it. Python's also an easier language to learn and make sense of. So if I were you, I'd start by porting some python games ('pygames'). There are plenty of them, and a lot of them will just require resolution changes, or some other minor tweakings, to get them to work ok on the Pandora. But again, this depends on the program itself and how conscious the programmer was when writing it. For me, most of my programs are just runnable on all platforms, I don't make any assumptions about screen aspect ratio / resolution, operating system, file paths, etc. I just make it all generic. But a lot of people don't go through that effort. So you have to go through the effort for them.
 
Probably i'm the least indicative person on this (programming i mean :) ) as i don't have much knowledge of C and C++, but i was able to port some games/apps on GP2X


and now on Pandora (the sad thing is i yet don't have one to test my work .....i'm a first batcher around 3900).


I have my GP2X F200 from 2008 but started to learn to port something from 2009.


The best thing (for me) is learn from others code/ports and try to make some change and test.


I use Codeblocks as IDE+ DJWillis toolchain to make change in the code and compile.


So if you wanna take some source look first at Beta Testing Section at http://www.gp32x.de/board/index.php?/forum/71-beta-testing-pandora/


or at NEWS Zone http://www.gp32x.de/board/index.php?/forum/63-news-zone-pandora/


and also at works from Sebt3 http://sebt3.openpandora.org/pnd/


and ZX81 works http://zx81.zx81.free.fr/serendipity/index.php?/categories/124-Pandora


but there are many others...


Happy porting!!
 
Last edited by a moderator:
Back
Top