Jason Schmidlapp | 5 May 01:34

Port to PSP


I'm interested in porting Agar to the Playstation Portable (PSP) platform, and
would like some pointers to getting started.  For instance, which subversion
path should I be looking at (1.4 branch or trunk).  Also, I don't see the files
used to generate the configure file, in order to add PSP arch.  Finally, on the
website it says that ports to PS2, Wii, etc are in progress -  where is the code
for these ports?  Seems like these could be helpful to me.

Thanks!

--Jason
Julien Nadeau | 6 May 03:29
Favicon

Re: Port to PSP

On Sun, May 04, 2008 at 11:35:40PM +0000, Jason Schmidlapp wrote:
> 
> I'm interested in porting Agar to the Playstation Portable (PSP) platform, and
> would like some pointers to getting started.  For instance, which subversion
> path should I be looking at (1.4 branch or trunk).

If you have a working SDL or OpenGL, the trunk will be fine. If you need
to use another API, I'd recommend the 1.4 branch.

> Also, I don't see the files
> used to generate the configure file, in order to add PSP arch.

The configure script is generated from configure.in using BSDBuild
(http://hypertriton.com/bsdbuild/). You don't need to do anything to
add support for a new arch, though. If you are using a cross-compiler,
just setting CC/CFLAGS accordingly should do it.

> Finally, on the
> website it says that ports to PS2, Wii, etc are in progress -  where is the code
> for these ports?  Seems like these could be helpful to me.

Support for these platforms in the 1.3 series requires an operating system
such as Linux. The porting effort mainly involves removing that requirement,
so that Agar can be used to produce standalone roms, and this one of the
main goals of the 1.4 series. Right now, we are still working on abstracting
the OpenGL/SDL code in the 1.4 branch and there is no driver for these
platforms in the tree yet.

Whether this is relevant to the PSP depends on the graphics API you have
to use.
(Continue reading)

Jason Schmidlapp | 31 May 05:53

Re: Port to PSP


Julien Nadeau <vedge@...> writes:

> The configure script is generated from configure.in using BSDBuild
> (http://hypertriton.com/bsdbuild/). You don't need to do anything to
> add support for a new arch, though. If you are using a cross-compiler,
> just setting CC/CFLAGS accordingly should do it.

I'm having a problem using BSDBuild - it doesn't correctly detect pthreads.  
On the PSP, linking to the pthreads library also requires some additional
libraries.  
For instance, a compile command should look something like:

psp-gcc -o test1 -I/usr/local/pspdev/psp/sdk/include
-L/usr/local/pspdev/psp/sdk/lib test1.c -lpthreads -lpspuser -lpspsdk 
-lpspnet_inet

However, I can't see any way to make BSDBuild add those extra libraries.  
Using autoconf, I could just set LIBS prior to running configure, but this
doesn't work with BSDBuild.

Any ideas?
Julien Nadeau | 31 May 07:21
Favicon

Re: Port to PSP

On Sat, May 31, 2008 at 03:53:17AM +0000, Jason Schmidlapp wrote:
> 
> Julien Nadeau <vedge@...> writes:
> 
> > The configure script is generated from configure.in using BSDBuild
> > (http://hypertriton.com/bsdbuild/). You don't need to do anything to
> > add support for a new arch, though. If you are using a cross-compiler,
> > just setting CC/CFLAGS accordingly should do it.
> 
> I'm having a problem using BSDBuild - it doesn't correctly detect pthreads.  
> On the PSP, linking to the pthreads library also requires some additional
> libraries.  
> For instance, a compile command should look something like:
> 
> psp-gcc -o test1 -I/usr/local/pspdev/psp/sdk/include
> -L/usr/local/pspdev/psp/sdk/lib test1.c -lpthreads -lpspuser -lpspsdk 
> -lpspnet_inet
> 
> However, I can't see any way to make BSDBuild add those extra libraries.  
> Using autoconf, I could just set LIBS prior to running configure, but this
> doesn't work with BSDBuild.
> 
> Any ideas?

Since this is specific to the PSP SDK, I'd suggest adding a module to
BSDBuild to detect it and add the extra libraries. Can I download a
copy of this toolchain somewhere?

Gmane