Link to home
Start Free TrialLog in
Avatar of dbrckovi
dbrckoviFlag for Croatia

asked on

Programming Playstation 2

Hi!

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)
Avatar of mingz
mingz

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:
http://www.megagames.com/ps2/ps2_guides_files.shtml

hope it may help :)

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

http://ps2dev.org/
ASKER CERTIFIED SOLUTION
Avatar of nonovex
nonovex

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dbrckovi

ASKER

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.
nonovex

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?
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 PS2Dev.org, but none of them is written for http://www.thethirdcreation.net/tools/ps2DevEnvironment.exe,     or I just can't connect them together.

If I understood it right, all tutorials on ps2dev.org 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?    www.thethirdcreation.net only contains some basic info for some competition on developing for PS2.

Basicaly Im lost. Please help.
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! :)
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.
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.