Programming Playstation 2

Posted on 2003-11-28
Last Modified: 2013-12-26

I would like to learn programming for playstation 2.
I'm not aiming for some high quality games, but some simple projects, just to impress my friends. :)

I did a google search and have found many pages concerning PS2 programming, but I still haven't found what I need.

I would like to have some Development environment which I would install on my PC, write a programm with it, and then burn a CD which will work on PS2 platform.
I wasn't able to find it anywhere.
There are few tools and developer environments that are used with PC (like Cygwin, PS2DEV), but all of them use USB cable to upload a game to PS2, and I would like to burn a CD instead.

I assume that once I compile a programm in souch tool, that it shouldn't be too hard to make a CD, but it realy suprized me when I realized that everyone is using Cable, and noone
bothered to explain how to create a working CD.   (  I know that testing a program is much less painfull when using cable, but if I plan to use this program in future it has to be on a CD)

1) So I would like to know how to burn a CD so it will work on PS2.
2) What are some common file names or file extensions that PS2 platform uses.  (  For example. In windows EXE means executable, BMP means bitmap etc.)
3) What method does PS2 use to load a CD.    (  For example.   Windows use autorun.inf to read which file has to be oppened first )
          - Does PS2 require some boot sector on a CD in order to load it properly or is there some common file that is loaded first  (  like autorun.inf ? )

If there is anyone that had some experience in programming PS2, please respond.
It would be great if someone could give me some simple (working) code, and a step by step guidance on how to compile this code to a working program on CD.

P.S. I already have about 7 years of programming experience in many languages, and OS's for PC based platform and now I'd like to use this knowledge on new platform, but I need some basic guidance.

Thanx in advance! ( I probbably won't be on-line through the following weekend so if anyone posts something, expect me to reply on monday)
Question by:dbrckovi

Expert Comment

ID: 10015942
Hi there, I am also very intersted in programming games on ps2. But I am still learnning to do that on a ps2. You can get many information on ps2 here:

hope it may help :)


Expert Comment

ID: 10032575
You can try this page, it has some tutorials, example programs  and sample loaders

Accepted Solution

nonovex earned 400 total points
ID: 10035394

Hi dbrckovi, sorry for answering so late :)

for ps2 homebrew development you will have two parts, the first, programming and debugging (unless you don't have any error ;) ) and the second one, creating the final CD.

right now the best choice for the first part (the one you'll spend more time) is using a broadband adapter, Pukklink, and inlink:

The broadband adapter is the ps2 device which allows you to play great online games.  

Pukklink is a PS2 CD which you have to burn and boot in the playstation 2, to be able to send files to the playstation 2. You can find it here:
Of course you must have a modded PS2 so that you can boot backup CDRs. anyway you need it if you want to boot your final CD :)

Inlink is the PC server you use to send files. You can also read files from your host PC so no need to burn CDs for testing :)

once there you only need a r5900 compiler like gcc, which you can easily find here: 
The installation is quite straightforward.

Once installed you should have a PS2 environment link in your desktop, or your autoexec modified (can't remember it). You might need extra libraries, depending on what you want to do. Just look at for more info. PS2LIB is the de facto standar for ps2 homebrew. There's a ps2lib with the gcc distribution however you can grab a newer version at

just grab your favourite editor and write this:

#include <kernel.h>
#include <sifrpc.h>

int main (void)
      SifInitRpc (0);
      scr_printf ("PS2 roolz!");
      SleepThread (();
      return 1;

compile it with...

ee-gcc main.cpp -c -o main.o -Ic:/ps2dev/ps2lib/ee/include/
ee-gcc main.o -Tlinkfile -o ps2.elf -Lc:/ps2dev/ps2lib/ee/lib -lgcc -lkernel -lmc -lpad

(note: I've used "my" standar files, my standar paths, and libraries, just use your path, and there's no need for -lmc nor -lpad, but it stands as an example. The standar linkfile is somewhere in the compiler tree, in a directory named startup)

you should have a ps2.elf now. Just upload it via inlink&pukklink, or the USB cable, and it should execute on your ps2 :)

now for the CD. To make a ps2 cd bootable (NOT a DVD) you just need to
burn the correct files there, no need for special headers. Of course you
must have a modded ps2 so that she can boot backup CDRs.
The autorun.inf equivalent for the PS2 is SYSTEM.CNF (you can see it in all
the games for PSX and PS2). There you just specify the file to boot
and voila.

i.e. my pukklink cd has something like this:
BOOT2 = cdrom0:\PUKKLINK.ELF;1
VER = 1.10

of course, the exe name is PUKKLINK.ELF

beware when burning CDs, if you just forget a file you'll have to start again ;)
BTW, CDs must be CD Mode 2 / XA . PSX cds had to have at least 3 minutes track of music at the end of the CD, otherwise some weird things happened with the CD. I think PS2 doesn't have this problem but I do it too as I'm used to.

.ELF files in ps2 are used to be standar EXEs, .IRX files use to be IOP processor executable files (or drivers). however as you know, they're just that, names, and everybody can give them the name they want as you can name the .BMP as .XYZ and setup the file explorer to launch the paint program with them   ;)

ps. I wrote this by memory, except links and source code. There might be some mistakes but I think it's quite accurate. I hope it helps :)

This is your world now.
Sir Auron
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

LVL 11

Author Comment

ID: 10059881
Thanx to all and specialy to nonovex for detailed answer. I'll try what you suggested, and decide what to do when I get some results.

BTW ... Can PS2 boot a CD-RW and/or boot from small CD-RWs? ( That small 185 MB things, for which I can't find the right word in English, that can be inserted in every CD device same as normal CD's )

It seems much easier to rewrite the CD then to move my PS2 and a TV set to another room in order to connect it to a computer.
LVL 11

Author Comment

ID: 10096689

I downloaded PS2Dev Environment from the location you specified. I installed it under        d:\davor\PS2Dev

I created test.cpp with your example   ( removed that extra bracked ) and compiled to test.o without any problems. But I can't link it to PS2.ELF

This is the line I used at command prompt:                  ee-gcc test.o -Tlinkfile -o ps2.elf -Ld:/davor/ps2dev/ps2lib/ee/startup -lgcc -lkernel -lmc -lpad

And this is the error message I get:                             d:\Davor\ps2dev\GCC\ee\bin/../lib/gcc-lib/mips64r5900-sce-elf/2.9-ee-991111b/../
                                                                                ../../../mips64r5900-sce-elf/bin/ld: cannot open crt0.o: No such file or directory
                                                                                collect2: ld returned 1 exit status

I have tried experimenting with or without -lmc -lpad and other parameters but I allways get the same message.    

I have the crt0.o file located under       D:\Davor\ps2dev\ps2lib\ee\startup

What went wrong?
LVL 11

Author Comment

ID: 10099486
I copied files from startup directory to my project dir. and it found crt0.o,     but now I get the same message, but saying that it can't find -lkernel

How did you setup your PS2Dev environment when you first got it?

I tried reading Tutorials and Docs on, but none of them is written for,     or I just can't connect them together.

If I understood it right, all tutorials on are describing how to install and configure Ps2Dev Environment from scratch, and the file you directed me to, already has all of this installed and configured.

Where is some help or tutorial for the environment that I downloaded? only contains some basic info for some competition on developing for PS2.

Basicaly Im lost. Please help.

Expert Comment

ID: 10135818
no idea about the small CDRW, sorry :(

the crt0.o also gave me problems at the start, my solution was copying it to my local directory and add it to the compilation line (i.e. ee-gcc mymain.o crt0.o -o ps2.elf .....  ).  

if problems with not found libs, you should add something like
 -Lc:/ps2dev/ps2lib/ee/lib (or probably  -Ld:/davor/ps2dev/ps2lib/ee/lib ni your case) to say gcc you have them in that directory.
 BTW, beware with DOS commandline: It only accepts 128 characters so you'd better be working with makefiles and the supplied make.exe at d:/davor/ps2dev/gcc/share , otherwise you might run into some problems of typing the whole line but the gcc just obeying the first 128 chars.

however, are you doing c++ or just c? c++ usually gives some headaches when configuring everything. If you're with c++ I'd swap to c temporally before having everything set up correctly, to move then to c++

I also haven't found information for the precompiled package from thethirdcreation, but I found it a lot easier than the 'from the scratch' installation packages. I'm not suited for gcc headaches :)

I hope it helps! :)
LVL 11

Author Comment

ID: 10139943
I'll only programm in raw C style. I don't like thoose objects anyway. :)

BTW. I can't test what you said, becouse I had some problems with my disk, so I'll have to reinstall everything. I'll come back when I set it up again.
LVL 11

Author Comment

ID: 10269763
I'm having some serious problems with my comp so I won't be able to test this for some time.

In the meanwhile I'll accept your answer becouse it answered my question perfectly, and there's only details to iron out. But i'll deal with this later.

Thanks again for answers.

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help me install PYgame on Python 3.3.3 IDLE 6 539
How do I make animated GIF's transparent background? 2 144
Any decent scenery blocks for my RTS 6 87
Fix45 challenge 15 124
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question