public static int Read4Bytes(uint Offset, bool Reverse) { Bytes = PS3.GetBytes(Offset, 4); if (Reverse) { Array.Reverse(Bytes); } return(BitConverter.ToInt32(Bytes, 0)); }
public static Int64 Read8Bytes(uint Offset, bool Reverse) { Bytes = PS3.GetBytes(Offset, 8); if (Reverse) { Array.Reverse(Bytes); } return(BitConverter.ToInt64(Bytes, 0)); }
public static int Call(uint func_address, params object[] parameters) { InUse = true; int num_params = parameters.Length; uint num_floats = 0; for (uint i = 0; i < num_params; i++) { if (parameters[i] is int) { byte[] val = BitConverter.GetBytes((int)parameters[i]); Array.Reverse(val); PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val); } else if (parameters[i] is uint) { byte[] val = BitConverter.GetBytes((uint)parameters[i]); Array.Reverse(val); PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val); } else if (parameters[i] is string) { byte[] str = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0"); PS3.SetMemory(0x10050054 + i * 0x400, str); uint addr = 0x10050054 + i * 0x400; byte[] address = BitConverter.GetBytes(addr); Array.Reverse(address); PS3.SetMemory(0x10050000 + (i + num_floats) * 4, address); } else if (parameters[i] is float) { num_floats++; byte[] val = BitConverter.GetBytes((float)parameters[i]); Array.Reverse(val); PS3.SetMemory(0x10050024 + ((num_floats - 1) * 0x4), val); } } byte[] fadd = BitConverter.GetBytes(func_address); Array.Reverse(fadd); PS3.SetMemory(0x1005004C, fadd); System.Threading.Thread.Sleep(20); byte[] ret = PS3.GetBytes(0x10050050, 4); Array.Reverse(ret); InUse = false; return(BitConverter.ToInt32(ret, 0)); }
public static void BISOON() { if (PS3.GetBytes(function_address, 4) != new byte[4] { 248, 33, 255, 145 }) { PS3.SetMemory(function_address, new byte[4] { 78, 128, 0, 32 }); Thread.Sleep(20); byte[] bytes = new byte[136] { 124, 8, 2, 166, 248, 1, 0, 128, 60, 96, 16, 2, 129, 131, 0, 76, 44, 12, 0, 0, 65, 130, 0, 100, 128, 131, 0, 4, 128, 163, 0, 8, 128, 195, 0, 12, 128, 227, 0, 16, 129, 3, 0, 20, 129, 35, 0, 24, 129, 67, 0, 28, 129, 99, 0, 32, 192, 35, 0, 36, 192, 67, 0, 40, 192, 99, 0, 44, 192, 131, 0, 48, 192, 163, 0, 52, 192, 195, 0, 56, 192, 227, 0, 60, 193, 3, 0, 64, 193, 35, 0, 72, 128, 99, 0, 0, 125, 137, 3, 166, 78, 128, 4, 33, 60, 128, 16, 2, 56, 160, 0, 0, 144, 164, 0, 76, 144, 100, 0, 80, 232, 1, 0, 128, 124, 8, 3, 166, 56, 33, 0, 112, 78, 128, 0, 32 }; PS3.SetMemory(function_address + 4, bytes); PS3.SetMemory(268566528u, new byte[10324]); PS3.SetMemory(function_address, new byte[4] { 248, 33, 255, 145 }); } else { MessageBox.Show("Already Enabled"); } }