public static void WriteSingle(uint address, float input) { byte[] array = new byte[4]; BitConverter.GetBytes(input).CopyTo(array, 0); Array.Reverse(array, 0, 4); PS3.SetMemory(address, array); }
private static void GetMem(uint offset, byte[] buffer, SelectAPI API) { if (API == SelectAPI.ControlConsole) { PS3.GetMemoryR(offset, ref buffer); } else if (API == SelectAPI.TargetManager) { PS3.GetMemoryR(offset, ref buffer); } }
public static void WriteSingle(uint address, float[] input) { int length = input.Length; byte[] array = new byte[length * 4]; for (int i = 0; i < length; i++) { ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4)); } PS3.SetMemory(address, array); }
private static byte[] GetBytes(uint offset, int length, SelectAPI API) { byte[] bytes = new byte[length]; if (API == SelectAPI.ControlConsole) { CurrentAPI = PS3.GetCurrentAPI(); return(PS3.DEX.GetBytes(offset, length)); } if (API == SelectAPI.TargetManager) { CurrentAPI = PS3.GetCurrentAPI(); bytes = PS3.DEX.GetBytes(offset, length); } return(bytes); }
public static void Enable(bool enabled) { if (enabled) { PS3.SetMemory(0x37fec, new byte[] { 0x40 }); PS3.SetMemory(0x397a22, new byte[] { 1, 8 }); PS3.SetMemory(0x397a2a, new byte[2]); PS3.SetMemory(0x397400, new byte[] { 0x41, 0xb0, 0, 0, 0x43, 100, 0, 0, 0x42, 0x10 }); } else { PS3.SetMemory(0x3979fc, new byte[] { 0x41 }); PS3.SetMemory(0x397a22, new byte[] { 1, 8 }); PS3.SetMemory(0x397a2a, new byte[2]); PS3.SetMemory(0x397400, new byte[] { 0x41, 0xb0, 0, 0, 0x43, 100, 0, 0, 0x42, 0x10 }); } }
public static void DestroyText() { byte[] destroy = new byte[0x15]; PS3.SetMemory(Text, destroy); }