Sponsored Links

Sponsored Links

Page 1 of 2 12 LastLast
Results 1 to 10 of 11



  1. #1
    Forum Moderator PS3 News's Avatar
    Join Date
    Apr 2005
    Posts
    28,410
    Sponsored Links

    Rumor: PS3 RSX Driver in Development, May Arrive Soon

    Sponsored Links
    Update: Disane has also now [Register or Login to view links] a guide (below) on coding on the PS3 (GNU Tool-chain and CodeLite 2).

    As recently hinted, a PS3 RSX driver is rumored to be in development and may arrive soon.

    For those who are unfamiliar with it, you can check out PlayStation 3's RAM and RSX Explained as a start.

    To recap briefly: In 2007, Glaurung and IronPeter hunted for 3D graphics access from homebrew/Linux (Other OS) on the PS3.

    CNLohr shared a video of PS3 GPU Use in Linux, followed by a second video courtesy of fartist demonstrating PS3 RSX access.

    In PS3 Firmware update 2.10 Sony blocked a potential RSX exploit that allowed full GPU access on the PS3.

    This brings us to today, where Disane has posted a compilation of excerpts from [Register or Login to view links] on the PS3 RSX along with news of a rumored PlayStation 3 RSX driver in development.

    To quote, in part: "As GeoHot said so "I couldn't find a single thing that gives Linux less privilege than GameOS". So it wasn't clear until now what exactly was blocked by the Hypervisor.

    I met a member of team nouveau on IRC named Lb1 and we began to talk about the Hypervisor of the PS3 and what does it do (mostly what it blocks and what it allows and what benefits does the GeoHot hack has that could be used to port nouveau to PS3 Linux).

    Well, since my knowledge wasn't enough on GPU terms, I asked him to speak with GeoHot.

    Lb1 began to talk about how the nVidia video cards work. He mentioned that they were unable to make the system create a NV40 3D GPU object. In user space we are unable to use the NV40 3D GPU object which has the object class 0x00004097 (nVidia Chip version and 3D engine) also known as NV40TCL or NV40_CURIVE_PRIMITIVE.

    Here's what Lb1 said about the 3D context loading: "Basically there is a table called RAMHT. Which is a Hash Table with handles and channel numbers as keys and instance offsets as values to create the 3d object, and entry must be inserted here with an arbitrary handle, and pointing to a small region of memory on the card that must have the correct value".

    Today Sony has released an update that took out OtherOS support from the FAT systems. This prevents people from developing and running homebrew software on their units.

    The update is optional but if someone decides not to update then he won't be able to access PSN. Which means some games won't even work! Well, thanks a lot Sony an RSX driver couldn't come at a better time."

    Coding on the PS3 - Setting up the GNU tool-chain in CodeLite 2:

    As you may know I've been away for a while trying to find a working IDE (Integrated Development Environment) for the PS3-Linux. That performs as good as any other lightweight IDE on Windows-PC. Since the PS3 has such fewer memory only a handful of IDEs are capable of running on the PS3 with good performance.

    Under performance I mean the time it takes to open up a window, browse the options menu, loading time, response time, etc. Apart from speed I also wanted to find an IDE which can be fully modified to work with GNU Tool-chain Sony designed and made available on the PS3-Linux and other Cell Platforms.

    So far I tried 3 IDEs which were Code::Blocks (is a bit slower than CodeLite and less configurable, also very unresponsive) Eclipse (which takes a lot of time to load up, unresponsive and it requires a lot of extra configuration, its a horrible choice to install on the PS3) and finally CodeLite 2 (this is not an advertisement of course, CodeLite 2 is very easy to use and easy to configure to work with the GNU compilers).

    I used Ubuntu 9.10 but I think CodeLite 2 would work on any Linux that supports PowerPC64 architecture (which the PS3 supports).

    Let's start with a FAQ, shall we:

    "Why did you write this tutorial? Why should I bother reading it?"

    Sony took out OtherOS a month ago and forced people to upgrade their systems. People had to upgrade to be able to use their PS3s for games and to access PSN. Now, I know some of you are stuck on ver. 3.15 and waiting for the glorious days of homebrew to come. If you're the person I'm talking about then this tutorial is for you.

    This tutorial gives you a bit of insight on how homebrew can be made on the PS3 (PS3 homebrew mad with the PS3, now which other console allowed that in the past?). The experience and knowledge you gain here can also benefit you when we can finally run unsigned code on GameOS.

    "What kind of applications can we write on the PS3?"

    We can write any kind of application on the PS3-Linux even games (Which Sony really doesn't like to hear, no wonder they've taken out Linux before anyone could make a graphics accelerator for the PS3-Linux.) or user applications. Many tools and libraries were ported on PowerPC64 in the recent time (the 64 bit architectures are taking over, we can't really do anything about this :)).

    There's also a chance that we can run our code on the XMB (VSH) side of the PS3 some day. You can't really start homebrew development too early :). A tutorial came out a few days ago on how to run XBMC on the PS3. But it runs damn slow. Well you could be the one who could utilize the SPUs to gain some speed and make it run faster. You never know unless you try :)

    "But you can install the cell simulator on the PC why would you bother with coding on the PS3?"

    Well, this is all true, you can install the Cell System Simulator and work on that. But it requires Linux installed on your PC. Also in some cases the user doesn't have the luxury to have another computer at home or when he's/she's traveling a lot and can only carry one computer (or a console in our case).

    There are some other benefits you can gain by coding directly on your PS3. You don't have to configure a system simulator, you can directly run and debug your code on the target platform and see how the hardware reacts.

    Alright, let's see what do we need in order to get started:

    • a PS3 with Linux installed (as I mentioned I used Ubuntu ver. 9.10 codename Karmic)
    • able to access the Internet on your PS3-Linux
    • mouse and keyboard (the PS3 supports all kinds of keyboards and mice)
    • Cell SDK (I'll show you how to install it and configure your development environment so don't panic),WxWidgets 2.8+,libcurl (which you can get by installing "gnome-core-devel build-essential", again don't panic I'll reveal the process to you).
    • the source code of Codelite 2.5.2 (build 4031), which you can find here: [Register or Login to view links]
    • and my tutorial of course :D

    Let's jump with both feet:

    I assume you have completed the first 3 requirements I mentioned above. The steps we are going to take below are going to take a while (not because we are going to do so many things, it's because the System is very slow :() you could read some C/C++ tutorials or the Cell-Programming-Primer while your waiting for some of the tasks to complete or do anything else if your already familiar with C/C++ and the Cell/BE.

    1. Opening the Terminal: Applications -> Accessories -> Terminal. If you want to, you can customize your Terminal to make it more appealing to you, cause we are going to spend most of our time using this. For example: I managed to make a matrix theme which reminded me on the 90's DOS :) using full screen can also help you feel more comfortable.

    2. So let's start by installing the Cell SDK:

    [Register or Login to view code]

    In here, we need to type in our user password to allow the installation. Let's accept the installation with 'y' and then wait for the system to download and install the packages for us.

    3. in order to install SPU-Binutils type in the following:

    [Register or Login to view code]

    Again, allow everything so we can proceed with the installation.

    4. We also need to install the GTK+, WxWidgets libraries and the rest of the libraries we need in order to compile CodeLite 2. So here's how we proceed:

    [Register or Login to view code]

    5. Let's check the compilers we have installed and the ones we already had. Start with GCC (GNU C compiler):

    [Register or Login to view code]

    This way we can check the version number of our compiler and some other information (where it accesses our Include and Library files.)
    For example it gave me the following after I exexuted the CLI code above:

    [Register or Login to view code]

    We also might want to check the following compilers:

    [Register or Login to view code]

    gcc and g++ are used for compiling PowerPC 32 bit C/C++ code, while ppu-gcc and ppu-g++ are used for compiling PowerPC 64 bit C/C++ code. We also have our SPU (Synergistic Processor Unit) compilers spu-gcc and spu-g++.

    6. Now, that we have the SDK installed and we checked if every thing's fine with the compilers let's move on to setting up our development environment. I ran into some problems which gave me this error:

    [Register or Login to view code]

    When I was trying to compile PPC64 code. We can easily fix this by typing in the following CLI code:

    [Register or Login to view code]

    The problem is that this will only solve our problem for one occasion and we need to retype it again when we reboot the system. We can fix this by modifying our bash profile:

    [Register or Login to view code]

    We find ourselves in the NANO text editor (if you don't like it then you can use gedit or any other text editor you like).

    The document we opened will probably be empty and we only need to add the following line (if not then just add the text to the bottom of the existing lines):

    [Register or Login to view code]

    Our text should look something like this in NANO (remember not to delete any text that was already in the file, this picture shows only an example):


    After we've entered the text, let's check if every thing's fine and then press CTRL+O key combination to save the file and then press Enter to accept the changes. After that press CTRL+X to exit from NANO. There's another file we need to modify in order to get what we want. Type in:

    [Register or Login to view code]

    To open up .bashrc. This file wont be empty for sure. So just press the Down button until you reach the bottom of the entries and add the following line:

    [Register or Login to view code]


    Save and exit NANO the same way as you did above. Now we can compile PPC64 code in our Terminal anytime we want.

    Mounting SPUFS:

    This is a problem I ran into when I was trying to compile SPU code. The error it produces when compiling code with spu-gcc or spu-g++ looks something like this:

    [Register or Login to view code]

    Fixing this problem is easy though. Let's check what's mounted so far with the following CLI code:

    [Register or Login to view code]

    If we don't get something similar:

    [Register or Login to view code]

    Then that means that the SPUFS is not mounted and we need to fix this. Start by editing the fstab:

    [Register or Login to view code]

    or

    [Register or Login to view code]

    Then we add the following lines below the already existing ones:

    [Register or Login to view code]

    Save the modified file and exit from your chosen text editor.
    Let's mount the SPUFS:

    [Register or Login to view code]

    and check if its mounted:

    [Register or Login to view code]

    or

    [Register or Login to view code]

    7. Our Seventh step will be downloading, compiling and installing CodeLite 2. There's also an older version of CodeLite 1 somewhere on the Ubuntu Software Base. I couldn't find the never version which was already compiled so I decided to compile it on my PS3 (it took a while, and it will take a while for you as well). If anyone can make a proper package and upload it on Ubuntu's software base then please do so and pm me so I can update this tutorial:

    Let's use some kind of Web Browser (I recommend FireFox although it eats up too much memory but that's my opinion.) and navigate to [Register or Login to view links]

    Let's download our file to /home/user_name/Downloads (where user_name is your user name). In order to extract the source files let's type in the following lines into the Terminal:

    [Register or Login to view code]

    8. Configuring and compiling then registering our application is the next step:

    [Register or Login to view code]

    This will run the shell scrip which produces the make files we need to execute in order to install the application. Once this is done type in:

    [Register or Login to view code]

    This is a screenshot I made with VNC while compiling CodeLite 2:


    This is going to take a while but once It's been done we can type in:

    [Register or Login to view code]

    or if it fails then just type in:

    [Register or Login to view code]

    CodeLite 2 is finally installed.

    Starting up CodeLite 2 and configuring it.

    Let's start by starting up CodeLite 2. If everything gone well then you should have it's icon on your desktop. You can also find the shortcut in Applications-> Programming -> CodeLite.

    After the welcome screen appears we find our selves in the Workspace Setup screen. Here we need to type in the name of the workspace and it's location and also show the IDE where are the Include and Library files are located. These are located in:

    [Register or Login to view code]

    After we have input the important information let's just accept everything and wait for CodeLite to finish configuring it self (this can also take a while).

    After the configuration is finished we find our selves at the CodeLite 2 home page:


    This is not the manual for CodeLite so I won't go trough all the menus, options and settings here. I'm only going to show you how to set it up in order to compile and run PPC64 and SPU code.

    Setting up the GNU tool-chain for the Cell/BE in CodeLite:

    Navigate to Settings -> Build Settings. Click on the New button to create a new compiler and type in ppu-g++ (without the quotes). Then again click on New and then type in the following name: spu-g++. Here's some visual help on how to setup our newly created compilers:


    Here we setup the compilers we want CodeLite to call when we are compiling our source codes.


    Here we setup the output files and their extension and also show the Global Paths to our Include and Library files. We need to do the same to our spu-g++ only this time instead of ppu-g++ we need to type in spu-g++

    Other settings like Compiler Options and Linker Options we can leave empty for now we won't be using them in this tutorial. But if you want to set them up then use the gnu-g++ compiler's settings as a reference. spu-g++ and ppu-g++ compilers are both part of the GNU tool-chain so their options are mostly the same.

    Creating a PPU Hello World application.

    Now that we have configured the IDE to support our compilers let's check if they're working properly. First thing we want to do is create a folder for our hello_ppu project. We can do this by using the following CLI code in the Terminal:

    [Register or Login to view code]

    or we can skip this step and create it when we are creating our new project. Let's see how it's done:

    Workspace -> Create New Project. We should get something like this below:


    Let's see step by step what needs to be done:

    Categories -> Console
    Templates -> Simple Executable (g++)
    Compiler type -> ppu-g++

    (dont forget to create a folder for your project in ~/.codelite/ if you haven't done that already)
    Project Name -> hello_ppu (our executable will have the same name).
    Click OK.

    You might want to close the window below the code field use the CTRL+ALT+O key combinations. If you look at the Workspace View window on the left side of your CodeLite window you will see a blue hello_ppu folder inside that folder you can find the src folder and inside that src folder you can find main.cpp. Double click on this file to open it up. You should see the following C source code:

    [Register or Login to view code]

    Click on Build -> Build and Run Project (or use the shortcut keys CTRL+F9) in order to compile the source code for our simple hello world program. If you get the following text (error):

    [Register or Login to view code]

    then go to Settings -> Enviroment Variables and insert the following line below or above the already existing one(s):

    [Register or Login to view code]


    then try running your code again (CTRL+F5).


    Creating a SPU Hello World application.

    Let's close our current workspace by clicking on Workspace -> Close Workspace. Let's create a new project

    Workspace -> Create New Project.
    Our settings are as follows:
    Categories -> Console
    Templates -> Simple Executable (g++)
    compiler type -> spu-g++

    (we should also create a new folder for our hello_spu project in ~/.codelite/ also don't forget to give a name for our project, name it hello_spu.Click OK.

    Open up main.cpp and modify the code to the following:

    [Register or Login to view code]

    Now, we can compile and run our code (CTRL+F9) and we get the same window we had when we executed our code on the PPU. If we had left the code as it was then the compiler would've not produce any executable, which isn't good.

    We need to understand that SPU code is a little bit different then PPU code, you can't just execute it like any code. The PPU needs to find a suitable SPU to load the code into. But how do we know which SPU was selected by the PPU? Let's print it out the number of our SPU using the spe variable. Modify the code to look more like this:

    [Register or Login to view code]

    If we compile our code then we run into an error again... :

    [Register or Login to view code]

    (no wonder why this tutorial was wrote, imagine your self fighting with these bugs alone :() We can get rid of this problem for the time being by asking the IDE to compile this code differently and by not using the make file (you can also make a different make command for it but I just couldn't figure it out how, if someone finds out how to do it, then pm me so i can update this tutorial).

    So click on Workspace -> Open Active Project Settings or use the shortcut key combination: ALT+F7. Click on the Custom Build tab and then check the Enable Custom Build box. Then double click on the white space next to Build. The following line goes here:

    [Register or Login to view code]

    To check if you did everything OK, here's a screenshot:


    Then click OK and compile and run your code:


    Again, if anyone finds a suitable method to compile this code with make then pm me. This code compiles fine if you use CLI.

    Loading SPU code using PPU code.

    Close your previous project and create a new one. Let's use the settings we did in the first project (hello_ppu). Create a new folder for our project in ~/.codelite and name it load_hello_spu. Don't forget to name your project as well.Click OK.

    The following code comes from the Cell-Programming-Primer document which is a very nice source to start programming for the Cell/BE. I recommend it to anyone who would like to develop applications for the Cell/BE. So, our main.cpp will look like this:

    [Register or Login to view code]

    The code above is a simple SPU code loader which doesn't use isolation to load your unsigned code :). Click on the Workspace -> Open Active Project Settings then click on the Linker tab. Our Library Path should point to /usr/lib/ and the Library we need to add is libspe2.a. Click OK.

    If we happen to compile and run our code then we are going to bump into the following error:

    [Register or Login to view code]

    To get rid of this problem we need to copy the SPU code into the same directory where the loader's binary is. We can open up the file browser and quickly drag hello_spu from ~/.codelite/hello_spu/Debug into ~/.codelite/load_hello_spu/Debug. If we don't want to wait for the file browser to open up and navigate to these folders then let's use CLI code instead in our Terminal:

    [Register or Login to view code]

    Compile and run the load_hello_spu code in CodeLite to get the following results:


    If you look at the result, you should see that SPU 0 was chosen to load the SPU code. Interesting, isn't it? In isolation mode you can't tell which SPU goes into isolation mode which isn't good. But we will get back to that in another tutorial perhaps...

    Rumor: PS3 RSX Driver in Development, May Arrive Soon

    Rumor: PS3 RSX Driver in Development, May Arrive Soon

    Rumor: PS3 RSX Driver in Development, May Arrive Soon

    More PlayStation 3 News...
    Attached Thumbnails<br><br> Attached Thumbnails

    codelite2a.png   nanoeditingb.png   bashrcsetupc.png   compilingcodelite2onapsd.png   codelite2homee.png  

    settingupg1f.png   settingupg2g.png   creatingnewprojecth.png   settingupenviromentvarii.png   ppc64helloworldj.png  


  2. #2
    Contributor livpool's Avatar
    Join Date
    Sep 2009
    Posts
    211
    Sponsored Links
    Sponsored Links
    aww yeaaa i can't wait for this!
    Attached Thumbnails<br><br> Attached Thumbnails

    custombuildk.png   spuhelloworldl.png   loadhellospum.png   ppc64helloworld.png  

  3. #3
    Contributor tworok's Avatar
    Join Date
    Jan 2008
    Posts
    95
    Sponsored Links
    Sponsored Links
    the ps3 scene is getting better and better

  4. #4
    Senior Member cyberfix's Avatar
    Join Date
    Oct 2005
    Posts
    55
    The RSX driver would only be beneficial to non-slim PS3s that do not have the latest firmware. Is that right?

    How many people will actually stay at a lower firmware just for homebrew software in linux... It will be much more interesting if they find a way to allow linux/homebrew in a PS3 slim. This would open a whole new world for others and give more support to breakthroughs like this!

  5. #5
    Senior Member cfwprophet's Avatar
    Join Date
    Jul 2008
    Posts
    1,815
    Uhmm... do you don't think that if they get deeper and deeper into the whole thing and can reverse some interesting files, that this maybe also could lead into a OtherOS activation on Slim Models?

    Look at the psp3004 models.I will tendend to made a prophecy and will say know.....Hackers will activate OtherOS on Slim Models "OR" Hackers will find a way to ALSO do a CFW for the PS3 Slim Models.

    But for know let them do job and be also excited about a full hacked FAT PS3 with enabled OtherOS function. (one step after another)

  6. #6
    Senior Member cyberfix's Avatar
    Join Date
    Oct 2005
    Posts
    55
    I completely agree... I just wanted to make sure I was not missing something else. I have both the fat original 60GB and one of the new slim models. So, I am ready either way! LOL

  7. #7
    Contributor PimpinPlayah's Avatar
    Join Date
    Apr 2007
    Posts
    19
    Still holding off on the firmware update. Hope some custom firmware that continues to support the OtherOS feature is released soon... Until then, I'll be keeping my fingers crossed for better support

  8. #8
    Senior Member cyberfix's Avatar
    Join Date
    Oct 2005
    Posts
    55
    Quote Originally Posted by PimpinPlayah View Post
    Still holding off on the firmware update. Hope some custom firmware that continues to support the OtherOS feature is released soon... Until then, I'll be keeping my fingers crossed for better support
    That would be awesome to have CFW like the PSP does. The problem I see is that they have no way to sign a custom firmware. I don't think the dumps are going to provide any keys unless the big guy actually left them unencrypted at one point in memory. Maybe they can get some point of attach that will let them load a CFW without validation by bypassing security all together. It will be interesting to see more.

  9. #9
    Senior Member cfwprophet's Avatar
    Join Date
    Jul 2008
    Posts
    1,815
    But the OtherOS don't need any signing. So if they are able to reverse lv0,lv1,lv2,RSX driver and so on then we can run it over the OtherOS with no need for any signing

  10. #10
    Senior Member TUHTA's Avatar
    Join Date
    Sep 2008
    Posts
    323
    PS3 is really need EXCELLENT WORKING RSX chips! There are so many many FAT/SLIMS PS3s was fixed by ME!

    IT HAS really high temperature when its working! And it has to be rebolled or fixed by Heatgun!

    Really BAD... $ony did RSX really bad, it has to be modified by using new technology OF COURSE!!

 

Sponsored Links
Page 1 of 2 12 LastLast
Advertising - Affiliates - Contact Us - PS3 Downloads - Privacy Statement - Site Rules - Top - © 2014 PlayStation 3 News