| View previous topic :: View next topic |
| Author |
Message |
SamuraiX
Joined: 31 Jan 2006 Posts: 76 Location: USA
|
Posted: Fri Sep 14, 2007 3:47 am Post subject: SGE Library for SDL r030809 with examples. |
|
|
I tried using the supplied SGE library here for PSP and ran into many issues when compiling against my own applications (missing support for some libraries I needed, plus there were truncating issues).
Therefore, I downloaded the source from the official site: http://www.etek.chalmers.se/~e8cal1/sge/ and ported over the source myself.
One thing I noticed as well was that the version checked in SVN was a little outdated and was missing SDL_image, Freetype, and C++ Class support. Its all included in this lib.
Details are covered in the README.PSP file. but here are the instructions and requirements anyway.
| Code: |
Requirements:
SDL
SDL_image
freetype
To build and install:
make -f Makefile.psp config
make -f Makefile.psp
make -f Makefile.psp install
Usage:
LIBS += -lSGE
|
As for compiling and executing the examples..... README.PSP in the examples directory explains it all. Some of them are quite fun to watch... ;p
Location will be temporary for a few days after that I will only host the file thru my sites download manager which requires users to be logged into the site.
http://www.lavalit.com/temp/PSP_SGE_r030809.rar |
|
| Back to top |
|
 |
saulotmalo2
Joined: 10 Sep 2007 Posts: 43
|
Posted: Fri Sep 14, 2007 9:20 am Post subject: |
|
|
| sound very interesting, thanks for porting this. Also i have my project at half so i'll won't use it i have read the specs and are very good. |
|
| Back to top |
|
 |
fatdev
Joined: 18 Sep 2007 Posts: 5
|
Posted: Tue Sep 18, 2007 10:22 pm Post subject: |
|
|
Im sorry if this is too noob.
In the examples inside the SGE, why do these examples run on the psp without the PSP_MODULE_INFO, exit callbacks, etc all the things I thought was necessary for a psp program? |
|
| Back to top |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Tue Sep 18, 2007 10:29 pm Post subject: |
|
|
SGE is ontop of SDL and I think SDL does all that for you, it tells the compiler to use SDL_main instead of main as the entry point so it can secretly set stuff up (SDL_main calls main when it's done). _________________ (+[__]%) |
|
| Back to top |
|
 |
fatdev
Joined: 18 Sep 2007 Posts: 5
|
Posted: Tue Sep 18, 2007 10:50 pm Post subject: |
|
|
ok thank you.
So wouldn't that mean I can't easily change it to kernel mode?
Or if theres a different way of setting module info up, enlighten me please? |
|
| Back to top |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Wed Sep 19, 2007 4:54 am Post subject: |
|
|
Why do you need kernel mode? If you really need it then I think the preferred method is to put your kernel mode things into a separate prx and load that from your main program. There are some threads that explain it using sample code from HEN http://forums.ps2dev.org/viewtopic.php?p=58259#58259
There is a way to remove SDL's secret main, use this line in CFLAGS instead of sdl-config (I took out -Dmain=SDL_main):
-I/usr/local/pspdev/psp/include/SDL
You'd have to setup your own exit callback and whatever else SDL did in it's SDL_main (could just check the source code).
| fatdev wrote: | | Or if theres a different way of setting module info up, enlighten me please? | Someone else can answer this since I don't know. _________________ (+[__]%) |
|
| Back to top |
|
 |
fatdev
Joined: 18 Sep 2007 Posts: 5
|
Posted: Thu Sep 20, 2007 4:51 pm Post subject: |
|
|
I need it to set up wlan. I will probably do it the first way you mentioned(seperate prx).
But just in case I find out I need to do it the other way for whatever reason, I briefly looked through SDL_main.h in usr/local/pspdev/psp/include SDL but it seems to have words like W32 and MacOS....is this the one I should be looking at? plus there isnt exit callback etc in this, or other header files in the same folder... |
|
| Back to top |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Thu Sep 20, 2007 11:08 pm Post subject: |
|
|
I actually meant the .c file not the .h file. Since I used the psplibraries script I have it here: X:\psplibraries\build\SDL\src\main\psp\SDL_psp_main.c
There's a copy on google code too: http://www.google.com/codesearch?hl=en&lr=&q=file%3ASDL_psp_main%5C.c&btnG=Search
Interestingly it seems SDL programs start in kernel mode anyway, so you may not have to do anything special.
| Code: | | PSP_MODULE_INFO("SDL App", 0x1000, 1, 1); |
_________________ (+[__]%) |
|
| Back to top |
|
 |
fatdev
Joined: 18 Sep 2007 Posts: 5
|
Posted: Thu Sep 20, 2007 11:53 pm Post subject: |
|
|
| ooo~ right-o it is. Oh well then I have nothing to worry about. Thanks for the tip Smong. |
|
| Back to top |
|
 |
|