Sunday, January 14, 2007

PS/3 goes retro: PONG using the Wiimote

I have hacked together a Python Game, Wiipong/3 (source available), that lets you play pong on the PS/3 using Nintendo's Wiimote. You simply tilt the controller to move the paddle on the screen. The little game builds upon the wiimote driver for linux, called WMD.

This is all possible thanks to the brave new world, which is rapidly becoming an Open World. A few years ago, I could not have predicted that game console manufacturers would be using open standards, and providing Linux kernels. Maybe Indrema was just ahead of its time.

Some details: the action shot shows a Xubuntu desktop, projected at 1080p with a high end DLP projector (Optoma HD-81). The game uses WMD to interface with the wiimote, and PyGame for the 2D graphics. WMD uses the standard Linux bluetooth stack BlueZ. The Wiimote is sold for 40 euros, and makes a nice interface device for any GNU/Linux system.

My thanks go to Robert Belleman who researches Scientific Visualization and Virtual Reality. Robert suggested doing this hack.

Thursday, January 11, 2007

Jumping Platforms

Getting Yellow Dog Linux installed was a lot of fun. But when I wanted to do some serious development, I quickly became stuck with the yum tool, and managed to damage my dependency tree. At first, I tried Fedora Core 6, but when I had that on my hard disk, I decided that I really wanted apt, and not yum. Debian and Ubuntu have not yet provided PS/3 install disks, but there is this neat little thing called debootstrap.

Using this, I could create an Ubuntu edgy installation on a USB memory stick using Fedora. After booting with the memory stick, the same process installed Ubuntu back onto the hard disk again.

So that means that I'm now apt-getting my way towards a robust, powerful OS on the PS/3. Now it is time to start developing for the Cell Broadband Engine and its powerful SPUs.

Friday, January 5, 2007

The penguin unleashed

This blog entry is written using the Firefox browser that is running on Yellow Dog Linux for the PS/3. Sony has done a good job on making it easy for users to run another OS. Also, Yellow Dog Linux installs right out of the box. The install must be done in text-mode, because I can only run 480i. After the installation is done, the video signal can be configured to do 576i as well. This is one area where Linux does better than Sony's GameOS: the latter will not do 576i due to the fact that my PS/3 was a Japanese edition. The distribution comes with a GCC cross compiler for the SPU units. As I do some work for the OpenDE project, I tried building that. I'm happy to say that OpenDE builds out of the box.

First gaming experience

The first thing you will want to know with a new toy like this: is the gaming any good? Well, I must admit that my expectations were considerably lowered when reading the reviews on the net. Metacritic is always an excellent source for reviews. From this I learned that the real gems are not there yet. Also it turns out that Call of Duty III on the xbox360 is better than the PS/3 version.

So, where to get the games? As they are not available yet in Europe, I would need to get them from US or Japan. But fortunately, Sony has its own version of Microsoft's XBOX Live Marketplace. Here you can download demos for a lot of games, to get a taste. Downloading a demo is convenient and fast, so I had Motor Storm on my harddisk in no time. Wow!, what a game. It is instantly playable, no learning curve, and brutal action from the get-go. The physics engine makes this game really shine. The physics are accurate, yet adapted for Arcade play. So now I know: even if you get a PS/3 for gaming, instead of getting one for running GNU/Linux, you will still have a great time.

Thursday, January 4, 2007

Super Computing?

So, can you do Super Computing on a PS/3? Well, people have been evaluating the Cell processor for scientific computing. The results are impressive. So, 0.2 teraflop per second (single precision)... is that super computing?

My day job is Virtual Reality Engineer at the Dutch Super Computing centre SARA. Currently, we have two SGI super computers running at our centre. The older one is a MIPS based machine from the year 2000 (see photo) that fills up a large room. It is comprised of 1024 processors, and at the time of installation, peaked at 1 teraflop/s. Going by the standards of the year 2000, the PS3 is basically a super computer in a very small form factor. The SGI had a 1 Terabyte shared memory though, whereas the PS3 features a mere 256 Mbyte. But what is really impressive, is the fact that the Cell processor can deliver this 0.2 teraflop/s using merely 40 Watt electrical power.

The real challenge here, is to unlock all that power. With the Cell processor, the parallel programming is a very low-level and explicit affair. I'm really anxious to see if I can get some performance out of the processor, using GNU/Linux.

Stuck at 480i

Getting a decent video signal from my PS3 is proving to be quite a challenge. Out of the box, my Japanese console is generating an interlaced NTSC signal of 480 lines on its composite video connector. This is pretty bad. NTSC 480i is the ugliest video standard available. And to make matters worse, it is made available as composite video, the second worst possible connection after RF connectors. In the settings menu, I have been unable to force a PAL (576i) mode.

So, how to proceed? Rumor has it that PS2 video cables should work on the PS3. I managed to find a playstation SCART cable, but the price was a ridiculous 49 euros (US$ 65). This is way too steep for a very simple PS2 cable, for which I'm not 100% sure will work with PS3.

Other alternatives? Well, the proper way to hook up a PS3 to a screen is via HDMI. The PS3 has a really good HDMI port that supports version 1.3. The PS3 lacks a proper video scaler though, so if you want to go HDMI, you will want a native 1080p screen. Additionally, your HDTV screen needs to support HDCP. This means getting decent video signals from your PS3 is a very expensive undertaking. At least my XBOX360 has standard VGA output, available at all sorts of screen resolutions.

The adventure begins

It has begun. I just signed off the package that was delivered to me from Japan. I was relieved to find in it, the 0.2 TeraFlop/s supercomputer that they call PS/3. The 20Gbyte model shines in its majestic piano black. The ebay seller was really great. Getting the electrical juice into the beast is easier than I expected: I do not need a JAP/EUR converter, just a regular euro powercable from any old computer will do. The manuals are in Japanese only, so I have to do some googling now, and then I can switch it on. I will report back later.