Post: [TUT] using system calls through rtm
11-02-2014, 05:12 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); What is a system call? :
a system call is the fundamental interface between an application and the Lv2 kernel
What can i do with system calls? :
you can do allot... from setting the led light to setting a console id
(You must login or register to view this content.)
How to use system calls through rtm:
1: make your ppc code:
to make your ppc code your obviously going to need to know some ppc,
also remeber that the instruction to make a system call is "sc" but for some reason this instruction will not work with chocos ppc compiler so the bytes for it are: 0x44,0x00,0x00,0x02.
it will look somthing like this:
You must login or register to view this content.
remeber to load r11 with the syscall index you want, then add the system call instruction (in bytes) to your compiled ppc code.
You must login or register to view this content.
2: finding a function/location to write into:
i always use the fps function but the fog function should work fine to.
go into ida-> load elf -> view ->sub views-> strings -> alt + t (search) -> "fps:" -> click on the string -> click on its x ref -> goto the top of location + put in text view -> copy address.
now your also going to know how big the location is. becuase you need to write a certin amount of nop instructions to write.
your also going to need the init ppc code you can do this by either changing the compare value or changing the branch function, example: if its bne -> bge (bne = branch if not equal, bge = branch if greater or equal)

3: Writing the ppc (c++)
how to make a "byte" in c++:
    unsigned char buffer[] = {(ppc here)};

or
    unsigned char buffer[size] = {(ppc here)};

once you have that your going to need to make your nop byte array (this is where size comes in)
i recommend goin into the location in ida and fill it up with nop until the end of the location.
once you have that you just need to write it:
    
#define FUNC_ADDR 0x0000
#define INIT_ADDR 0x00000
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,FUNC_ADDR,sizeof(nop),nop);
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,FUNC_ADDR,sizeof(ppc),ppc);
char* txt = "milky\n";
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,0x2200000,strlen(txt) + 1,(unsigned char*)txt);
unsigned char init[2] = {0x41, 00};
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,INIT_ADDR,2,init);

have fun, also i know this can be kind of confusing so tell me if u would like a video tutorial
also here is my source(c++): You must login or register to view this content.
NOTICE: if you decide to use this method for a cid stealer you will be easily caught
credits:
blb - showing me abit how to use system calls in ppc
choco - ppc compiler

The following 7 users say thank you to milky4444 for this useful post:

Connerg123, FusionIsDaName, NickBeHaxing, Smoky420, Smooth, Swaqq, Laser
11-02-2014, 06:39 PM #2
optantic
Pokemon Trainer
Thanks
How do you set nop on a breakpoint address with .sprx?
It kills the sprx Process if use SetBYTE(bpaddr, 0x60000000);
11-02-2014, 08:41 PM #3
Cain532
Vault dweller
great tutorial! I'm sure this will help a lot of people Happy btw, in case you weren't aware, you can share images a little better by using IMAGEURL [ / i m g ] ((without the spaces)) this will make it easier for a lot of people viewing the tut.

Keep it up!!
11-03-2014, 01:26 AM #4
Thank you!
why use RTE nop bp are no problem but use sprx no bp will freeze game ? Please tell me :(
11-03-2014, 09:32 PM #5
Yenix
Do a barrel roll!
Awesome Release Milky, Keep It Up Happy
11-30-2014, 07:26 PM #6
Originally posted by optantic View Post
Thanks
How do you set nop on a breakpoint address with .sprx?
It kills the sprx Process if use SetBYTE(bpaddr, 0x60000000);


Why would you try this way with a sprx? You can just call the system call...
11-30-2014, 10:52 PM #7
Originally posted by milky4444 View Post
What is a system call? :
a system call is the fundamental interface between an application and the Lv2 kernel
What can i do with system calls? :
you can do allot... from setting the led light to setting a console id
(You must login or register to view this content.)
How to use system calls through rtm:
1: make your ppc code:
to make your ppc code your obviously going to need to know some ppc,
also remeber that the instruction to make a system call is "sc" but for some reason this instruction will not work with chocos ppc compiler so the bytes for it are: 0x44,0x00,0x00,0x02.
it will look somthing like this:
You must login or register to view this content.
remeber to load r11 with the syscall index you want, then add the system call instruction (in bytes) to your compiled ppc code.
You must login or register to view this content.
2: finding a function/location to write into:
i always use the fps function but the fog function should work fine to.
go into ida-> load elf -> view ->sub views-> strings -> alt + t (search) -> "fps:" -> click on the string -> click on its x ref -> goto the top of location + put in text view -> copy address.
now your also going to know how big the location is. becuase you need to write a certin amount of nop instructions to write.
your also going to need the init ppc code you can do this by either changing the compare value or changing the branch function, example: if its bne -> bge (bne = branch if not equal, bge = branch if greater or equal)

3: Writing the ppc (c++)
how to make a "byte" in c++:
    unsigned char buffer[] = {(ppc here)};

or
    unsigned char buffer[size] = {(ppc here)};

once you have that your going to need to make your nop byte array (this is where size comes in)
i recommend goin into the location in ida and fill it up with nop until the end of the location.
once you have that you just need to write it:
    
#define FUNC_ADDR 0x0000
#define INIT_ADDR 0x00000
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,FUNC_ADDR,sizeof(nop),nop);
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,FUNC_ADDR,sizeof(ppc),ppc);
char* txt = "milky\n";
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,0x2200000,strlen(txt) + 1,(unsigned char*)txt);
unsigned char init[2] = {0x41, 00};
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(targ,0,pid,0,INIT_ADDR,2,init);

have fun, also i know this can be kind of confusing so tell me if u would like a video tutorial
also here is my source(c++): You must login or register to view this content.
NOTICE: if you decide to use this method for a cid stealer you will be easily caught
credits:
blb - showing me abit how to use system calls in ppc
choco - ppc compiler


Amazing Job Mike Winky Winky
12-01-2014, 02:01 AM #8
optantic
Pokemon Trainer
Originally posted by Doctor
Why would you try this way with a sprx? You can just call the system call...

problem fixed
but there's no tutorial
12-01-2014, 02:05 AM #9
Originally posted by optantic View Post
problem fixed
but there's no tutorial


Yes there is look in the PS3 SDK
12-01-2014, 04:12 AM #10
optantic
Pokemon Trainer
Originally posted by Doctor
Yes there is look in the PS3 SDK

Thanks
But, I don't know any C++ or programming language lol

How to make a trophy type notification when enabled a cheat in sprx?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo