Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int call(uint address, params object[] parameters)
- {
- int length = parameters.Length;
- uint num2 = 0;
- for (int i = 0; i < length; i++)
- {
- if(parameters[i] is int)
- {
- DEX.Extension.WriteInt32(0x10050000 + ((uint)i + num2) * 4, (int)parameters[i]);
- }
- else if(parameters[i] is float)
- {
- DEX.Extension.WriteFloat(address + ((uint)i + num2) * 4, (float)parameters[i]);
- }
- else if(parameters[i] is string)
- {
- DEX.Extension.WriteString(address, (string)parameters[i]);
- }
- else if(parameters[i] is uint)
- {
- DEX.Extension.WriteUInt32(0x10050000 + ((uint)i + num2) * 4, (uint)parameters[i]);
- }
- else if(parameters[i] is bool)
- {
- DEX.Extension.WriteBool(0x10050000 + ((uint)i + num2) * 4, (bool)parameters[i]);
- }
- else if(parameters[i] is byte)
- {
- DEX.Extension.WriteByte(0x10050000 + ((uint)i + num2) * 4, (byte)parameters[i]);
- }
- else
- {
- Console.WriteLine("This RPC Does Not Support that type of value!");
- }
- }
- DEX.Extension.WriteUInt32(0x1002004C, address);
- System.Threading.Thread.Sleep(20);
- return DEX.Extension.ReadInt32(0x10020050);
- }
- public void writePowerPC()
- {
- PS3.SetMemory(0x00, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- System.Threading.Thread.Sleep(20);
- byte[] ppc = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00,
- 0x80, 0x3D, 0x60, 0x02, 0x10, 0x80, 0x6B, 0x00, 0x04, 0x80, 0x8B, 0x00, 0x08, 0x80, 0xAB,
- 0x00, 0x0C, 0x80, 0xCB, 0x00, 0x10, 0x80, 0xEB, 0x00, 0x14, 0x81, 0x0B, 0x00, 0x18, 0x81,
- 0x2B, 0x00, 0x1C, 0x81, 0x6B, 0x00, 0x00, 0x7D, 0x69, 0x03, 0xA6, 0x39, 0x60, 0x00, 0x00,
- 0x4E, 0x80, 0x04, 0x21, 0x3D, 0x60, 0x02, 0x10, 0x90, 0x6B, 0x00, 0x20, 0x38, 0x60, 0x00,
- 0x00, 0x90, 0x6B, 0x00, 0x00, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21,
- 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
- PS3.SetMemory(0x00 + 4, ppc);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(0x00, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- }
- public int init()
- {
- uint address = 0x00;
- writePowerPC();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement