How to Develop/Port for the Pyra as Noob


matzesu

Forum Addict!
Staff member
Joined
Oct 24, 2008
Messages
13,209
Age
40
Location
Germany,, Saarland, at home
Hellolo,
I wonder if i could port some stuff, as some Devs got issues whit there Pyra
The issue i have is that i dont have that much Background in Linux, i know a bit how to copy over Terminal Commands, and i have a bit user experience whit Pandora, Pyra and Debian as well as Ubuntu but didnt had Programming in Shool or something ..
I have Buster on my Pyra, and the Bookworm Image from the Official Repo on my SD Card, i had extend it to SD Card Size allthough it dosnt seem to be that much bigger.. ,
Bookworm got still some issues it dit crash sometimes, but yesterday i was able to test play a few Dreamcast Games whitouth issues..

So for Porting, i would have to download stuff, compile it for Debian ARM (Pyra) link it somehow to GL4ES, and would put SDL Support in as well as config the Controlls to Pyra ? It would also need to config the Grapics so it will run on our 2 x 1,3 ghz device..?
 
  • Like
Reactions: rSl
there's porting and porting, starting with a game thats already in the linux repository for ARMHF that runs but needs tweaking in config files, could be considered "porting" those are nice to start with, optimize the game for the pyra. Building something for pyra from sources is more involved, and requires some ideas about how to build code into a program, for that I would start small get the hang of building tiny programs and than going bigger.

I've never ported anything but I did build my own code for one or two platforms, I think that would be a nice starting point, If you willing to try that. You could follow a basic making a small game in SDL2 and try to get that working on your pc and then on the pyra, and then youve done your first port!
 
Real porting, meaning perfectly adapting a program to a new system is nothing for Noobs. But luckily, most open source projects have portability in mind, so the devs include files (e.g. CMakeLists.txt) that configure the project for the target architecture (x86_64, armv7h, aarch64, ppc, ...) or even whole platforms (e.g. Pandora or single-board computers like Raspberry Pi).

To get a hang of it and as a starting point, just follow the build instructions of some open source projects and try to compile them for the arm architecture!
Here's a list of open source game engine rewrites:
Some of them include very detailed explanations how to build them for several platforms, so browsing through the projects and reading carefully the explanations will provide you plenty useful information.

Some things are even very simple: To use GL4ES for your compiled project, just put gl4es in front of the program name ($ gl4s ./ppsspp)

And after enough practice with several projects, here's your final boss:
https://github.com/hrydgard/ppsspp/wiki/Build-instructions :caanoo:
 
Last edited:
There is a lot of applications that are written well and can be ported by just running the compiling tools automake, cmake or whatever, you can just try compiling software on the Pyra. On these programs usually the hangup is just installing the development libraries to compile it properly and usually running the ./configure in the source code will root out these what development libraries you need to install and just install for example libSDL1.2-dev.

Some of the harder issues I've faced in the past like when I porting for the Pandora, there was some fundamental issues in the source code that didn't allow the game to easily work on a different CPU architectures that caused glitches in the game and took forever to root out the issue. Or one game that never expected anyone would run it on something with less that 1024x768 resolution and had to massively change the GUI side of the code.
 
Last edited:
What have said @jedi23 and @TrashyMG are good words and examples.
Maybe start compiling a simple game with SDL (already ported on linux) that have a ready makefile and try to run it....there are a few things that need to be changed on Pyra
compiler options on makefile, and maybe resolution and the controls (dpad+buttons) on the source code.
Anyway when you try and found a problem, write here on forum and i'm sure someone could help you.
 
I'm pretty sure he already mastered the whole ABC!
I know there was a programming language called B, before C. But I didn't know there was a language called A ? Or would that be just assembler? I don't think knowing assembler or B is needed for portign (assembler wouldn't hurt, but there're useful things to do without it, I think).
 
Well, if you read my Posts i made in my first few 2 months (tm) cycles on the German and English Borads, you will see i had some issues whit the ABC back then, i got some progress over time but maybe i should at least look what Programming Languages are contain..

My plan was also to learn french, i dont know which of these languages are faster to learn..
 
I know there was a programming language called B, before C. But I didn't know there was a language called A ? Or would that be just assembler? I don't think knowing assembler or B is needed for portign (assembler wouldn't hurt, but there're useful things to do without it, I think).
In deed there was A as well.
 
In deed there was A as well.
But I meant some A before B. Your A is from 1985, B is from 1969 and C is from 1972. So that A is not a precursor for C. C was named C because there had been B, but B wasn't named B because of the A (an APL) you say. B was named B because of BCPL ("Basic Combined Programming Language" is not a sexy name if you ask me).
 
Yeah yeah but C is the language of *nix and porting will often involve compiling it. I didn't suggest learning programming to be a condescending dick. It's a relatively simple and fun language. When porting you'll get a lot of "link errors" which really just means function not found so you probably need to update a library. Programming is even more fun than gaming imo.
 
Some famous games, namely torus trooper for example, are written in D even!
 
And to complete the list, I think the letters W and Y don't have a language assigned to them. So if you want to introduce a new programming language, W or Y could be an option for you.

Regarding porting: we have some serial porters on this forum so they might have useful tips.
I didn't do much porting myself. I usually develop for the target platform (in assembler/C/C++) or use a language that is more easily ported (C#, Python). Running some existing applications in Java usually works relatively well out-of-the-box on windows/linux.
My experience it's possible to start porting stuff, but you have to start somewhere. For me it was running small Windows CE applications or Java on different platforms 'as-is' by moving all required libraries; so not changing the application itself but just getting it to run.
To compile and optimize for a single platform you do need some knowledge about the platforms inner workings. Partially this can be copy/pasted from other ports to a degree, but it's a skill you can develop.
I would at least suggest to try, ask for help, and keep trying until you ported something. Success generally is achieved by your determination to achieve it. @ptitSeb wasn't a serial porter in the past if I remember correctly, he just was very persistent.
 
For the Pandora there is this nice tool by @ptitSeb that gets all the necessary libraries for you IIRC, that helped me a lot. Can't remember what it's called right now. Apart from that, going through readme-files that come with sourcecode is imperative. As well as learning how to properly package stuff after compiling.
The stuff I ported was pretty easy to do, most of all Robot Finds Kitten and Ballerburg.
 
Back
Top