Go Back  
Reply
 
Thread Tools
Old 09-26-2010   #1
NZHawk
Homebrew Developer
 
Join Date: Feb 2008
Location: New Zealand
Posts: 174
Likes: 12
Liked 43 Times in 14 Posts
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Post [Source] Syscall 38 Example

First, Thanks to dwrfcrank, rck`d, L-Ron from @efnet #ps3dev!

I think its a good idea for dev's to share code and examples that they have, get more people into developing homebrew for the ps3. I am by no means an expert, but I take this as mearly a hobby, and am learning on the go.

Just a quick example app that will change the Blu-Ray Disk option on the XMB to tha path you specify. (This can be any place on the HDD, USB, Flash etc, but it must follow the game directory structor for the ps3 to reconise it)

Enjoy:

Code:
/*    PS3 SDK Sample App                                        */
/*                    syscall36 - as used by BackupManager    */
/*    NZHawk                                                    */
/*    --------BIG THANKS TO  dwrfcrank, rck`d, L-Ron FOR BASE */
/*                                        AND TIPS!            */
/*                                                            */
/*    By calling the system call created by the PSGoove         */
/*        payload, we can change the mount point of the blu    */
/*        ray option on the XMB, just like BackupManger does    */
/*        but point it to anything.                            */

// Includes
#include <sys/process.h>
#include <sys/syscall.h>

// Defines
#define SYSCALL_MOUNT_BD    36

// Process setup, as seen in the SDK Documentation
SYS_PROCESS_PARAM(1001, 0x10000)

// Main sub
int main(){
    // Create a new char pointer and set the pointee's contents to the string
    char *path = "/dev_usb000/app/";
    // The actuall system call. Must Explicitly cast the path as an uint64_t
    system_call_1(SYSCALL_MOUNT_BD, (uint64_t)path);
    // Once finished, Exit the app and return to xmb
    sys_process_exit(0);
}
__________________
NZHawk is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



PS3Hax.net is Copyright © 2010-2013.
Use of this site is governed by our Terms of Use and Privacy Policy. All Trademarks and images are owned by their respected owners.
Posts and links are subject to each author on this forum and are no way affiliated with the operations and/or opinions of ps3hax.net
All times are GMT -5. The time now is 06:22 PM.