Skip to main content
gamedev.net
🔒 Locked

Programming a console

Started by jhoward Apr 25, 2004 at 4:06 PM 2 replies 650+ views
Original Post
jhoward
jhoward
I''ve been programming games in C++ and writing games for quite some time now, and recently working on a project involving OpenGL. I was bought a book for my birthday about game programming. Most of the stuff is about how to structure your program, etc. The book is mainly focused on Windows and programming with DirectX, but does mention consoles (Xbox, PS2, gamecube). Since I own a PS2 I was wondering how I would go about writing a simple program and running it on a PS2? The pages I have looked at so far don''t seem to be very helpful, talking about how you can buy a PS2 SDK for an insanely large about of money. I was wondering: 1) Where do I start? 2) How do I compile my program? Where do I get a compiler for a ps2? 3) How do I get my program on my PS2? 4) How do I run the program on my PS2? 5) Are there any libraries, e.g. OpenGL-type graphics library available, or do the hardware calls have to be made on a lower level? 7) Are there any decent websites about this? As you can see I don''t actually know much about the PS2, but can anyone answer my questions? Thanks
Drakonite
Drakonite
quote:
Original post by jhoward
1) Where do I start?

There are two ways to go with PS2 homebrew programming. PS2Linux and PS2DEV
PS2Linux current is $100, and you get some hardware that basically makes your PS2 into a linux computer. You can then program on it like it was a Linux computer with odd hardware

PS2DEV is the name given to doing homebrew PS2 programming directly to the PS2''s hardware using freely available tools. Since PS2Linux is pretty self explainitory, all the rest of my answers will be about PS2DEV.

quote:
2) How do I compile my program? Where do I get a compiler for a ps2?

The PS2DEV website provides tools, including the cross compilers, for developing code for the PS2. Once you have written your code, you compile it using the GCC PS2 cross compiler and send it to your PS2! (Okay, there is a bit more to it than that, but you get the general idea)

quote:
4) How do I run the program on my PS2?

Actually making code run on the PS2 is a tricky bit. It generally comes down to a modchip, the PS2Linux RTE, or the PS2-Independence exploit. If you can''t find info on doing this step, the rest is worthless.

quote:
3) How do I get my program on my PS2?

When developing, you''ll almost always want to boot into one of the loader programs available: Naplink or PS2link. They work the same basic way; you use a client on your PC to send your code to the PS2. The difference is that Naplink connects using a special USB cable, and PS2link connects over a network (or crossover cable) using the PS2 Network Adapter.

quote:
5) Are there any libraries, e.g. OpenGL-type graphics library available, or do the hardware calls have to be made on a lower level?

There are a couple libraries available to help get started, including a very basic OpenGL, but it''s very much recommended to do graphics on a lower level. The nature of the PS2 makes it just about impossible to write a library with many features that will have even decent performance. OpenGL specifically, is no where near full OpenGL compliant as you just can''t do that on the PS2.
If you want any type of good performance at all, you''ll likely be writing all your own low level stuff for graphics, unless of course you are just doing simple 2d stuff

quote:
7) Are there any decent websites about this?

ps2dev.org is probably the best site. There are others with some good info as well, I just don''t have any links handy.

quote:
As you can see I don''t actually know much about the PS2, but can anyone answer my questions?
Thanks

Yes. Yes I can.
Keep in mind that programming on the PS2 is a challenge. I wouldn''t recommend it unless you have a firm grasp on C (C++ is not recommended) and are willing to put in a lot more effort, including doing a lot of things libraries on the PC do for you, on your own.



Drakonite

Shoot Pixels Not People
Shoot Pixels Not People
jhoward
jhoward
Thanks for the reply I''m checking out the ps2dev website now! On the note about C / C++, I always prefered working with C instead of C++ anyway
bobstevens
bobstevens
C++ is fine for PS2. Sony even uses STL without custom allocators on the PS2.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.