Tuesday, July 28, 2009

PS2 hardware explained : Overview

Today I start with giving the answer to the question in my first post "Why Ps2?"

I actually can't remember when I started to do some programming on the PS2 but its likely like 5-6 years ago. In the start it was hard and a steep curve for sure. The access you have to the hardware is really low-level making coding for the PS2 very unforgiving (yet fun!). If you happens to get some number wrong in your DMA-chain(s) for example the DMA will lock up and all you know is that something is wrong somewhere.

Nowadays I have written my own code that verifies a DMA-chain when the DMA locks up. It catches some errors but not all. The PS2 for example has no cache-snooping meaning that the data you send to the DMA must be in main memory and this of course can lead to lots of 'funny' problems.

One of the things that makes me still want to code for it is that no one has really pushed the hardware that well. Some games (from Insomniac and Naughty Dog) is likely the ones that pushed the hardware the most but I know that there is still much to give in terms of cool stuff one can do.

In the article series I will show more of how you can do creative things for the PS2 even if quite simple it's very flexible and it's all up to the programmer how to sort out all the problems. There are for sure a whole range of annoying problems/drawbacks but that's the same on all hardware anyway. So the short answer is that I like the hardware and I think it can be pushed further.

The long answer I hope to tell with this series.

Playstation 2 hardly needs any introduction and for you that lived under a rock for the past ten years can read up here: http://en.wikipedia.org/wiki/Playstation_2

Lets start with a picture and some simple facts about the hardware (I will go in detail about each unit/part later on)

These are the basic components that makes up the hardware (Text taken from Wikipedia with some changes)
  • CPU: MIPS R5900 64-bit with 128-bit MMI instructions "Emotion Engine" (I hate that name so "EE Core" or just EE from now on) clocked at 294.912 MHz (299 MHz on newer versions)
  • GS: "Graphics Synthesizer" (Hate that name as well, GS from now on) clocked at 147 MHz
  • Vector Units: VU0 and VU1 (Floating Point Multiply Accumulator × 9, Floating Point Divider × 1), 32-bit, at 150 MHz.
  • DMA: Main Bus running at 150Mhz giving a total bandwidth of 2.4GB/se.The DMAC controls all data transfers in the system. The DMAC transfers in parallel with the CPU
  • IPU: Image processing Unit (Used when doing block decoding of mpeg data for movies)
  • IOP: Input Output Processor. Handles all communication with I/O devices (gamepad, CD/DVD, Network, USB, etc). This is also the same CPU that is used in the PS1 and is used for BC with PS1 games on Ps2)
  • SPU2: Sound Processor (No, it's not the same kind of SPU that is used in Cell/PS3 :)
I haven't gone in to detail yet as this post would be very long then. Some things that I haven't touched on yet is the VIF and the GIF. They will be much more detailed later on but these are interfaces to the VUs and the GS that you use when you 'talk' with them.

Next post I will detail a bit more about the GS and the DMA and also show a very small code example of how to actually get some rendering going on the PS2


  1. nice, looking forward to see some code then..

  2. As a completly PS2 coding n00b I'd actually like to know if you own a PS2 SDK and how much it costs.

    Looking forward to your upcoming posts -> Ah uh Push it! ;)

  3. Rene Schulte: All I write about here (or the code I post) will be independent from any SDK or use the free ps2sdk from http://www.ps2dev.org

    I heard that Sony has dropped the prices for real PS2DEV kits and such but it won't be covered here.

  4. Hello friends, I love the articles about the hardware, it excites me, some time at the university conducted a study called bluetooth laser keyboard, where I learned about this, is a branch of the technology very interesting