Programming the PS2 controller

Started by
3 comments, last by Naku 16 years, 8 months ago
If you use C++ for all of the bigger consoles, then what commands do you type to get the PS2 to recognise input from the conroller? and what compiler would you use for the Playstation 2?
Advertisement
Quote:Original post by YoungOne
If you use C++ for all of the bigger consoles, then what commands do you type to get the PS2 to recognise input from the conroller? and what compiler would you use for the Playstation 2?
The functions from the PS2 API. And I assume that the PS2 has its own compiler that you can use with your IDE. At my last work, we used MSVC 6.0 (*scream*) for PS2 development, although I wasn't involved in it.
Curious today are we "YoungOne"?
For the PS2 programming, you are probably talking more C than C++, not to say there are no C++ games for the ps2,
just that C code was defacto for a while.
And the compiler for this is again, probably provided to you by the Dev kit people (sony or a licensed distributor of dev technology)

All the "engine" code, including controller access is through APIs provided by Sony with their dev kit.
This is likely abstracted by in house engines, but starts out with the console's dev API.
Quote:Original post by KulSeran
For the PS2 programming, you are probably talking more C than C++, not to say there are no C++ games for the ps2,
just that C code was defacto for a while.
And the compiler for this is again, probably provided to you by the Dev kit people (sony or a licensed distributor of dev technology)


Many, if not most, PS2 developers do use C++, and a C++ compiler is a standard component of the SDK. The PS2 linux kit, for example, ships with gcc 2.95.2, complete with C++ headers and libraries. Note that PS2 programming will also generally involve some amount of assembly-level VU programming (though there is a C-like compiler for VU code as well).

C++ became widespread in console development during the PS2/Xbox/Gamecube era; C and similar-level languages were primarily used during the PS1/Saturn/N64 era, and to a lesser extent the 16-bit era (for example, several EA sports titles on the Genesis were programmed in Pascal).

As for the OP's question, it really depends on the development environment. On PS2 Linux, it's as simple as reading data from /dev/ps2pad00 (or /dev/ps2pad10 for the second controller); with the professional dev kit, it involves either calling a library function, or using a custom function that triggers code on the IOP.
There are a few compilers available for the PS2 depending on the development suite you use. We used ProDG which came with the PS2cc compiler. It has plugins for Visual Studio 6 (so it'll be what Evil Steve's company used too, most people did) and other VS versions, we use 2003. It used a custom debugging enviroment rather than VS's built in debugger, one that has similar versions available for other platforms SN develop tools for such as the PSP.

Most of our PS2 development used C, but we have made a couple of games where we used C++ instead, you can even use a port of STL.
APE

This topic is closed to new replies.

Advertisement