PS4 News on Facebook! PS4 News on Twitter! PS4 News on YouTube! PS4 News RSS Feed!

Home PS4 News - Latest PlayStation 4 and PS3 News

August 18, 2010 // 7:05 pm - Today Disane has made available a guide to reversing on PS3 Linux using the GNU Toolchain.

Prerequisites for it include computer science, assembly and C knowledge along with having available the GNU toolchain for the Cell Processor installed on PS3 Linux.

PPC32-64 assembly:

• IBM Introduction to PowerPC assembly
• MacTech PPC assembly introduction
• IBM's article series (1-4) on PowerPC assembly
• Beginners guide to PPC32 assembly
• MacTech PPC Function Calls
• IBM developers guide to the PPC architecture
• PPC compiler writers guide

Official PPC32-64 Docs:

• PPC32
• PPC64

Cell Processor SPU assembly:

• IBM SPU assembly article series
• About the SPU ABI
• Cell BE Linux ABI
• Cell Processor ABI

We are also going to use the following documentations when we are reversing SPU code:

• SPU language specification
• SPU Instruction Set Architecture

So now that we are through the introduction. Let's get down and dirty. The first thing we need is an application we can reverse. Well, we could try and reverse existing applications compiled on our PPC64 Linux but that would take too much time and besides this is not a book. So we are going to start with something very basic.

The application we are going to reverse today is the all times classic "Guessing Game" written in C. The idea is simple. The computer generates a number between 1 and 10 and the player has to guess which number has the computer generated. Simple, right? In C probably yes but in PPC and SPU assembly this could be a real challenge even for experienced programmers.

Well we are not going to write the game in PPC and SPU assembly simply because of two reasons. The first one is that C is portable code. We can compile our C code to run on the PPU or on the SPU. Cool, what's the other reason? Well the other reason is that this is a tutorial on reversing SPU and PPU code and not an assembly tutorial.

About the sample code I'm going to show you. We are not going to use classes or anything fancy this is a classic C (sequential programming 101) so no Object Oriented Programming introduced. No exceptions to invoke or anything fancy. We are going to use one single Game Loop to keep the game going until the player wins (yeah you can't lose in this game, but you can modify it if you want, the possibilities are endless).

Alright so let's fire up Linux on our PS3 and open up the Terminal. I don't know about you, but I've got Ubuntu 10.4 on my machine. Locate a nice spot like ~/Projects/Reversing/guessing_game/ (use cd command to get to you home directory then mkdir to create the directories you need) and here we can create a text document using gedit or nano (type in gedit or nano).

The rest of the Guide to Reversing on PS3 Linux Using the GNU Toolchain can be found HERE or linked above!

Guide to Reversing on PS3 Linux Using the GNU Toolchain

PlayStation Follow us on Twitter, Facebook and join us at our new site WWW.PSXHAX.COM!

#4 - duventj - August 25, 2010 // 1:02 am
duventj's Avatar
Interesting and very nice post...

Merci beaucoup !!

#3 - red8316 - August 19, 2010 // 2:32 am
red8316's Avatar
Wowza, lots of information, very comprehensive post. Looks like a useful contribution. Nice work.

#2 - PS4 News - August 19, 2010 // 2:24 am
PS4 News's Avatar
Honestly, it's just for budding Devs who wish to learn how to reverse-engineer... most end-users probably won't ever use it.

#1 - tjay17 - August 19, 2010 // 2:16 am
tjay17's Avatar
What can you do with this?