Post: 1.14 RPC (Fixed)
05-17-2014, 01:53 PM #1
Shark
Retired.
(adsbygoogle = window.adsbygoogle || []).push({}); This is a fixed version of the RPC SC58 released, it didn't return values so yea this is just a quick fix :p!
I also edited the call function so it supports some more value types!

Credits: Choco, SC58 (Releasing His FOG RPC)
SC58's Thread: You must login or register to view this content.

Pastebin Link: You must login or register to view this content.

RPC 1.14
    
private static uint function_address = 0x38EDE8;

public static int Call(UInt32 func_address, params object[] parameters)
{
int length = parameters.Length;
int index = 0;
UInt32 num3 = 0;
UInt32 num4 = 0;
UInt32 num5 = 0;
UInt32 num6 = 0;
while (index < length)
{
if (parameters[index] is int)
{
PS3.Extension.WriteInt32(0x10050000 + (num3 * 4), (int)parameters[index]);
num3++;
}
else if (parameters[index] is UInt32)
{
PS3.Extension.WriteUInt32(0x10050000 + (num3 * 4), (UInt32)parameters[index]);
num3++;
}
else
{
UInt32 num7;
if (parameters[index] is string)
{
num7 = 0x10052000 + (num4 * 0x400);
PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
PS3.Extension.WriteUInt32(0x10050000 + (num3 * 4), num7);
num3++;
num4++;
}
else if (parameters[index] is float)
{
PS3.Extension.WriteFloat(0x10050024 + (num5 * 4), (float)parameters[index]);
num5++;
}
else if (parameters[index] is float[])
{
float[] input = (float[])parameters[index];
num7 = 0x10051000 + (num6 * 4);
Lib.WriteSingle(num7, input);
PS3.Extension.WriteUInt32(0x10050000 + (num3 * 4), num7);
num3++;
num6 += (UInt32)input.Length;
}
}
index++;
}
PS3.Extension.WriteUInt32(0x1005004C, func_address);
Thread.Sleep(20);
return PS3.Extension.ReadInt32(0x10050050);
}

public static void EnableRPC()
{
byte[] RPC = { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x40, 0x00, 0x72, 0x30, 0x42, 0x4C, 0x38, 0x3C, 0x60, 0x10, 0x05, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xC0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xC0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x05, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0x3C, 0x40, 0x00, 0x73, 0x30, 0x42, 0x4B, 0xE8, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(function_address, RPC);
PS3.SetMemory(0x10050000, new byte[0x2854]);
}


How To Activate It
    
To active the RPC just put EnableRPC(); after you connect/attach your ps3


Enjoy!
Last edited by Taylor ; 07-09-2014 at 06:25 PM.

The following 8 users say thank you to Shark for this useful post:

AlexNGU, AlScrapesH52, CanadianModding, NotALegitPlayer, Taylor, SyTry, Tipton_Modz, Winter
05-17-2014, 02:58 PM #2
SC58
Former Staff
Originally posted by Shark View Post
Hey since I didnt really find a "good" RPC for mw2 I decided to make one!

Pastebin Link: You must login or register to view this content.

RPC 1.14
    
private static uint function_address;

public static int Call(uint func_address, params object[] parameters)
{
int length = parameters.Length;
int index = 0;
uint num3 = 0;
uint num4 = 0;
uint num5 = 0;
uint num6 = 0;
while (index < length)
{
if (parameters[index] is int)
{
PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
num3++;
}
else if (parameters[index] is uint)
{
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
num3++;
}
else
{
uint num7;
if (parameters[index] is string)
{
num7 = 0x10022000 + (num4 * 0x400);
PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
num3++;
num4++;
}
else if (parameters[index] is float)
{
PS3.Extension.WriteFloat(0x10020024 + (num5 * 4), (float)parameters[index]);
num5++;
}
else if (parameters[index] is float[])
{
float[] input = (float[])parameters[index];
num7 = 0x10021000 + (num6 * 4);
Lib.WriteSingle(num7, input);
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
num3++;
num6 += (uint)input.Length;
}
}
index++;
}
PS3.Extension.WriteUInt32(0x1002004C, func_address);
Thread.Sleep(20);
return PS3.Extension.ReadInt32(0x10020050);
}

public static void Enable()
{
PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
Thread.Sleep(20);
byte[] memory = new byte[]
{ 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C,
0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08,
0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18,
0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28,
0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38,
0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00,
0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00,
0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6,
0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(function_address + 4, memory);
PS3.SetMemory(0x10020000, new byte[0x2854]);
PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
}

public static int Init()
{
function_address = 0x10A30;
Enable();
return 0;
}


How To Activate It
    
To active the RPC just put Enable(); after you connect/attach your ps3


Enjoy!


0x10A30 this function if changed messes with the sensitivity, why not use r_setframefog 0x38EDE8
05-17-2014, 02:59 PM #3
Shark
Retired.
Originally posted by SC58 View Post
0x10A30 this function if changed messes with the sensitivity, why not use r_setframefog 0x38EDE8


i tried using setframefog, it just froze me when I tried to call a function...
05-20-2014, 02:43 AM #4
Choco
Respect my authoritah!!
Originally posted by Shark View Post
Hey since I didnt really find a "good" RPC for mw2 I decided to make one!

Pastebin Link: You must login or register to view this content.

RPC 1.14
    
private static uint function_address;

public static int Call(uint func_address, params object[] parameters)
{
int length = parameters.Length;
int index = 0;
uint num3 = 0;
uint num4 = 0;
uint num5 = 0;
uint num6 = 0;
while (index < length)
{
if (parameters[index] is int)
{
PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
num3++;
}
else if (parameters[index] is uint)
{
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
num3++;
}
else
{
uint num7;
if (parameters[index] is string)
{
num7 = 0x10022000 + (num4 * 0x400);
PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
num3++;
num4++;
}
else if (parameters[index] is float)
{
PS3.Extension.WriteFloat(0x10020024 + (num5 * 4), (float)parameters[index]);
num5++;
}
else if (parameters[index] is float[])
{
float[] input = (float[])parameters[index];
num7 = 0x10021000 + (num6 * 4);
Lib.WriteSingle(num7, input);
PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
num3++;
num6 += (uint)input.Length;
}
}
index++;
}
PS3.Extension.WriteUInt32(0x1002004C, func_address);
Thread.Sleep(20);
return PS3.Extension.ReadInt32(0x10020050);
}

public static void Enable()
{
PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
Thread.Sleep(20);
byte[] memory = new byte[]
{ 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C,
0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08,
0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18,
0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28,
0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38,
0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00,
0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00,
0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6,
0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(function_address + 4, memory);
PS3.SetMemory(0x10020000, new byte[0x2854]);
PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
}

public static int Init()
{
function_address = 0x10A30;
Enable();
return 0;
}


How To Activate It
    
To active the RPC just put Enable(); after you connect/attach your ps3


Enjoy!


The PPC you have is almost identical to my Ghosts RPC code... :\ At least give credits if you use my work.
05-20-2014, 07:14 AM #5
Shark
Retired.
Originally posted by Choco View Post
The PPC you have is almost identical to my Ghosts RPC code... :\ At least give credits if you use my work.


i didnt even know it was yours, I have this code for like ages I have no idea where it came from, but at first it had broken ppc so I fixed that but I will give you some credits if that solves your problem :?
05-20-2014, 05:12 PM #6
Choco
Respect my authoritah!!
Originally posted by Shark View Post
i didnt even know it was yours, I have this code for like ages I have no idea where it came from, but at first it had broken ppc so I fixed that but I will give you some credits if that solves your problem :?


Well I see you've used the same code in other threads of yours, and in those ones you did leave credits :p

It's pretty clear that you don't really understand why this works or doesn't work. For MW2, you can't just copy and paste the code from Ghosts/BO2/MW3/whatever. MW2 uses the TOC pointer in most functions, so it will cause lots of bugs and freezes if you don't properly store that pointer somewhere before calling a branch.

The following 2 users say thank you to Choco for this useful post:

Red-EyeX32, VezahMoDz
05-20-2014, 05:47 PM #7
Mango_Knife
In my man cave
Originally posted by Choco View Post
Well I see you've used the same code in other threads of yours, and in those ones you did leave credits :p

It's pretty clear that you don't really understand why this works or doesn't work. For MW2, you can't just copy and paste the code from Ghosts/BO2/MW3/whatever. MW2 uses the TOC pointer in most functions, so it will cause lots of bugs and freezes if you don't properly store that pointer somewhere before calling a branch.


mm
Thats why when i used other mw2 rpc's the knife and the sensitivity got fucked?
05-20-2014, 10:37 PM #8
Shark
Retired.
Originally posted by Choco View Post
Well I see you've used the same code in other threads of yours, and in those ones you did leave credits :p

It's pretty clear that you don't really understand why this works or doesn't work. For MW2, you can't just copy and paste the code from Ghosts/BO2/MW3/whatever. MW2 uses the TOC pointer in most functions, so it will cause lots of bugs and freezes if you don't properly store that pointer somewhere before calling a branch.


Originally posted by Knife View Post
mm
Thats why when i used other mw2 rpc's the knife and the sensitivity got fucked?


@Choco yolo as long as it works

@mango its because of the function i stored it at, i didnt even think people still mod mw2 so I didnt really bother with it...
05-21-2014, 03:13 AM #9
SC58
Former Staff
Originally posted by Shark View Post
@Choco yolo as long as it works.


Cool thing won't happen if you say that lol
05-21-2014, 06:43 AM #10
Shark
Retired.
Originally posted by SC58 View Post
Cool thing won't happen if you say that lol


what "cool thing" :think:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo