GP2X Gp2x And C Where To Start?


netwalker

Still Fresh
Joined
Jun 2, 2007
Messages
11
Hey All,

I've recently purchased the rather cool GP2x handheld device from GPH as a starting point for developing on consoles systems. I chosen this device simply because I wanted one for emulation as well as an audio device and movie player. It also seemed to be the easiest to develop for in terms of setup. I didn't want to have to go out and buy those flash carts that you have to purchase (yes I know you can run programs through emulation but I want to see it running on the actual hardware).

Anyways my specific question is that I want to develop on this system using straight C but can't find ANY informations on were to start :blink: . Yes I know about SDL and all but I would rather go down the C route because I want to learn about how to initialize the system, setup screen resolutions, creating surfaces, drawing, input and audio. Basically understand what is going on under the bonnet of the system when doing certain tasks. SDL although cool in is own right abstracts this sort of thing and I just want to have an overall understanding of the underlying system. Something that SDL just doesn't do. If you guys can point me in the right direction many thanks in advance.

netwalker.
 
I'll tell you SDL does require you to have "an overall understanding of the underlying system" as its a library. It lets you do stuff within C and C++ more easily. Do you have any prior programming experiance.

BTW, a program written using SDL will either be written in C or C++.
 
if your not interested in sdl and want a more "hands on" approach, then you can always just ignore sdl and write all the routines yourself which means learning to write code for linux-style devices and reading the processors datasheet. If you want a middle ground, try going for rlyeh's sdk.
 
I've seen most of the SDL tutorials about (including that cool ARM asm tutorial but that only gets you to a certain point). But I keep asking myself: what is it actually doing below?. Another thing I would like to ask is: what references do/did the developers use to actually build the SDL library for the GP2x?. Isn't the GP2x supposed to be an "OPEN" system?. Have the sources for the SDL library been released?. I'm not getting at anyone I'm just a frustrated coder and finding very difficult to find any informations on what is supposedly an open system.

As far as development goes I'm (don't want to sound big headed) around intermediate-advanced with both C/C++ can also do a little ASM but this is for x86 based processors. My preferred coding language is C (I guess you may have noted that already ;)).

Any further infos appreciated, thanks for your time.
 
uh the datasheets are available. the linux source is available, sdl is available.

you are not really looking veryhard methinks with questions like "have the sdl sources been released".

everything you want is in the open2x svn trunk
 
You are right I wasn't looking very hard. Actually I did have the gp2x sdk for windows downloaded but I just didn't want to touch SDL. Mainly I've been looking (since early this morning) for a low level API like Win32 but for the gp2x. It has been suggested to me that I should take a look at rlyeh's minimal lib which looks very promising. Anyway sorry for the dumb noob question.
 
QUOTE
I'm not getting at anyone I'm just a frustrated coder and finding very difficult to find any informations on what is supposedly an open system.


Erm, the system is fully documented, and all the GPL source code is available for download. I don't see where the problem is.
 
@yaustar, no but part of the same team. ;). The one has the largest net catches the most fish.
 
Get on IRC. No seriously.

EFnet, local location, channel GP2Xdev

When I first got my GP2X I spent a month reading stuff without anyone telling me how important doing that was. It's almost like an exclusive club, that isn't... ;)
 
Thanks David I'll consider IRC after posting any problems that I have through these forums first.
 
If you do not want to use the libs, you simple find the magic numbers, now the magic number are in/out Address, by changing bits or testing bits at these address, you will make things happan, like test if the X button is pressed etc.
But there's one big problem, linux does not let you read/write to these address, so to get round this, you use "open" a file/device and use "mmap" to map the file, or a section of a file, into memory.
If you see "mmsp2.h" you will see a list of these address, you can than look them up in the main PDF and find the given bits, that need changing or testing, for a certain task.
I do all this in 100% asm, you can do it with C or a mixture of the two, its up to you.
 
and there's examples of doing that on the Wiki :)

Like people have said, didn't really look very hard!
 
Back
Top