Archive for the ‘Playstation 2 development’ Category
Playstation 2 development – part 2
This is the second issue of a series of posts for PS2 development on my blog. Be sure to read the previous articles: part1.
Part 2: Getting SDL
To build SDL, at first you need to install another library named gsKit. This lib is a much lower level graphics library written specifically for the PS2. For an introduction to the hardware architecture of the PS2 please see the excelent article An introduction to PS2DEV by Lukasz Bruun.
Again gsKit is pretty easy to get running. Just download, build and install it:
svn co svn://svn.ps2dev.org/ps2/trunk/gsKit cd gsKit make sudo -E make install
Now you can get SDL and install it. However, when I tried, the current SDL version on ps2dev.org was not compatible with the current gsKit and didn’t compile. To make it compile, load sdl-compile.patch and apply it:
svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/sdl cd sdl patch -p0 < sdl-compile.patch make sudo -E make install
You should be familiar with building the libraries from ps2dev.org now, it’s always the same. If not so, the README will most likely explain the steps to get it running, even if very often they are pretty outdated. Now I leave it up to you to compile the additional SDL libs like SDL_ttf and so on.
In the next post I’ll explain how to write the first SDL program and run it on the PS2.
Playstation 2 development – part 1
I just started messing around with development on my PS2. Compiled PS2DEV, PS2SDK and a few libraries like SDL and SDL_ttf for it. As it I found it a bit hard to find enough information to start, I thought I’d write my experiences down.
Part 1: Setting things up
Remember that running your own applications will only work, if your PS2 is “homebrew-capable”. This can be achieved with a mod chip, some disc swapping tool or by using an exploit. Google and Wikipedia know how to that.
PS2DEV is the crosscompiler toolchain for the PS2. You’ll need that for compiling C/C++ code for your PS2.
PS2SDK is a collection of libraries that make accessing the hardware of the PS2 a bit easier. The toolchain alone won’t let you do much without messing around with very lowlevel programming. SDL and other higher level libraries will need this.
Building the toolchain
With the following exports you decide, where the tools are installed. You should probably do this in your .profile or .bashrc or whatever you use to setup your environment.
export PS2DEV=/usr/local/ps2dev export PS2SDK=$PS2DEV/ps2sdk export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin
Then you can check out the current source:
svn co svn://svn.ps2dev.org/ps2/trunk/ps2toolchain
Now you can build the toolchain and install it:
cd ps2toolchain make sudo -E make install
That’s it, it’s simple as that. Of course make will take some time, depending on your machine. This will also install a few additional tools, like ps2client, which I’ll explain later.
Building the SDK
It’s as easy as building the toolchain! Remember that you will have to have your environment variables correctly set.
svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk cd ps2sdk make sudo -E make install
Now you’ve got the very basic toolset to develop for your PS2. However most beginners (like me) most likely want to develop on something more “sophisticated”. Fortunately SDL is available for the PS2. Read how to compile and install it in part 2.
You are currently browsing the archives for the Playstation 2 development category.
