├── LICENSE ├── README.md ├── bin └── PS3Lib.dll ├── demo ├── CCAPI-Demo │ ├── BUILD │ │ ├── CCAPI-Demo.exe │ │ └── PS3Lib.dll │ ├── CCAPI-Demo.sln │ ├── CCAPI-Demo.v11.suo │ └── CCAPI-Demo │ │ ├── App.config │ │ ├── CCAPI-Demo.csproj │ │ ├── Form1.Designer.cs │ │ ├── Form1.cs │ │ ├── Form1.resx │ │ ├── PS3Lib │ │ ├── API │ │ │ ├── CCAPI.cs │ │ │ ├── PS3API.cs │ │ │ ├── TMAPI.cs │ │ │ └── TMAPI_NET.cs │ │ ├── EXTRA │ │ │ ├── ArrayBuilder.cs │ │ │ └── Extensions.cs │ │ └── PS3Lib.dll │ │ ├── Program.cs │ │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ │ ├── Resources │ │ └── ps3.ico │ │ ├── bin │ │ └── Release │ │ │ └── CCAPI-Demo.vshost.exe │ │ └── obj │ │ ├── Debug │ │ ├── CCAPI-Demo.csproj.FileListAbsolute.txt │ │ ├── CCAPI-Demo.csproj.GenerateResource.Cache │ │ ├── CCAPI-Demo.exe │ │ ├── CCAPI-Demo.pdb │ │ ├── CCAPI_Demo.Form1.resources │ │ ├── CCAPI_Demo.Properties.Resources.resources │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── TempPE │ │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ └── Release │ │ ├── CCAPI-Demo.csproj.FileListAbsolute.txt │ │ ├── CCAPI-Demo.csproj.GenerateResource.Cache │ │ ├── CCAPI-Demo.exe │ │ ├── CCAPI-Demo.pdb │ │ ├── CCAPI_Demo.Form1.resources │ │ ├── CCAPI_Demo.Properties.Resources.resources │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── TempPE │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── PS3API-Demo │ ├── BUILD │ ├── PS3API-Demo.exe │ └── PS3Lib.dll │ ├── PS3API-Demo.sln │ ├── PS3API-Demo.v11.suo │ └── PS3API-Demo │ ├── App.config │ ├── Main.Designer.cs │ ├── Main.cs │ ├── Main.resx │ ├── PS3API-Demo.csproj │ ├── PS3Lib │ └── PS3Lib.dll │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── bin │ └── Release │ │ └── PS3API-Demo.vshost.exe │ └── obj │ ├── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── PS3API-Demo.csproj.FileListAbsolute.txt │ ├── PS3API-Demo.csproj.GenerateResource.Cache │ ├── PS3API-Demo.exe │ ├── PS3API-Demo.pdb │ ├── PS3API_Demo.Main.resources │ ├── PS3API_Demo.Properties.Resources.resources │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── build.force │ └── Release │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── PS3API-Demo.csproj.FileListAbsolute.txt │ ├── PS3API-Demo.csproj.GenerateResource.Cache │ ├── PS3API-Demo.exe │ ├── PS3API-Demo.pdb │ ├── PS3API_Demo.Main.resources │ ├── PS3API_Demo.Properties.Resources.resources │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── src ├── api ├── CCAPI.cs ├── PS3API.cs ├── TMAPI.cs └── TMAPI_NET.cs └── extra ├── ArrayBuilder.cs └── Extensions.cs /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PS3 Library for .NET 2 | 3 | This will allow you to communicate with your PS3 DEX/CEX 4 | Connection with targets , read/write memory and more... 5 | 6 | # Functions list : 7 | 8 | - Support CCAPI v2.60 C#. 9 | - Set boot console Ids 10 | - No need to give CCAPI.dll 11 | - Function ReadString is now very fast. 12 | - Extension class support both API's. 13 | - ArrayBuilder for build arrays easily. 14 | - IO Removed (Few people used it). 15 | - Set API to switch when you want. 16 | - Use both API's with same function names. 17 | - Dialog CCAPI for ip implemented. 18 | - Connect & Attach function returns bool. 19 | - Fixed some bugs TMAPI. 20 | 21 | # Information 22 | 23 | - Don't forget to INSTALL the latest version of CCAPI (v2.60) in your PS3 if you want develop applications with CCAPI C# 24 | - http://www.frenchmoddingteam.com/shop/application/20-control-console-api-2-60-rte-cex-dex 25 | 26 | More informations about all PS3Lib functions here : 27 | 28 | - http://www.nextgenupdate.com/forums/ps3-cheats-customization/697273-release-ps3lib-v4-4-dex-cex.html 29 | 30 | - http://www.frenchmoddingteam.com/news/article/9-release-ps3lib-v4-4-dex-cex 31 | 32 | # Contributing 33 | 34 | Feel free to do a PR. :) 35 | -------------------------------------------------------------------------------- /bin/PS3Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/bin/PS3Lib.dll -------------------------------------------------------------------------------- /demo/CCAPI-Demo/BUILD/CCAPI-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/BUILD/CCAPI-Demo.exe -------------------------------------------------------------------------------- /demo/CCAPI-Demo/BUILD/PS3Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/BUILD/PS3Lib.dll -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCAPI-Demo", "CCAPI-Demo\CCAPI-Demo.csproj", "{808DDD4E-65CB-495E-9007-34B69FD60937}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {808DDD4E-65CB-495E-9007-34B69FD60937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {808DDD4E-65CB-495E-9007-34B69FD60937}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {808DDD4E-65CB-495E-9007-34B69FD60937}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {808DDD4E-65CB-495E-9007-34B69FD60937}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo.v11.suo -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/CCAPI-Demo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {808DDD4E-65CB-495E-9007-34B69FD60937} 8 | WinExe 9 | Properties 10 | CCAPI_Demo 11 | CCAPI-Demo 12 | v4.5 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\..\PS3Lib - v4.4\PS3Lib - v4\bin\Release\PS3Lib.dll 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Form 52 | 53 | 54 | Form1.cs 55 | 56 | 57 | 58 | 59 | Form1.cs 60 | 61 | 62 | ResXFileCodeGenerator 63 | Resources.Designer.cs 64 | Designer 65 | 66 | 67 | True 68 | Resources.resx 69 | True 70 | 71 | 72 | SettingsSingleFileGenerator 73 | Settings.Designer.cs 74 | 75 | 76 | True 77 | Settings.settings 78 | True 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 95 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | using PS3Lib; 12 | 13 | namespace CCAPI_Demo 14 | { 15 | public partial class Form1 : Form 16 | { 17 | private Random Rand; 18 | private CCAPI PS3 = new CCAPI(); 19 | private Thread TargetInfo; 20 | 21 | private bool threadIsRunning = false; 22 | private bool currentGame = false; 23 | private uint[] procs; 24 | public Form1() 25 | { 26 | Rand = new Random(); 27 | TargetInfo = new Thread(new ThreadStart(InfoWorker)); 28 | InitializeComponent(); 29 | } 30 | 31 | private void Form1_Load(object sender, EventArgs e) 32 | { 33 | EnableBoxes(false); 34 | comboBuzzer.SelectedIndex = 1; 35 | } 36 | 37 | private void Form1_FormClosing(object sender, FormClosingEventArgs e) 38 | { 39 | threadIsRunning = false; 40 | TargetInfo.Abort(); 41 | PS3.DisconnectTarget(); 42 | } 43 | 44 | private void InfoWorker() 45 | { 46 | lblFW.Invoke((MethodInvoker)(() => { lblFW.Text = PS3.GetFirmwareVersion(); })); 47 | lblLV2.Invoke((MethodInvoker)(() => { lblLV2.Text = PS3.GetFirmwareType(); })); 48 | while (threadIsRunning) 49 | { 50 | string temp1 = PS3.GetTemperatureCELL(); 51 | string temp2 = PS3.GetTemperatureRSX(); 52 | lblCELL.Invoke((MethodInvoker)(() => { lblCELL.Text = temp1; })); 53 | lblRSX.Invoke((MethodInvoker)(() => { lblRSX.Text = temp2; })); 54 | PS3.ClearTargetInfo(); 55 | Thread.Sleep(500); 56 | } 57 | TargetInfo.Abort(); 58 | } 59 | 60 | private void EnableBoxes(bool active) 61 | { 62 | groupProc.Enabled = active; 63 | groupCID.Enabled = active; 64 | groupBuzz.Enabled = active; 65 | groupCID.Enabled = active; 66 | groupInfo.Enabled = active; 67 | groupLedColor.Enabled = active; 68 | groupLedMode.Enabled = active; 69 | groupNotify.Enabled = active; 70 | groupDefaultProc.Enabled = active; 71 | btnLed.Enabled = active; 72 | } 73 | 74 | private void btnConnect_Click(object sender, EventArgs e) 75 | { 76 | if (PS3.SUCCESS(PS3.ConnectTarget(BoxIP.Text))) 77 | { 78 | if (!TargetInfo.IsAlive) 79 | { 80 | threadIsRunning = true; 81 | TargetInfo.Start(); 82 | } 83 | EnableBoxes(true); 84 | MessageBox.Show("Connected !", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 85 | } 86 | else 87 | { 88 | EnableBoxes(false); 89 | MessageBox.Show("Impossible to connect", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 90 | } 91 | } 92 | 93 | private void btnRefresh_Click(object sender, EventArgs e) 94 | { 95 | procs = new uint[64]; 96 | PS3.GetProcessList(out procs); 97 | comboProcs.Items.Clear(); 98 | for(int i = 0; i < procs.Length; i++) 99 | { 100 | string name = String.Empty; 101 | PS3.GetProcessName(procs[i], out name); 102 | comboProcs.Items.Add(name); 103 | } 104 | procs = null; 105 | } 106 | 107 | private void btnSetMem_Click(object sender, EventArgs e) 108 | { 109 | if (comboProcs.SelectedIndex >= 0 && BoxOffset.Text != "" && BoxValue.Text != "") 110 | { 111 | try 112 | { 113 | uint processSelected = procs[comboProcs.SelectedIndex]; 114 | PS3.AttachProcess(processSelected); 115 | uint offset = Convert.ToUInt32(BoxOffset.Text.Replace("0x", ""), 16); 116 | uint value = Convert.ToUInt32(BoxValue.Text.Replace("0x", ""), 16); 117 | PS3.Extension.WriteUInt32(offset, value); 118 | } 119 | catch (Exception exx) 120 | { 121 | MessageBox.Show(exx.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 122 | } 123 | } 124 | else MessageBox.Show("Please select a process!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 125 | } 126 | 127 | private void btnCID_Click(object sender, EventArgs e) 128 | { 129 | PS3.SetConsoleID(BoxCID.Text); 130 | } 131 | 132 | private void btnBuzzer_Click(object sender, EventArgs e) 133 | { 134 | if (comboBuzzer.SelectedIndex >= 0) 135 | { 136 | if (comboBuzzer.SelectedIndex == 0) 137 | PS3.RingBuzzer(CCAPI.BuzzerMode.Continuous); 138 | else if (comboBuzzer.SelectedIndex == 1) 139 | PS3.RingBuzzer(CCAPI.BuzzerMode.Single); 140 | else if (comboBuzzer.SelectedIndex == 2) 141 | PS3.RingBuzzer(CCAPI.BuzzerMode.Double); 142 | } 143 | else MessageBox.Show("Please select a buzzer mode", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 144 | } 145 | 146 | private void radioGreen_CheckedChanged(object sender, EventArgs e) 147 | { 148 | 149 | } 150 | 151 | private void radioRed_CheckedChanged(object sender, EventArgs e) 152 | { 153 | 154 | } 155 | 156 | private void radioOn_CheckedChanged(object sender, EventArgs e) 157 | { 158 | 159 | } 160 | 161 | private void radioOff_CheckedChanged(object sender, EventArgs e) 162 | { 163 | 164 | } 165 | 166 | private void radioBlink_CheckedChanged(object sender, EventArgs e) 167 | { 168 | 169 | } 170 | 171 | private void btnLed_Click(object sender, EventArgs e) 172 | { 173 | CCAPI.LedColor Color = CCAPI.LedColor.Green; 174 | CCAPI.LedMode Mode = CCAPI.LedMode.On; 175 | 176 | if (radioOn.Checked) 177 | Mode = CCAPI.LedMode.On; 178 | else if (radioOff.Checked) 179 | Mode = CCAPI.LedMode.Off; 180 | else if (radioBlink.Checked) 181 | Mode = CCAPI.LedMode.Blink; 182 | 183 | if (radioGreen.Checked) 184 | Color = CCAPI.LedColor.Green; 185 | 186 | if (radioRed.Checked) 187 | Color = CCAPI.LedColor.Red; 188 | 189 | PS3.SetConsoleLed(Color, Mode); 190 | } 191 | 192 | private void btnNotify_Click(object sender, EventArgs e) 193 | { 194 | PS3.Notify(CCAPI.NotifyIcon.INFO, BoxNotify.Text); 195 | } 196 | 197 | private void btnAttach_Click(object sender, EventArgs e) 198 | { 199 | if(PS3.SUCCESS(PS3.AttachProcess())) 200 | { 201 | currentGame = true; 202 | MessageBox.Show("Success!"); 203 | } 204 | else MessageBox.Show("You're in a game ?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 205 | } 206 | 207 | private void btnDefProc_Click(object sender, EventArgs e) 208 | { 209 | if (currentGame) 210 | { 211 | PS3.Extension.WriteInt32(0x10050004, 1337); 212 | byte[] buffer = new byte[4]; 213 | for (int i = 0; i < 4; i++) 214 | buffer[i] = (byte)Rand.Next(255); 215 | PS3.SetMemory(0x10060000, buffer); 216 | MessageBox.Show("Random bytes set in memory, offset 0x10060000"); 217 | } 218 | else MessageBox.Show("Attach the default game before.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 219 | } 220 | 221 | private void btnDialog_Click(object sender, EventArgs e) 222 | { 223 | if (PS3.ConnectTarget()) 224 | { 225 | if (!TargetInfo.IsAlive) 226 | { 227 | threadIsRunning = true; 228 | TargetInfo.Start(); 229 | } 230 | EnableBoxes(true); 231 | MessageBox.Show("Connected"); 232 | } 233 | else 234 | { 235 | EnableBoxes(false); 236 | MessageBox.Show("Failed to connect"); 237 | } 238 | } 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/API/PS3API.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.3 : // 7 | // - Support CCAPI v2.5 C# by iMCSx // 8 | // - Popup better form with icon // 9 | // - CCAPI Consoles List Popup French/English // 10 | // - CCAPI Get Console Info // 11 | // - CCAPI Get Console List // 12 | // - CCAPI Get Number Of Consoles // 13 | // - Get Console Name TMAPI/CCAPI // 14 | // // 15 | // Credits : FM|T Enstone , Buc-ShoTz // 16 | // // 17 | // Follow me : // 18 | // // 19 | // FrenchModdingTeam.com // 20 | // Youtube.com/iMCSx // 21 | // Twitter.com/iMCSx // 22 | // Facebook.com/iMCSx // 23 | // // 24 | // ************************************************* // 25 | 26 | using CCAPI_Demo.Properties; 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Drawing; 30 | using System.Globalization; 31 | using System.Linq; 32 | using System.Reflection; 33 | using System.Text; 34 | using System.Threading.Tasks; 35 | using System.Windows.Forms; 36 | 37 | namespace PS3Lib 38 | { 39 | public enum Lang 40 | { 41 | Null, 42 | French, 43 | English 44 | } 45 | 46 | public enum SelectAPI 47 | { 48 | ControlConsole, 49 | TargetManager 50 | } 51 | 52 | public class PS3API 53 | { 54 | private static string targetName = String.Empty; 55 | private static string targetIp = String.Empty; 56 | public PS3API(SelectAPI API = SelectAPI.TargetManager) 57 | { 58 | SetAPI.API = API; 59 | MakeInstanceAPI(API); 60 | } 61 | 62 | public void setTargetName(string value) 63 | { 64 | targetName = value; 65 | } 66 | 67 | private void MakeInstanceAPI(SelectAPI API) 68 | { 69 | if (API == SelectAPI.TargetManager) 70 | if (Common.TmApi == null) 71 | Common.TmApi = new TMAPI(); 72 | if (API == SelectAPI.ControlConsole) 73 | if (Common.CcApi == null) 74 | Common.CcApi = new CCAPI(); 75 | } 76 | 77 | private class SetLang 78 | { 79 | public static Lang defaultLang = Lang.Null; 80 | } 81 | 82 | private class SetAPI 83 | { 84 | public static SelectAPI API; 85 | } 86 | 87 | private class Common 88 | { 89 | public static CCAPI CcApi; 90 | public static TMAPI TmApi; 91 | } 92 | 93 | /// Force a language for the console list popup. 94 | public void SetFormLang(Lang Language) 95 | { 96 | SetLang.defaultLang = Language; 97 | } 98 | 99 | /// init again the connection if you use a Thread or a Timer. 100 | public void InitTarget() 101 | { 102 | if (SetAPI.API == SelectAPI.TargetManager) 103 | Common.TmApi.InitComms(); 104 | } 105 | 106 | /// Connect your console with selected API. 107 | public bool ConnectTarget(int target = 0) 108 | { 109 | // We'll check again if the instance has been done, else you'll got an exception error. 110 | MakeInstanceAPI(GetCurrentAPI()); 111 | 112 | bool result = false; 113 | if (SetAPI.API == SelectAPI.TargetManager) 114 | result = Common.TmApi.ConnectTarget(target); 115 | else 116 | result = new ConsoleList(this).Show(); 117 | return result; 118 | } 119 | 120 | /// Connect your console with CCAPI. 121 | public bool ConnectTarget(string ip) 122 | { 123 | // We'll check again if the instance has been done. 124 | MakeInstanceAPI(GetCurrentAPI()); 125 | if (Common.CcApi.SUCCESS(Common.CcApi.ConnectTarget(ip))) 126 | { 127 | targetIp = ip; 128 | return true; 129 | } 130 | else return false; 131 | } 132 | 133 | /// Disconnect Target with selected API. 134 | public void DisconnectTarget() 135 | { 136 | if (SetAPI.API == SelectAPI.TargetManager) 137 | Common.TmApi.DisconnectTarget(); 138 | else Common.CcApi.DisconnectTarget(); 139 | } 140 | 141 | /// Attach the current process (current Game) with selected API. 142 | public bool AttachProcess() 143 | { 144 | // We'll check again if the instance has been done. 145 | MakeInstanceAPI(GetCurrentAPI()); 146 | 147 | bool AttachResult = false; 148 | if (SetAPI.API == SelectAPI.TargetManager) 149 | AttachResult = Common.TmApi.AttachProcess(); 150 | else if (SetAPI.API == SelectAPI.ControlConsole) 151 | AttachResult = Common.CcApi.SUCCESS(Common.CcApi.AttachProcess()); 152 | return AttachResult; 153 | } 154 | 155 | public string GetConsoleName() 156 | { 157 | if (SetAPI.API == SelectAPI.TargetManager) 158 | return Common.TmApi.SCE.GetTargetName(); 159 | else 160 | { 161 | if (targetName != String.Empty) 162 | return targetName; 163 | 164 | if (targetIp != String.Empty) 165 | { 166 | List Data = new List(); 167 | Data = Common.CcApi.GetConsoleList(); 168 | if (Data.Count > 0) 169 | { 170 | for (int i = 0; i < Data.Count; i++) 171 | if (Data[i].Ip == targetIp) 172 | return Data[i].Name; 173 | } 174 | } 175 | return targetIp; 176 | } 177 | } 178 | 179 | /// Set memory to offset with selected API. 180 | public void SetMemory(uint offset, byte[] buffer) 181 | { 182 | if (SetAPI.API == SelectAPI.TargetManager) 183 | Common.TmApi.SetMemory(offset, buffer); 184 | else if (SetAPI.API == SelectAPI.ControlConsole) 185 | Common.CcApi.SetMemory(offset, buffer); 186 | } 187 | 188 | /// Get memory from offset using the Selected API. 189 | public void GetMemory(uint offset, byte[] buffer) 190 | { 191 | if (SetAPI.API == SelectAPI.TargetManager) 192 | Common.TmApi.GetMemory(offset, buffer); 193 | else if (SetAPI.API == SelectAPI.ControlConsole) 194 | Common.CcApi.GetMemory(offset, buffer); 195 | } 196 | 197 | /// Get memory from offset with a length using the Selected API. 198 | public byte[] GetBytes(uint offset, int length) 199 | { 200 | byte[] buffer = new byte[length]; 201 | if (SetAPI.API == SelectAPI.TargetManager) 202 | Common.TmApi.GetMemory(offset, buffer); 203 | else if (SetAPI.API == SelectAPI.ControlConsole) 204 | Common.CcApi.GetMemory(offset, buffer); 205 | return buffer; 206 | } 207 | 208 | /// Change current API. 209 | public void ChangeAPI(SelectAPI API) 210 | { 211 | SetAPI.API = API; 212 | MakeInstanceAPI(GetCurrentAPI()); 213 | } 214 | 215 | /// Return selected API. 216 | public SelectAPI GetCurrentAPI() 217 | { 218 | return SetAPI.API; 219 | } 220 | 221 | /// Return selected API into string format. 222 | public string GetCurrentAPIName() 223 | { 224 | string output = String.Empty; 225 | if (SetAPI.API == SelectAPI.TargetManager) 226 | output = Enum.GetName(typeof(SelectAPI), SelectAPI.TargetManager).Replace("Manager"," Manager"); 227 | else output = Enum.GetName(typeof(SelectAPI), SelectAPI.ControlConsole).Replace("Console", " Console"); 228 | return output; 229 | } 230 | 231 | /// This will find the dll ps3tmapi_net.dll for TMAPI. 232 | public Assembly PS3TMAPI_NET() 233 | { 234 | return Common.TmApi.PS3TMAPI_NET(); 235 | } 236 | 237 | /// Use the extension class with your selected API. 238 | public Extension Extension 239 | { 240 | get { return new Extension(SetAPI.API); } 241 | } 242 | 243 | /// Access to all TMAPI functions. 244 | public TMAPI TMAPI 245 | { 246 | get { return new TMAPI(); } 247 | } 248 | 249 | /// Access to all CCAPI functions. 250 | public CCAPI CCAPI 251 | { 252 | get { return new CCAPI(); } 253 | } 254 | 255 | public class ConsoleList 256 | { 257 | private PS3API Api; 258 | private List data; 259 | 260 | public ConsoleList(PS3API f) 261 | { 262 | Api = f; 263 | data = Api.CCAPI.GetConsoleList(); 264 | } 265 | 266 | /// Return the systeme language, if it's others all text will be in english. 267 | private Lang getSysLanguage() 268 | { 269 | if (SetLang.defaultLang == Lang.Null) 270 | { 271 | if (CultureInfo.CurrentCulture.ThreeLetterWindowsLanguageName.StartsWith("FRA")) 272 | return Lang.French; 273 | else return Lang.English; 274 | } 275 | else return SetLang.defaultLang; 276 | } 277 | 278 | private string strTraduction(string keyword) 279 | { 280 | if (getSysLanguage() == Lang.French) 281 | { 282 | switch (keyword) 283 | { 284 | case "btnConnect": return "Connexion"; 285 | case "btnRefresh": return "Rafraîchir"; 286 | case "errorSelect": return "Vous devez d'abord sélectionner une console."; 287 | case "errorSelectTitle": return "Sélectionnez une console."; 288 | case "selectGrid": return "Sélectionnez une console dans la grille."; 289 | case "selectedLbl": return "Sélection :"; 290 | case "formTitle": return "Choisissez une console..."; 291 | case "noConsole": return "Aucune console disponible, démarrez CCAPI Manager (v2.5) et ajoutez une nouvelle console."; 292 | case "noConsoleTitle": return "Aucune console disponible."; 293 | } 294 | } 295 | else 296 | { 297 | switch (keyword) 298 | { 299 | case "btnConnect": return "Connection"; 300 | case "btnRefresh": return "Refresh"; 301 | case "errorSelect": return "You need to select a console first."; 302 | case "errorSelectTitle": return "Select a console."; 303 | case "selectGrid": return "Select a console within this grid."; 304 | case "selectedLbl": return "Selected :"; 305 | case "formTitle": return "Select a console..."; 306 | case "noConsole": return "None consoles available, run CCAPI Manager (v2.5) and add a new console."; 307 | case "noConsoleTitle": return "None console available."; 308 | } 309 | } 310 | return "?"; 311 | } 312 | 313 | public bool Show() 314 | { 315 | bool Result = false; 316 | int tNum = -1; 317 | 318 | // Instance of widgets 319 | Label lblInfo = new Label(); 320 | Button btnConnect = new Button(); 321 | Button btnRefresh = new Button(); 322 | ListViewGroup listViewGroup = new ListViewGroup("Consoles", HorizontalAlignment.Left); 323 | ListView listView = new ListView(); 324 | Form formList = new Form(); 325 | 326 | // Create our button connect 327 | btnConnect.Location = new Point(12, 254); 328 | btnConnect.Name = "btnConnect"; 329 | btnConnect.Size = new Size(198, 23); 330 | btnConnect.TabIndex = 1; 331 | btnConnect.Text = strTraduction("btnConnect"); 332 | btnConnect.UseVisualStyleBackColor = true; 333 | btnConnect.Enabled = false; 334 | btnConnect.Click += (sender, e) => 335 | { 336 | if(tNum > -1) 337 | { 338 | if (Api.ConnectTarget(data[tNum].Ip)) 339 | { 340 | Api.setTargetName(data[tNum].Name); 341 | Result = true; 342 | } 343 | else Result = false; 344 | formList.Close(); 345 | } 346 | else 347 | MessageBox.Show(strTraduction("errorSelect"), strTraduction("errorSelectTitle"), MessageBoxButtons.OK, MessageBoxIcon.Error); 348 | }; 349 | 350 | // Create our button refresh 351 | btnRefresh.Location = new Point(216, 254); 352 | btnRefresh.Name = "btnRefresh"; 353 | btnRefresh.Size = new Size(86, 23); 354 | btnRefresh.TabIndex = 1; 355 | btnRefresh.Text = strTraduction("btnRefresh"); 356 | btnRefresh.UseVisualStyleBackColor = true; 357 | btnRefresh.Click += (sender, e) => 358 | { 359 | tNum = -1; 360 | listView.Clear(); 361 | lblInfo.Text = strTraduction("selectGrid"); 362 | btnConnect.Enabled = false; 363 | data = Api.CCAPI.GetConsoleList(); 364 | int sizeD = data.Count(); 365 | for (int i = 0; i < sizeD; i++) 366 | { 367 | ListViewItem item = new ListViewItem(" " + data[i].Name + " - " + data[i].Ip); 368 | item.ImageIndex = 0; 369 | listView.Items.Add(item); 370 | } 371 | }; 372 | 373 | // Create our list view 374 | listView.Font = new Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 375 | listViewGroup.Header = "Consoles"; 376 | listViewGroup.Name = "consoleGroup"; 377 | listView.Groups.AddRange(new ListViewGroup[] {listViewGroup}); 378 | listView.HideSelection = false; 379 | listView.Location = new Point(12, 12); 380 | listView.MultiSelect = false; 381 | listView.Name = "ConsoleList"; 382 | listView.ShowGroups = false; 383 | listView.Size = new Size(290, 215); 384 | listView.TabIndex = 0; 385 | listView.UseCompatibleStateImageBehavior = false; 386 | listView.View = View.List; 387 | listView.ItemSelectionChanged += (sender, e) => 388 | { 389 | tNum = e.ItemIndex; 390 | btnConnect.Enabled = true; 391 | string Name, Ip = "?"; 392 | if (data[tNum].Name.Length > 18) 393 | Name = data[tNum].Name.Substring(0, 17) + "..."; 394 | else Name = data[tNum].Name; 395 | if (data[tNum].Ip.Length > 16) 396 | Ip = data[tNum].Name.Substring(0, 16) + "..."; 397 | else Ip = data[tNum].Ip; 398 | lblInfo.Text = strTraduction("selectedLbl") + " " + Name + " / " + Ip; 399 | }; 400 | 401 | // Create our label 402 | lblInfo.AutoSize = true; 403 | lblInfo.Location = new Point(12, 234); 404 | lblInfo.Name = "lblInfo"; 405 | lblInfo.Size = new Size(158, 13); 406 | lblInfo.TabIndex = 3; 407 | lblInfo.Text = strTraduction("selectGrid"); 408 | 409 | // Create our form 410 | formList.MinimizeBox = false; 411 | formList.MaximizeBox = false; 412 | formList.ClientSize = new Size(314, 285); 413 | formList.AutoScaleDimensions = new SizeF(6F, 13F); 414 | formList.AutoScaleMode = AutoScaleMode.Font; 415 | formList.FormBorderStyle = FormBorderStyle.FixedSingle; 416 | formList.StartPosition = FormStartPosition.CenterScreen; 417 | formList.Text = strTraduction("formTitle"); 418 | formList.Controls.Add(listView); 419 | formList.Controls.Add(lblInfo); 420 | formList.Controls.Add(btnConnect); 421 | formList.Controls.Add(btnRefresh); 422 | 423 | // Start to update our list 424 | ImageList imgL = new ImageList(); 425 | imgL.Images.Add(Resources.ps3); 426 | listView.SmallImageList = imgL; 427 | int sizeData = data.Count(); 428 | 429 | for (int i = 0; i < sizeData; i++) 430 | { 431 | ListViewItem item = new ListViewItem(" " + data[i].Name + " - " + data[i].Ip); 432 | item.ImageIndex = 0; 433 | listView.Items.Add(item); 434 | } 435 | 436 | // If there are more than 0 targets we show the form 437 | // Else we inform the user to create a console. 438 | if (sizeData > 0) 439 | formList.ShowDialog(); 440 | else 441 | { 442 | Result = false; 443 | formList.Close(); 444 | MessageBox.Show(strTraduction("noConsole"), strTraduction("noConsoleTitle"), MessageBoxButtons.OK, MessageBoxIcon.Error); 445 | } 446 | 447 | return Result; 448 | } 449 | } 450 | } 451 | } 452 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/API/TMAPI.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.3 : // 7 | // - Support CCAPI v2.5 C# by iMCSx // 8 | // - Popup better form with icon // 9 | // - CCAPI Consoles List Popup French/English // 10 | // - CCAPI Get Console Info // 11 | // - CCAPI Get Console List // 12 | // - CCAPI Get Number Of Consoles // 13 | // - Get Console Name TMAPI/CCAPI // 14 | // // 15 | // Credits : FM|T Enstone , Buc-ShoTz // 16 | // // 17 | // Follow me : // 18 | // // 19 | // FrenchModdingTeam.com // 20 | // Youtube.com/iMCSx // 21 | // Twitter.com/iMCSx // 22 | // Facebook.com/iMCSx // 23 | // // 24 | // ************************************************* // 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Globalization; 29 | using System.IO; 30 | using System.Linq; 31 | using System.Reflection; 32 | using System.Text; 33 | using System.Windows.Forms; 34 | using System.Xml; 35 | 36 | using PS3Lib.NET; 37 | 38 | namespace PS3Lib 39 | { 40 | public class TMAPI 41 | { 42 | public static int Target = 0xFF; 43 | public static bool AssemblyLoaded = true; 44 | public static PS3TMAPI.ResetParameter resetParameter; 45 | 46 | public TMAPI() 47 | { 48 | 49 | } 50 | 51 | public Extension Extension 52 | { 53 | get { return new Extension(SelectAPI.TargetManager); } 54 | } 55 | 56 | public class SCECMD 57 | { 58 | /// Get the target status and return the string value. 59 | public string SNRESULT() 60 | { 61 | return Parameters.snresult; 62 | } 63 | 64 | /// Get the target name. 65 | public string GetTargetName() 66 | { 67 | if (Parameters.ConsoleName == null || Parameters.ConsoleName == String.Empty) 68 | { 69 | PS3TMAPI.InitTargetComms(); 70 | PS3TMAPI.TargetInfo TargetInfo = new PS3TMAPI.TargetInfo(); 71 | TargetInfo.Flags = PS3TMAPI.TargetInfoFlag.TargetID; 72 | TargetInfo.Target = TMAPI.Target; 73 | PS3TMAPI.GetTargetInfo(ref TargetInfo); 74 | Parameters.ConsoleName = TargetInfo.Name; 75 | } 76 | return Parameters.ConsoleName; 77 | } 78 | 79 | /// Get the target status and return the string value. 80 | public string GetStatus() 81 | { 82 | if (TMAPI.AssemblyLoaded) 83 | return "NotConnected"; 84 | Parameters.connectStatus = new PS3TMAPI.ConnectStatus(); 85 | PS3TMAPI.GetConnectStatus(Target, out Parameters.connectStatus, out Parameters.usage); 86 | Parameters.Status = Parameters.connectStatus.ToString(); 87 | return Parameters.Status; 88 | } 89 | 90 | /// Get the ProcessID by the current process. 91 | public uint ProcessID() 92 | { 93 | return Parameters.ProcessID; 94 | } 95 | 96 | /// Get an array of processID's. 97 | public uint[] ProcessIDs() 98 | { 99 | return Parameters.processIDs; 100 | } 101 | 102 | /// Get some details from your target. 103 | public PS3TMAPI.ConnectStatus DetailStatus() 104 | { 105 | return Parameters.connectStatus; 106 | } 107 | } 108 | 109 | public SCECMD SCE 110 | { 111 | get { return new SCECMD(); } 112 | } 113 | 114 | public class Parameters 115 | { 116 | public static string 117 | usage, 118 | info, 119 | snresult, 120 | Status, 121 | MemStatus, 122 | ConsoleName; 123 | public static uint 124 | ProcessID; 125 | public static uint[] 126 | processIDs; 127 | public static byte[] 128 | Retour; 129 | public static PS3TMAPI.ConnectStatus 130 | connectStatus; 131 | } 132 | 133 | /// Enum of flag reset. 134 | public enum ResetTarget 135 | { 136 | Hard, 137 | Quick, 138 | ResetEx, 139 | Soft 140 | } 141 | 142 | public void InitComms() 143 | { 144 | PS3TMAPI.InitTargetComms(); 145 | } 146 | 147 | /// Connect the default target and initialize the dll. Possible to put an int as arugment for determine which target to connect. 148 | public bool ConnectTarget(int TargetIndex = 0) 149 | { 150 | bool result = false; 151 | if(AssemblyLoaded) 152 | PS3TMAPI_NET(); 153 | AssemblyLoaded = false; 154 | Target = TargetIndex; 155 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.InitTargetComms()); 156 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.Connect(TargetIndex, null)); 157 | return result; 158 | } 159 | 160 | /// Connect the target by is name. 161 | public bool ConnectTarget(string TargetName) 162 | { 163 | bool result = false; 164 | if (AssemblyLoaded) 165 | PS3TMAPI_NET(); 166 | AssemblyLoaded = false; 167 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.InitTargetComms()); 168 | if (result) 169 | { 170 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.GetTargetFromName(TargetName, out Target)); 171 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.Connect(Target, null)); 172 | } 173 | return result; 174 | } 175 | 176 | /// Disconnect the target. 177 | public void DisconnectTarget() 178 | { 179 | PS3TMAPI.Disconnect(Target); 180 | } 181 | 182 | /// Power on selected target. 183 | public void PowerOn(int numTarget = 0) 184 | { 185 | if (Target != 0xFF) 186 | numTarget = Target; 187 | PS3TMAPI.PowerOn(numTarget); 188 | } 189 | 190 | /// Power off selected target. 191 | public void PowerOff(bool Force) 192 | { 193 | PS3TMAPI.PowerOff(Target, Force); 194 | } 195 | 196 | /// Attach and continue the current process from the target. 197 | public bool AttachProcess() 198 | { 199 | bool isOK = false; 200 | PS3TMAPI.GetProcessList(Target, out Parameters.processIDs); 201 | if (Parameters.processIDs.Length > 0) 202 | isOK = true; 203 | else isOK = false; 204 | if (isOK) 205 | { 206 | ulong uProcess = Parameters.processIDs[0]; 207 | Parameters.ProcessID = Convert.ToUInt32(uProcess); 208 | PS3TMAPI.ProcessAttach(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID); 209 | PS3TMAPI.ProcessContinue(Target, Parameters.ProcessID); 210 | Parameters.info = "The Process 0x" + Parameters.ProcessID.ToString("X8") + " Has Been Attached !"; 211 | } 212 | return isOK; 213 | } 214 | 215 | /// Set memory to the target (byte[]). 216 | public void SetMemory(uint Address, byte[] Bytes) 217 | { 218 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, Bytes); 219 | } 220 | 221 | /// Set memory to the address (byte[]). 222 | public void SetMemory(uint Address, ulong value) 223 | { 224 | byte[] b = BitConverter.GetBytes(value); 225 | Array.Reverse(b); 226 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, b); 227 | } 228 | 229 | /// Set memory with value as string hexadecimal to the address (string). 230 | public void SetMemory(uint Address, string hexadecimal, EndianType Type = EndianType.BigEndian) 231 | { 232 | byte[] Entry = StringToByteArray(hexadecimal); 233 | if (Type == EndianType.LittleEndian) 234 | Array.Reverse(Entry); 235 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, Entry); 236 | } 237 | 238 | /// Get memory from the address. 239 | public void GetMemory(uint Address, byte[] Bytes) 240 | { 241 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Bytes); 242 | } 243 | 244 | /// Get a bytes array with the length input. 245 | public byte[] GetBytes(uint Address, uint lengthByte) 246 | { 247 | byte[] Longueur = new byte[lengthByte]; 248 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Longueur); 249 | return Longueur; 250 | } 251 | 252 | /// Get a string with the length input. 253 | public string GetString(uint Address, uint lengthString) 254 | { 255 | byte[] Longueur = new byte[lengthString]; 256 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Longueur); 257 | string StringResult = Hex2Ascii(ReplaceString(Longueur)); 258 | return StringResult; 259 | } 260 | 261 | internal static string Hex2Ascii(string iMCSxString) 262 | { 263 | StringBuilder builder = new StringBuilder(); 264 | for (int i = 0; i <= (iMCSxString.Length - 2); i += 2) 265 | { 266 | builder.Append(Convert.ToString(Convert.ToChar(int.Parse(iMCSxString.Substring(i, 2), NumberStyles.HexNumber)))); 267 | } 268 | return builder.ToString(); 269 | } 270 | 271 | internal static byte[] StringToByteArray(string hex) 272 | { 273 | string replace = hex.Replace("0x", ""); 274 | string Stringz = replace.Insert(replace.Length - 1, "0"); 275 | 276 | int Odd = replace.Length; 277 | bool Nombre; 278 | if (Odd % 2 == 0) 279 | Nombre = true; 280 | else 281 | Nombre = false; 282 | try 283 | { 284 | if (Nombre == true) 285 | { 286 | return Enumerable.Range(0, replace.Length) 287 | .Where(x => x % 2 == 0) 288 | .Select(x => Convert.ToByte(replace.Substring(x, 2), 16)) 289 | .ToArray(); 290 | } 291 | else 292 | { 293 | return Enumerable.Range(0, replace.Length) 294 | .Where(x => x % 2 == 0) 295 | .Select(x => Convert.ToByte(Stringz.Substring(x, 2), 16)) 296 | .ToArray(); 297 | } 298 | } 299 | catch { throw new System.ArgumentException("Value not possible.", "Byte Array"); } 300 | } 301 | 302 | internal static string ReplaceString(byte[] bytes) 303 | { 304 | string PSNString = BitConverter.ToString(bytes); 305 | PSNString = PSNString.Replace("00", string.Empty); 306 | PSNString = PSNString.Replace("-", string.Empty); 307 | for(int i = 0; i < 10; i++) 308 | PSNString = PSNString.Replace("^" + i.ToString(), string.Empty); 309 | return PSNString; 310 | } 311 | 312 | /// Reset target to XMB , Sometimes the target restart quickly. 313 | public void ResetToXMB(ResetTarget flag) 314 | { 315 | if (flag == ResetTarget.Hard) 316 | resetParameter = PS3TMAPI.ResetParameter.Hard; 317 | else if (flag == ResetTarget.Quick) 318 | resetParameter = PS3TMAPI.ResetParameter.Quick; 319 | else if (flag == ResetTarget.ResetEx) 320 | resetParameter = PS3TMAPI.ResetParameter.ResetEx; 321 | else if (flag == ResetTarget.Soft) 322 | resetParameter = PS3TMAPI.ResetParameter.Soft; 323 | PS3TMAPI.Reset(Target, resetParameter); 324 | } 325 | 326 | internal static Assembly LoadApi; 327 | ///Load the PS3 API for use with your Application .NET. 328 | public Assembly PS3TMAPI_NET() 329 | { 330 | AppDomain.CurrentDomain.AssemblyResolve += (s, e) => 331 | { 332 | var filename = new AssemblyName(e.Name).Name; 333 | var x = string.Format(@"C:\Program Files\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 334 | var x64 = string.Format(@"C:\Program Files (x64)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 335 | var x86 = string.Format(@"C:\Program Files (x86)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 336 | if (System.IO.File.Exists(x)) 337 | LoadApi = Assembly.LoadFile(x); 338 | else 339 | { 340 | if (System.IO.File.Exists(x64)) 341 | LoadApi = Assembly.LoadFile(x64); 342 | 343 | else 344 | { 345 | if (System.IO.File.Exists(x86)) 346 | LoadApi = Assembly.LoadFile(x86); 347 | else 348 | { 349 | MessageBox.Show("Target Manager API cannot be founded to:\r\n\r\n" + x86, "Error with PS3 API!", MessageBoxButtons.OK, MessageBoxIcon.Error); 350 | } 351 | } 352 | } 353 | return LoadApi; 354 | }; 355 | return LoadApi; 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/EXTRA/ArrayBuilder.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.3 : // 7 | // - Support CCAPI v2.5 C# by iMCSx // 8 | // - Popup better form with icon // 9 | // - CCAPI Consoles List Popup French/English // 10 | // - CCAPI Get Console Info // 11 | // - CCAPI Get Console List // 12 | // - CCAPI Get Number Of Consoles // 13 | // - Get Console Name TMAPI/CCAPI // 14 | // // 15 | // Credits : FM|T Enstone , Buc-ShoTz // 16 | // // 17 | // Follow me : // 18 | // // 19 | // FrenchModdingTeam.com // 20 | // Youtube.com/iMCSx // 21 | // Twitter.com/iMCSx // 22 | // Facebook.com/iMCSx // 23 | // // 24 | // ************************************************* // 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Linq; 29 | using System.Text; 30 | using System.Threading.Tasks; 31 | 32 | namespace PS3Lib 33 | { 34 | public enum EndianType 35 | { 36 | LittleEndian, 37 | BigEndian 38 | } 39 | 40 | public class ArrayBuilder 41 | { 42 | private byte[] buffer; 43 | private int size; 44 | 45 | public ArrayBuilder(byte[] BytesArray) 46 | { 47 | buffer = BytesArray; 48 | size = buffer.Length; 49 | } 50 | 51 | /// Enter into all functions "Reader". 52 | public ArrayReader Read 53 | { 54 | get { return new ArrayReader(buffer); } 55 | } 56 | 57 | /// Enter into all functions "Writer". 58 | public ArrayWriter Write 59 | { 60 | get { return new ArrayWriter(buffer); } 61 | } 62 | 63 | public class ArrayReader 64 | { 65 | private byte[] buffer; 66 | private int size; 67 | 68 | public ArrayReader(byte[] BytesArray) 69 | { 70 | buffer = BytesArray; 71 | size = buffer.Length; 72 | } 73 | 74 | sbyte GetSByte(int pos) 75 | { 76 | return (sbyte)buffer[pos]; 77 | } 78 | 79 | public byte GetByte(int pos) 80 | { 81 | return buffer[pos]; 82 | } 83 | 84 | public char GetChar(int pos) 85 | { 86 | string s = buffer[pos].ToString(); 87 | char b = s[0]; 88 | return b; 89 | } 90 | 91 | public bool GetBool(int pos) 92 | { 93 | return buffer[pos] != 0; 94 | } 95 | 96 | public short GetInt16(int pos, EndianType Type = EndianType.BigEndian) 97 | { 98 | byte[] b = new byte[2]; 99 | for(int i = 0; i < 2; i++) 100 | b[i] = buffer[pos + i]; 101 | if (Type == EndianType.BigEndian) 102 | Array.Reverse(b, 0, 2); 103 | return BitConverter.ToInt16(b, 0); 104 | } 105 | 106 | public int GetInt32(int pos, EndianType Type = EndianType.BigEndian) 107 | { 108 | byte[] b = new byte[4]; 109 | for (int i = 0; i < 4; i++) 110 | b[i] = buffer[pos + i]; 111 | if (Type == EndianType.BigEndian) 112 | Array.Reverse(b, 0, 4); 113 | return BitConverter.ToInt32(b, 0); 114 | } 115 | 116 | public long GetInt64(int pos, EndianType Type = EndianType.BigEndian) 117 | { 118 | byte[] b = new byte[8]; 119 | for (int i = 0; i < 8; i++) 120 | b[i] = buffer[pos + i]; 121 | if (Type == EndianType.BigEndian) 122 | Array.Reverse(b, 0, 8); 123 | return BitConverter.ToInt64(b, 0); 124 | } 125 | 126 | public ushort GetUInt16(int pos, EndianType Type = EndianType.BigEndian) 127 | { 128 | byte[] b = new byte[2]; 129 | for (int i = 0; i < 2; i++) 130 | b[i] = buffer[pos + i]; 131 | if (Type == EndianType.BigEndian) 132 | Array.Reverse(b, 0, 2); 133 | return BitConverter.ToUInt16(b, 0); 134 | } 135 | 136 | public uint GetUInt32(int pos, EndianType Type = EndianType.BigEndian) 137 | { 138 | byte[] b = new byte[4]; 139 | for (int i = 0; i < 4; i++) 140 | b[i] = buffer[pos + i]; 141 | if (Type == EndianType.BigEndian) 142 | Array.Reverse(b, 0, 4); 143 | return BitConverter.ToUInt32(b, 0); 144 | } 145 | 146 | public ulong GetUInt64(int pos, EndianType Type = EndianType.BigEndian) 147 | { 148 | byte[] b = new byte[8]; 149 | for (int i = 0; i < 8; i++) 150 | b[i] = buffer[pos + i]; 151 | if (Type == EndianType.BigEndian) 152 | Array.Reverse(b, 0, 8); 153 | return BitConverter.ToUInt64(b, 0); 154 | } 155 | 156 | public byte[] GetBytes(int pos, int length) 157 | { 158 | byte[] b = new byte[length]; 159 | for (int i = 0; i < length; i++) 160 | b[i] = buffer[pos + i]; 161 | return b; 162 | } 163 | 164 | public string GetString(int pos) 165 | { 166 | int strlen = 0; 167 | while (true) 168 | if (buffer[pos + strlen] != (byte)0) 169 | strlen++; 170 | else break; 171 | byte[] b = new byte[strlen]; 172 | for (int i = 0; i < strlen; i++) 173 | b[i] = buffer[pos+i]; 174 | return Encoding.UTF8.GetString(b); 175 | } 176 | 177 | public float GetFloat(int pos) 178 | { 179 | byte[] b = new byte[4]; 180 | for (int i = 0; i < 4; i++) 181 | b[i] = buffer[pos+i]; 182 | Array.Reverse(b, 0, 4); 183 | return BitConverter.ToSingle(b, 0); 184 | } 185 | } 186 | 187 | public class ArrayWriter 188 | { 189 | private byte[] buffer; 190 | private int size; 191 | 192 | public ArrayWriter(byte[] BytesArray) 193 | { 194 | buffer = BytesArray; 195 | size = buffer.Length; 196 | } 197 | 198 | public void SetSByte(int pos, sbyte value) 199 | { 200 | buffer[0 + pos] = (byte)value; 201 | } 202 | 203 | public void SetByte(int pos, byte value) 204 | { 205 | buffer[0 + pos] = value; 206 | } 207 | 208 | public void SetChar(int pos, char value) 209 | { 210 | byte[] b = Encoding.UTF8.GetBytes(value.ToString()); 211 | buffer[0 + pos] = b[0]; 212 | } 213 | 214 | public void SetBool(int pos, bool value) 215 | { 216 | byte[] b = new byte[1]; 217 | b[0] = value ? (byte)1 : (byte)0; 218 | buffer[pos] = b[0]; 219 | } 220 | 221 | public void SetInt16(int pos, short value, EndianType Type = EndianType.BigEndian) 222 | { 223 | byte[] b = BitConverter.GetBytes(value); 224 | if (Type == EndianType.BigEndian) 225 | Array.Reverse(b, 0, 2); 226 | for (int i = 0; i < 2; i++) 227 | buffer[i + pos] = b[i]; 228 | } 229 | 230 | public void SetInt32(int pos, int value, EndianType Type = EndianType.BigEndian) 231 | { 232 | byte[] b = BitConverter.GetBytes(value); 233 | if (Type == EndianType.BigEndian) 234 | Array.Reverse(b, 0, 4); 235 | for (int i = 0; i < 4; i++) 236 | buffer[i + pos] = b[i]; 237 | } 238 | 239 | public void SetInt64(int pos, long value, EndianType Type = EndianType.BigEndian) 240 | { 241 | byte[] b = BitConverter.GetBytes(value); 242 | if (Type == EndianType.BigEndian) 243 | Array.Reverse(b, 0, 8); 244 | for (int i = 0; i < 8; i++) 245 | buffer[i + pos] = b[i]; 246 | } 247 | 248 | public void SetUInt16(int pos, ushort value, EndianType Type = EndianType.BigEndian) 249 | { 250 | byte[] b = BitConverter.GetBytes(value); 251 | if (Type == EndianType.BigEndian) 252 | Array.Reverse(b, 0, 2); 253 | for (int i = 0; i < 2; i++) 254 | buffer[i + pos] = b[i]; 255 | } 256 | 257 | public void SetUInt32(int pos, uint value, EndianType Type = EndianType.BigEndian) 258 | { 259 | byte[] b = BitConverter.GetBytes(value); 260 | if (Type == EndianType.BigEndian) 261 | Array.Reverse(b, 0, 4); 262 | for (int i = 0; i < 4; i++) 263 | buffer[i + pos] = b[i]; 264 | } 265 | 266 | public void SetUInt64(int pos, ulong value, EndianType Type = EndianType.BigEndian) 267 | { 268 | byte[] b = BitConverter.GetBytes(value); 269 | if (Type == EndianType.BigEndian) 270 | Array.Reverse(b, 0, 8); 271 | for (int i = 0; i < 8; i++) 272 | buffer[i + pos] = b[i]; 273 | } 274 | 275 | public void SetBytes(int pos, byte[] value) 276 | { 277 | int valueSize = value.Length; 278 | for (int i = 0; i < valueSize; i++) 279 | buffer[i + pos] = value[i]; 280 | } 281 | 282 | public void SetString(int pos, string value) 283 | { 284 | byte[] b = Encoding.UTF8.GetBytes(value+"\0"); 285 | for (int i = 0; i < b.Length; i++) 286 | buffer[i + pos] = b[i]; 287 | } 288 | 289 | public void SetFloat(int pos, float value) 290 | { 291 | byte[] b = BitConverter.GetBytes(value); 292 | Array.Reverse(b, 0, 4); 293 | for (int i = 0; i < 4; i++) 294 | buffer[i + pos] = b[i]; 295 | } 296 | } 297 | } 298 | } 299 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/EXTRA/Extensions.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.3 : // 7 | // - Support CCAPI v2.5 C# by iMCSx // 8 | // - Popup better form with icon // 9 | // - CCAPI Consoles List Popup French/English // 10 | // - CCAPI Get Console Info // 11 | // - CCAPI Get Console List // 12 | // - CCAPI Get Number Of Consoles // 13 | // - Get Console Name TMAPI/CCAPI // 14 | // // 15 | // Credits : FM|T Enstone , Buc-ShoTz // 16 | // // 17 | // Follow me : // 18 | // // 19 | // FrenchModdingTeam.com // 20 | // Youtube.com/iMCSx // 21 | // Twitter.com/iMCSx // 22 | // Facebook.com/iMCSx // 23 | // // 24 | // ************************************************* // 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Linq; 29 | using System.Text; 30 | 31 | namespace PS3Lib 32 | { 33 | public class Extension 34 | { 35 | private SelectAPI CurrentAPI; 36 | public Extension(SelectAPI API) 37 | { 38 | CurrentAPI = API; 39 | if (API == SelectAPI.TargetManager) 40 | if (Common.TmApi == null) 41 | Common.TmApi = new TMAPI(); 42 | if (API == SelectAPI.ControlConsole) 43 | if (Common.CcApi == null) 44 | Common.CcApi = new CCAPI(); 45 | } 46 | 47 | /// Read a signed byte. 48 | public sbyte ReadSByte(uint offset) 49 | { 50 | byte[] buffer = new byte[1]; 51 | GetMem(offset, buffer, CurrentAPI); 52 | return (sbyte)buffer[0]; 53 | } 54 | 55 | /// Read a byte a check if his value. This return a bool according the byte detected. 56 | public bool ReadBool(uint offset) 57 | { 58 | byte[] buffer = new byte[1]; 59 | GetMem(offset, buffer, CurrentAPI); 60 | return buffer[0] != 0; 61 | } 62 | 63 | /// Read and return an integer 16 bits. 64 | public short ReadInt16(uint offset) 65 | { 66 | byte[] buffer = GetBytes(offset, 2, CurrentAPI); 67 | Array.Reverse(buffer, 0, 2); 68 | return BitConverter.ToInt16(buffer, 0); 69 | } 70 | 71 | /// Read and return an integer 32 bits. 72 | public int ReadInt32(uint offset) 73 | { 74 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 75 | Array.Reverse(buffer, 0, 4); 76 | return BitConverter.ToInt32(buffer, 0); 77 | } 78 | 79 | /// Read and return an integer 64 bits. 80 | public long ReadInt64(uint offset) 81 | { 82 | byte[] buffer = GetBytes(offset, 8, CurrentAPI); 83 | Array.Reverse(buffer, 0, 8); 84 | return BitConverter.ToInt64(buffer, 0); 85 | } 86 | 87 | /// Read and return a byte. 88 | public byte ReadByte(uint offset) 89 | { 90 | byte[] buffer = GetBytes(offset, 1, CurrentAPI); 91 | return buffer[0]; 92 | } 93 | 94 | /// Read a string with a length to the first byte equal to an value null (0x00). 95 | public byte[] ReadBytes(uint offset, int length) 96 | { 97 | byte[] buffer = GetBytes(offset, (uint)length, CurrentAPI); 98 | return buffer; 99 | } 100 | 101 | /// Read and return an unsigned integer 16 bits. 102 | public ushort ReadUInt16(uint offset) 103 | { 104 | byte[] buffer = GetBytes(offset, 2, CurrentAPI); 105 | Array.Reverse(buffer, 0, 2); 106 | return BitConverter.ToUInt16(buffer, 0); 107 | } 108 | 109 | /// Read and return an unsigned integer 32 bits. 110 | public uint ReadUInt32(uint offset) 111 | { 112 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 113 | Array.Reverse(buffer, 0, 4); 114 | return BitConverter.ToUInt32(buffer, 0); 115 | } 116 | 117 | /// Read and return an unsigned integer 64 bits. 118 | public ulong ReadUInt64(uint offset) 119 | { 120 | byte[] buffer = GetBytes(offset, 8, CurrentAPI); 121 | Array.Reverse(buffer, 0, 8); 122 | return BitConverter.ToUInt64(buffer, 0); 123 | } 124 | 125 | /// Read and return a Float. 126 | public float ReadFloat(uint offset) 127 | { 128 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 129 | Array.Reverse(buffer, 0, 4); 130 | return BitConverter.ToSingle(buffer, 0); 131 | } 132 | 133 | /// Read a string very fast and stop only when a byte null is detected (0x00). 134 | public string ReadString(uint offset) 135 | { 136 | int block = 40; 137 | int addOffset = 0; 138 | string str = ""; 139 | repeat: 140 | byte[] buffer = ReadBytes(offset + (uint)addOffset, block); 141 | str += Encoding.UTF8.GetString(buffer); 142 | addOffset += block; 143 | if (str.Contains('\0')) 144 | { 145 | int index = str.IndexOf('\0'); 146 | string final = str.Substring(0, index); 147 | str = String.Empty; 148 | return final; 149 | } 150 | else 151 | goto repeat; 152 | } 153 | 154 | /// Write a signed byte. 155 | public void WriteSByte(uint offset, sbyte input) 156 | { 157 | byte[] buff = new byte[1]; 158 | buff[0] = (byte)input; 159 | SetMem(offset, buff, CurrentAPI); 160 | } 161 | 162 | /// Write a boolean. 163 | public void WriteBool(uint offset, bool input) 164 | { 165 | byte[] buff = new byte[1]; 166 | buff[0] = input ? (byte)1 : (byte)0; 167 | SetMem(offset, buff, CurrentAPI); 168 | } 169 | 170 | /// Write an interger 16 bits. 171 | public void WriteInt16(uint offset, short input) 172 | { 173 | byte[] buff = new byte[2]; 174 | BitConverter.GetBytes(input).CopyTo(buff, 0); 175 | Array.Reverse(buff, 0, 2); 176 | SetMem(offset, buff, CurrentAPI); 177 | } 178 | 179 | /// Write an integer 32 bits. 180 | public void WriteInt32(uint offset, int input) 181 | { 182 | byte[] buff = new byte[4]; 183 | BitConverter.GetBytes(input).CopyTo(buff, 0); 184 | Array.Reverse(buff, 0, 4); 185 | SetMem(offset, buff, CurrentAPI); 186 | } 187 | 188 | /// Write an integer 64 bits. 189 | public void WriteInt64(uint offset, long input) 190 | { 191 | byte[] buff = new byte[8]; 192 | BitConverter.GetBytes(input).CopyTo(buff, 0); 193 | Array.Reverse(buff, 0, 8); 194 | SetMem(offset, buff, CurrentAPI); 195 | } 196 | 197 | /// Write a byte. 198 | public void WriteByte(uint offset, byte input) 199 | { 200 | byte[] buff = new byte[1]; 201 | buff[0] = input; 202 | SetMem(offset, buff, CurrentAPI); 203 | } 204 | 205 | /// Write a byte array. 206 | public void WriteBytes(uint offset, byte[] input) 207 | { 208 | byte[] buff = input; 209 | SetMem(offset, buff, CurrentAPI); 210 | } 211 | 212 | /// Write a string. 213 | public void WriteString(uint offset, string input) 214 | { 215 | byte[] buff = Encoding.UTF8.GetBytes(input); 216 | Array.Resize(ref buff, buff.Length + 1); 217 | SetMem(offset, buff, CurrentAPI); 218 | } 219 | 220 | /// Write an unsigned integer 16 bits. 221 | public void WriteUInt16(uint offset, ushort input) 222 | { 223 | byte[] buff = new byte[2]; 224 | BitConverter.GetBytes(input).CopyTo(buff, 0); 225 | Array.Reverse(buff, 0, 2); 226 | SetMem(offset, buff, CurrentAPI); 227 | } 228 | 229 | /// Write an unsigned integer 32 bits. 230 | public void WriteUInt32(uint offset, uint input) 231 | { 232 | byte[] buff = new byte[4]; 233 | BitConverter.GetBytes(input).CopyTo(buff, 0); 234 | Array.Reverse(buff, 0, 4); 235 | SetMem(offset, buff, CurrentAPI); 236 | } 237 | 238 | /// Write an unsigned integer 64 bits. 239 | public void WriteUInt64(uint offset, ulong input) 240 | { 241 | byte[] buff = new byte[8]; 242 | BitConverter.GetBytes(input).CopyTo(buff, 0); 243 | Array.Reverse(buff, 0, 8); 244 | SetMem(offset, buff, CurrentAPI); 245 | } 246 | 247 | /// Write a Float. 248 | public void WriteFloat(uint offset, float input) 249 | { 250 | byte[] buff = new byte[4]; 251 | BitConverter.GetBytes(input).CopyTo(buff, 0); 252 | Array.Reverse(buff, 0, 4); 253 | SetMem(offset, buff, CurrentAPI); 254 | } 255 | 256 | private void SetMem(uint Address, byte[] buffer, SelectAPI API) 257 | { 258 | if (API == SelectAPI.ControlConsole) 259 | Common.CcApi.SetMemory(Address, buffer); 260 | else if (API == SelectAPI.TargetManager) 261 | Common.TmApi.SetMemory(Address, buffer); 262 | } 263 | 264 | private void GetMem(uint offset, byte[] buffer, SelectAPI API) 265 | { 266 | if (API == SelectAPI.ControlConsole) 267 | Common.CcApi.GetMemory(offset, buffer); 268 | else if (API == SelectAPI.TargetManager) 269 | Common.TmApi.GetMemory(offset, buffer); 270 | } 271 | 272 | private byte[] GetBytes(uint offset, uint length, SelectAPI API) 273 | { 274 | byte[] buffer = new byte[length]; 275 | if (API == SelectAPI.ControlConsole) 276 | buffer = Common.CcApi.GetBytes(offset, length); 277 | else if (API == SelectAPI.TargetManager) 278 | buffer = Common.TmApi.GetBytes(offset, length); 279 | return buffer; 280 | } 281 | 282 | private class Common 283 | { 284 | public static CCAPI CcApi; 285 | public static TMAPI TmApi; 286 | } 287 | 288 | } 289 | } -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/PS3Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/PS3Lib/PS3Lib.dll -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace CCAPI_Demo 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// Point d'entrée principal de l'application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Les informations générales relatives à un assembly dépendent de 6 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations 7 | // associées à un assembly. 8 | [assembly: AssemblyTitle("CCAPI-Demo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CCAPI-Demo")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 18 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de 19 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM 23 | [assembly: Guid("90e4ea06-eaa4-4eb6-8c64-ca1fec0c197e")] 24 | 25 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes : 26 | // 27 | // Version principale 28 | // Version secondaire 29 | // Numéro de build 30 | // Révision 31 | // 32 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 33 | // en utilisant '*', comme indiqué ci-dessous : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.34014 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CCAPI_Demo.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. 17 | /// 18 | // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder 19 | // à l'aide d'un outil, tel que ResGen ou Visual Studio. 20 | // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen 21 | // avec l'option /str ou régénérez votre projet VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CCAPI_Demo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Remplace la propriété CurrentUICulture du thread actuel pour toutes 51 | /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). 65 | /// 66 | internal static System.Drawing.Icon ps3 { 67 | get { 68 | object obj = ResourceManager.GetObject("ps3", resourceCulture); 69 | return ((System.Drawing.Icon)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\ps3.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18052 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CCAPI_Demo.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/Resources/ps3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/Resources/ps3.ico -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/bin/Release/CCAPI-Demo.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/bin/Release/CCAPI-Demo.vshost.exe -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.csprojResolveAssemblyReference.cache 2 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Form1.resources 3 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Properties.Resources.resources 4 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.csproj.GenerateResource.Cache 5 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe.config 6 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe 7 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.pdb 8 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\PS3Lib.dll 9 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.exe 10 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.pdb 11 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe.config 12 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.exe 13 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.pdb 14 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe 15 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.pdb 16 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\PS3Lib.dll 17 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.csprojResolveAssemblyReference.cache 18 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Form1.resources 19 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Properties.Resources.resources 20 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.csproj.GenerateResource.Cache 21 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe.config 22 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.exe 23 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.pdb 24 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.exe 25 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\CCAPI-Demo.pdb 26 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Form1.resources 27 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI_Demo.Properties.Resources.resources 28 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Debug\CCAPI-Demo.csproj.GenerateResource.Cache 29 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\PS3Lib.dll 30 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\PS3Lib.pdb 31 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Debug\PS3Lib.xml 32 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.exe -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI-Demo.pdb -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI_Demo.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI_Demo.Form1.resources -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI_Demo.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/CCAPI_Demo.Properties.Resources.resources -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\CCAPI-Demo.exe.config 2 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\CCAPI-Demo.exe 3 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\CCAPI-Demo.pdb 4 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\PS3Lib.dll 5 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\PS3Lib.pdb 6 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\bin\Release\PS3Lib.xml 7 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Release\CCAPI_Demo.Form1.resources 8 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Release\CCAPI_Demo.Properties.Resources.resources 9 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Release\CCAPI-Demo.csproj.GenerateResource.Cache 10 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Release\CCAPI-Demo.exe 11 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\CCAPI-Demo\CCAPI-Demo\obj\Release\CCAPI-Demo.pdb 12 | -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.exe -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI-Demo.pdb -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI_Demo.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI_Demo.Form1.resources -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI_Demo.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/CCAPI_Demo.Properties.Resources.resources -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/CCAPI-Demo/CCAPI-Demo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/BUILD/PS3API-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/BUILD/PS3API-Demo.exe -------------------------------------------------------------------------------- /demo/PS3API-Demo/BUILD/PS3Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/BUILD/PS3Lib.dll -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PS3API-Demo", "PS3API-Demo\PS3API-Demo.csproj", "{E8B7EC0F-C467-43CE-9755-2B64851B77F1}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E8B7EC0F-C467-43CE-9755-2B64851B77F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {E8B7EC0F-C467-43CE-9755-2B64851B77F1}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {E8B7EC0F-C467-43CE-9755-2B64851B77F1}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {E8B7EC0F-C467-43CE-9755-2B64851B77F1}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo.v11.suo -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Main.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PS3API_Demo 2 | { 3 | partial class Main 4 | { 5 | /// 6 | /// Variable nécessaire au concepteur. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Nettoyage des ressources utilisées. 12 | /// 13 | /// true si les ressources managées doivent être supprimées ; sinon, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Code généré par le Concepteur Windows Form 24 | 25 | /// 26 | /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas 27 | /// le contenu de cette méthode avec l'éditeur de code. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.groupConnect = new System.Windows.Forms.GroupBox(); 32 | this.btnConnect = new System.Windows.Forms.Button(); 33 | this.radioCC = new System.Windows.Forms.RadioButton(); 34 | this.radioTM = new System.Windows.Forms.RadioButton(); 35 | this.groupAttach = new System.Windows.Forms.GroupBox(); 36 | this.btnAttach = new System.Windows.Forms.Button(); 37 | this.groupMem = new System.Windows.Forms.GroupBox(); 38 | this.btnSpeed = new System.Windows.Forms.Button(); 39 | this.btnJump = new System.Windows.Forms.Button(); 40 | this.btnReadRand = new System.Windows.Forms.Button(); 41 | this.btnSetRand = new System.Windows.Forms.Button(); 42 | this.groupArray = new System.Windows.Forms.GroupBox(); 43 | this.btnReadArr = new System.Windows.Forms.Button(); 44 | this.btnCrArr = new System.Windows.Forms.Button(); 45 | this.groupConnect.SuspendLayout(); 46 | this.groupAttach.SuspendLayout(); 47 | this.groupMem.SuspendLayout(); 48 | this.groupArray.SuspendLayout(); 49 | this.SuspendLayout(); 50 | // 51 | // groupConnect 52 | // 53 | this.groupConnect.Controls.Add(this.btnConnect); 54 | this.groupConnect.Controls.Add(this.radioCC); 55 | this.groupConnect.Controls.Add(this.radioTM); 56 | this.groupConnect.Location = new System.Drawing.Point(15, 12); 57 | this.groupConnect.Name = "groupConnect"; 58 | this.groupConnect.Size = new System.Drawing.Size(200, 100); 59 | this.groupConnect.TabIndex = 0; 60 | this.groupConnect.TabStop = false; 61 | this.groupConnect.Text = "Connection Panel "; 62 | // 63 | // btnConnect 64 | // 65 | this.btnConnect.Location = new System.Drawing.Point(32, 27); 66 | this.btnConnect.Name = "btnConnect"; 67 | this.btnConnect.Size = new System.Drawing.Size(137, 28); 68 | this.btnConnect.TabIndex = 2; 69 | this.btnConnect.Text = "Connect"; 70 | this.btnConnect.UseVisualStyleBackColor = true; 71 | this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click); 72 | // 73 | // radioCC 74 | // 75 | this.radioCC.AutoSize = true; 76 | this.radioCC.Location = new System.Drawing.Point(113, 64); 77 | this.radioCC.Name = "radioCC"; 78 | this.radioCC.Size = new System.Drawing.Size(56, 17); 79 | this.radioCC.TabIndex = 1; 80 | this.radioCC.Text = "CCAPI\r\n"; 81 | this.radioCC.UseVisualStyleBackColor = true; 82 | this.radioCC.CheckedChanged += new System.EventHandler(this.radioCC_CheckedChanged); 83 | // 84 | // radioTM 85 | // 86 | this.radioTM.AutoSize = true; 87 | this.radioTM.Checked = true; 88 | this.radioTM.Location = new System.Drawing.Point(32, 64); 89 | this.radioTM.Name = "radioTM"; 90 | this.radioTM.Size = new System.Drawing.Size(58, 17); 91 | this.radioTM.TabIndex = 0; 92 | this.radioTM.TabStop = true; 93 | this.radioTM.Text = "TMAPI\r\n"; 94 | this.radioTM.UseVisualStyleBackColor = true; 95 | this.radioTM.CheckedChanged += new System.EventHandler(this.radioTM_CheckedChanged); 96 | // 97 | // groupAttach 98 | // 99 | this.groupAttach.Controls.Add(this.btnAttach); 100 | this.groupAttach.Location = new System.Drawing.Point(231, 12); 101 | this.groupAttach.Name = "groupAttach"; 102 | this.groupAttach.Size = new System.Drawing.Size(200, 100); 103 | this.groupAttach.TabIndex = 1; 104 | this.groupAttach.TabStop = false; 105 | this.groupAttach.Text = "Attach Process"; 106 | // 107 | // btnAttach 108 | // 109 | this.btnAttach.Location = new System.Drawing.Point(32, 27); 110 | this.btnAttach.Name = "btnAttach"; 111 | this.btnAttach.Size = new System.Drawing.Size(137, 54); 112 | this.btnAttach.TabIndex = 3; 113 | this.btnAttach.Text = "Attach Game Process"; 114 | this.btnAttach.UseVisualStyleBackColor = true; 115 | this.btnAttach.Click += new System.EventHandler(this.btnAttach_Click); 116 | // 117 | // groupMem 118 | // 119 | this.groupMem.Controls.Add(this.btnSpeed); 120 | this.groupMem.Controls.Add(this.btnJump); 121 | this.groupMem.Controls.Add(this.btnReadRand); 122 | this.groupMem.Controls.Add(this.btnSetRand); 123 | this.groupMem.Location = new System.Drawing.Point(15, 118); 124 | this.groupMem.Name = "groupMem"; 125 | this.groupMem.Size = new System.Drawing.Size(200, 138); 126 | this.groupMem.TabIndex = 2; 127 | this.groupMem.TabStop = false; 128 | this.groupMem.Text = "Memory"; 129 | // 130 | // btnSpeed 131 | // 132 | this.btnSpeed.Location = new System.Drawing.Point(32, 106); 133 | this.btnSpeed.Name = "btnSpeed"; 134 | this.btnSpeed.Size = new System.Drawing.Size(137, 23); 135 | this.btnSpeed.TabIndex = 3; 136 | this.btnSpeed.Text = "Set MW3 Speed\r\n\r\n"; 137 | this.btnSpeed.UseVisualStyleBackColor = true; 138 | this.btnSpeed.Click += new System.EventHandler(this.btnSpeed_Click); 139 | // 140 | // btnJump 141 | // 142 | this.btnJump.Location = new System.Drawing.Point(32, 77); 143 | this.btnJump.Name = "btnJump"; 144 | this.btnJump.Size = new System.Drawing.Size(137, 23); 145 | this.btnJump.TabIndex = 2; 146 | this.btnJump.Text = "Set MW3 Jump\r\n"; 147 | this.btnJump.UseVisualStyleBackColor = true; 148 | this.btnJump.Click += new System.EventHandler(this.btnJump_Click); 149 | // 150 | // btnReadRand 151 | // 152 | this.btnReadRand.Location = new System.Drawing.Point(32, 48); 153 | this.btnReadRand.Name = "btnReadRand"; 154 | this.btnReadRand.Size = new System.Drawing.Size(137, 23); 155 | this.btnReadRand.TabIndex = 1; 156 | this.btnReadRand.Text = "Read Random"; 157 | this.btnReadRand.UseVisualStyleBackColor = true; 158 | this.btnReadRand.Click += new System.EventHandler(this.btnReadRand_Click); 159 | // 160 | // btnSetRand 161 | // 162 | this.btnSetRand.Location = new System.Drawing.Point(32, 19); 163 | this.btnSetRand.Name = "btnSetRand"; 164 | this.btnSetRand.Size = new System.Drawing.Size(137, 23); 165 | this.btnSetRand.TabIndex = 0; 166 | this.btnSetRand.Text = "Set Random"; 167 | this.btnSetRand.UseVisualStyleBackColor = true; 168 | this.btnSetRand.Click += new System.EventHandler(this.btnSetRand_Click); 169 | // 170 | // groupArray 171 | // 172 | this.groupArray.Controls.Add(this.btnReadArr); 173 | this.groupArray.Controls.Add(this.btnCrArr); 174 | this.groupArray.Location = new System.Drawing.Point(231, 118); 175 | this.groupArray.Name = "groupArray"; 176 | this.groupArray.Size = new System.Drawing.Size(200, 138); 177 | this.groupArray.TabIndex = 3; 178 | this.groupArray.TabStop = false; 179 | this.groupArray.Text = "Create Array"; 180 | // 181 | // btnReadArr 182 | // 183 | this.btnReadArr.Location = new System.Drawing.Point(27, 72); 184 | this.btnReadArr.Name = "btnReadArr"; 185 | this.btnReadArr.Size = new System.Drawing.Size(147, 41); 186 | this.btnReadArr.TabIndex = 1; 187 | this.btnReadArr.Text = "Read from PS3"; 188 | this.btnReadArr.UseVisualStyleBackColor = true; 189 | this.btnReadArr.Click += new System.EventHandler(this.btnReadArr_Click); 190 | // 191 | // btnCrArr 192 | // 193 | this.btnCrArr.Location = new System.Drawing.Point(27, 25); 194 | this.btnCrArr.Name = "btnCrArr"; 195 | this.btnCrArr.Size = new System.Drawing.Size(147, 41); 196 | this.btnCrArr.TabIndex = 0; 197 | this.btnCrArr.Text = "Create + Set to PS3"; 198 | this.btnCrArr.UseVisualStyleBackColor = true; 199 | this.btnCrArr.Click += new System.EventHandler(this.btnCrArr_Click); 200 | // 201 | // Main 202 | // 203 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 204 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 205 | this.ClientSize = new System.Drawing.Size(447, 267); 206 | this.Controls.Add(this.groupArray); 207 | this.Controls.Add(this.groupMem); 208 | this.Controls.Add(this.groupAttach); 209 | this.Controls.Add(this.groupConnect); 210 | this.MaximumSize = new System.Drawing.Size(463, 306); 211 | this.MinimumSize = new System.Drawing.Size(463, 306); 212 | this.Name = "Main"; 213 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 214 | this.Text = "Demo for use PS3API with PS3Lib v4.4 - By iMCSx"; 215 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing); 216 | this.Load += new System.EventHandler(this.Main_Load); 217 | this.groupConnect.ResumeLayout(false); 218 | this.groupConnect.PerformLayout(); 219 | this.groupAttach.ResumeLayout(false); 220 | this.groupMem.ResumeLayout(false); 221 | this.groupArray.ResumeLayout(false); 222 | this.ResumeLayout(false); 223 | 224 | } 225 | 226 | #endregion 227 | 228 | private System.Windows.Forms.GroupBox groupConnect; 229 | private System.Windows.Forms.Button btnConnect; 230 | private System.Windows.Forms.RadioButton radioCC; 231 | private System.Windows.Forms.RadioButton radioTM; 232 | private System.Windows.Forms.GroupBox groupAttach; 233 | private System.Windows.Forms.Button btnAttach; 234 | private System.Windows.Forms.GroupBox groupMem; 235 | private System.Windows.Forms.Button btnSpeed; 236 | private System.Windows.Forms.Button btnJump; 237 | private System.Windows.Forms.Button btnReadRand; 238 | private System.Windows.Forms.Button btnSetRand; 239 | private System.Windows.Forms.GroupBox groupArray; 240 | private System.Windows.Forms.Button btnReadArr; 241 | private System.Windows.Forms.Button btnCrArr; 242 | } 243 | } 244 | 245 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using PS3Lib; 11 | 12 | namespace PS3API_Demo 13 | { 14 | public partial class Main : Form 15 | { 16 | private PS3API PS3 = new PS3API(); 17 | private Random rand = new Random(); 18 | 19 | public Main() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void Main_Load(object sender, EventArgs e) 25 | { 26 | EnableOthersBox(false); 27 | if (PS3.GetCurrentAPI() == SelectAPI.TargetManager) 28 | PS3.PS3TMAPI_NET(); 29 | } 30 | 31 | public void EnableOthersBox(bool active) 32 | { 33 | groupAttach.Enabled = active; 34 | groupMem.Enabled = active; 35 | groupArray.Enabled = active; 36 | } 37 | 38 | private void radioTM_CheckedChanged(object sender, EventArgs e) 39 | { 40 | EnableOthersBox(false); 41 | PS3.ChangeAPI(SelectAPI.TargetManager); 42 | } 43 | 44 | private void radioCC_CheckedChanged(object sender, EventArgs e) 45 | { 46 | EnableOthersBox(false); 47 | PS3.ChangeAPI(SelectAPI.ControlConsole); 48 | } 49 | 50 | private void btnConnect_Click(object sender, EventArgs e) 51 | { 52 | if (PS3.ConnectTarget()) 53 | { 54 | EnableOthersBox(true); 55 | string Message = "You are now connected with this API : " + PS3.GetCurrentAPIName(); 56 | MessageBox.Show(Message, "Connected!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 57 | } 58 | else 59 | { 60 | EnableOthersBox(false); 61 | string Message = "Impossible to connect :/"; 62 | MessageBox.Show(Message, "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error); 63 | } 64 | } 65 | 66 | private void btnAttach_Click(object sender, EventArgs e) 67 | { 68 | if(PS3.AttachProcess()) 69 | MessageBox.Show("Current game is attached successfully.", "Success.", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 70 | else MessageBox.Show("No game process found!", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error); 71 | } 72 | 73 | private void btnSetRand_Click(object sender, EventArgs e) 74 | { 75 | byte[] buffer = new byte[4]; 76 | for (int i = 0; i < 4; i++) 77 | buffer[i] = (byte)rand.Next(0x10, 0x7E); 78 | PS3.SetMemory(0x10045000, buffer); 79 | } 80 | 81 | private void btnReadRand_Click(object sender, EventArgs e) 82 | { 83 | uint randBuff = PS3.Extension.ReadUInt32(0x10045000); 84 | MessageBox.Show("Value in memory is now : " + randBuff.ToString("X8")); 85 | } 86 | 87 | private void btnJump_Click(object sender, EventArgs e) 88 | { 89 | PS3.Extension.WriteFloat(0x000019780, 1000 * 2); 90 | } 91 | 92 | private void btnSpeed_Click(object sender, EventArgs e) 93 | { 94 | PS3.Extension.WriteInt16(0x00173BB0 + 2, 500); 95 | } 96 | 97 | private void btnCrArr_Click(object sender, EventArgs e) 98 | { 99 | byte[] buffer = new byte[0x50]; 100 | ArrayBuilder Build = new ArrayBuilder(buffer); 101 | Build.Write.SetBool(3, true); 102 | Build.Write.SetFloat(4, 1000); 103 | Build.Write.SetInt32(8, 1337); 104 | Build.Write.SetString(20, "iMCSx ArrayBuilder !"); 105 | PS3.SetMemory(0x10060000, buffer); 106 | MessageBox.Show("Done, try to read now !"); 107 | } 108 | 109 | private void btnReadArr_Click(object sender, EventArgs e) 110 | { 111 | byte[] buffer = PS3.Extension.ReadBytes(0x10060000, 0x50); 112 | ArrayBuilder Build = new ArrayBuilder(buffer); 113 | bool var1 = Build.Read.GetBool(3); 114 | float var2 = Build.Read.GetFloat(4); 115 | int var3 = Build.Read.GetInt32(8); 116 | string var4 = Build.Read.GetString(20); 117 | MessageBox.Show("Result from the array sent to memory is :\n\nPosition 3 - Bool - " + var1.ToString() + "\n\nPosition 4 - Float - " + var2.ToString() + "\n\nPosition 8 - Int32 - " + var3.ToString() + "\n\nPosition 20 - String - " + var4); 118 | } 119 | 120 | private void Main_FormClosing(object sender, FormClosingEventArgs e) 121 | { 122 | PS3.DisconnectTarget(); 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Main.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/PS3API-Demo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E8B7EC0F-C467-43CE-9755-2B64851B77F1} 8 | WinExe 9 | Properties 10 | PS3API_Demo 11 | PS3API-Demo 12 | v4.5 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\..\PS3Lib - v4.4\PS3Lib - v4\bin\Release\PS3Lib.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Form 53 | 54 | 55 | Main.cs 56 | 57 | 58 | 59 | 60 | Main.cs 61 | 62 | 63 | ResXFileCodeGenerator 64 | Resources.Designer.cs 65 | Designer 66 | 67 | 68 | True 69 | Resources.resx 70 | 71 | 72 | SettingsSingleFileGenerator 73 | Settings.Designer.cs 74 | 75 | 76 | True 77 | Settings.settings 78 | True 79 | 80 | 81 | 82 | 83 | 84 | 85 | 92 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/PS3Lib/PS3Lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/PS3Lib/PS3Lib.dll -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PS3API_Demo 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// Point d'entrée principal de l'application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Main()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Les informations générales relatives à un assembly dépendent de 6 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations 7 | // associées à un assembly. 8 | [assembly: AssemblyTitle("PS3API-Demo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PS3API-Demo")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 18 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de 19 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM 23 | [assembly: Guid("4ffb7df6-04cc-4c55-89fc-3baef92da587")] 24 | 25 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes : 26 | // 27 | // Version principale 28 | // Version secondaire 29 | // Numéro de build 30 | // Révision 31 | // 32 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 33 | // en utilisant '*', comme indiqué ci-dessous : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.18052 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PS3API_Demo.Properties 12 | { 13 | 14 | 15 | /// 16 | /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. 17 | /// 18 | // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder 19 | // à l'aide d'un outil, tel que ResGen ou Visual Studio. 20 | // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen 21 | // avec l'option /str ou régénérez votre projet VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PS3API_Demo.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Remplace la propriété CurrentUICulture du thread actuel pour toutes 56 | /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18052 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PS3API_Demo.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/bin/Release/PS3API-Demo.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/bin/Release/PS3API-Demo.vshost.exe -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.exe.config 2 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.exe 3 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.pdb 4 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API_Demo.Main.resources 5 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API_Demo.Properties.Resources.resources 6 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.csproj.GenerateResource.Cache 7 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.exe 8 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.pdb 9 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.csprojResolveAssemblyReference.cache 10 | C:\Users\Alienware\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3Lib.dll 11 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.exe.config 12 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.exe 13 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.pdb 14 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.exe 15 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.pdb 16 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3Lib.dll 17 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API_Demo.Main.resources 18 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API_Demo.Properties.Resources.resources 19 | E:\Users\ALIENWARE\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.csproj.GenerateResource.Cache 20 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Debug\PS3API-Demo.exe.config 21 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.exe 22 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Debug\PS3API-Demo.pdb 23 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.exe -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API-Demo.pdb -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API_Demo.Main.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API_Demo.Main.resources -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API_Demo.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/PS3API_Demo.Properties.Resources.resources -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Debug/build.force: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Debug/build.force -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3API-Demo.exe.config 2 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3API-Demo.exe 3 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3API-Demo.pdb 4 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3Lib.dll 5 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3Lib.pdb 6 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\bin\Release\PS3Lib.xml 7 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Release\PS3API_Demo.Main.resources 8 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Release\PS3API_Demo.Properties.Resources.resources 9 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Release\PS3API-Demo.csproj.GenerateResource.Cache 10 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Release\PS3API-Demo.exe 11 | D:\Users\iMCSx\Documents\Visual Studio 2012\Projects\PS3API-Demo\PS3API-Demo\obj\Release\PS3API-Demo.pdb 12 | -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.exe -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API-Demo.pdb -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API_Demo.Main.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API_Demo.Main.resources -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API_Demo.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/PS3API_Demo.Properties.Resources.resources -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FrenchModdingTeam/PS3Lib/c2110c3871c55a1e5de5d28d66ae7622f7790d5b/demo/PS3API-Demo/PS3API-Demo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /src/api/PS3API.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.4 : // 7 | // - Support CCAPI v2.6 C# by iMCSx // 8 | // - Set Boot Console ID // 9 | // - Popup better form with icon // 10 | // - CCAPI Consoles List Popup French/English // 11 | // - CCAPI Get Console Info // 12 | // - CCAPI Get Console List // 13 | // - CCAPI Get Number Of Consoles // 14 | // - Get Console Name TMAPI/CCAPI // 15 | // // 16 | // Credits : FM|T Enstone , Buc-ShoTz // 17 | // // 18 | // Follow me : // 19 | // // 20 | // FrenchModdingTeam.com // 21 | // Youtube.com/iMCSx // 22 | // Twitter.com/iMCSx // 23 | // Facebook.com/iMCSx // 24 | // // 25 | // ************************************************* // 26 | 27 | using PS3Lib.Properties; 28 | using System; 29 | using System.Collections.Generic; 30 | using System.Drawing; 31 | using System.Globalization; 32 | using System.Linq; 33 | using System.Reflection; 34 | using System.Text; 35 | using System.Threading.Tasks; 36 | using System.Windows.Forms; 37 | 38 | namespace PS3Lib 39 | { 40 | public enum Lang 41 | { 42 | Null, 43 | French, 44 | English 45 | } 46 | 47 | public enum SelectAPI 48 | { 49 | ControlConsole, 50 | TargetManager 51 | } 52 | 53 | public class PS3API 54 | { 55 | private static string targetName = String.Empty; 56 | private static string targetIp = String.Empty; 57 | public PS3API(SelectAPI API = SelectAPI.TargetManager) 58 | { 59 | SetAPI.API = API; 60 | MakeInstanceAPI(API); 61 | } 62 | 63 | public void setTargetName(string value) 64 | { 65 | targetName = value; 66 | } 67 | 68 | private void MakeInstanceAPI(SelectAPI API) 69 | { 70 | if (API == SelectAPI.TargetManager) 71 | if (Common.TmApi == null) 72 | Common.TmApi = new TMAPI(); 73 | if (API == SelectAPI.ControlConsole) 74 | if (Common.CcApi == null) 75 | Common.CcApi = new CCAPI(); 76 | } 77 | 78 | private class SetLang 79 | { 80 | public static Lang defaultLang = Lang.Null; 81 | } 82 | 83 | private class SetAPI 84 | { 85 | public static SelectAPI API; 86 | } 87 | 88 | private class Common 89 | { 90 | public static CCAPI CcApi; 91 | public static TMAPI TmApi; 92 | } 93 | 94 | /// Force a language for the console list popup. 95 | public void SetFormLang(Lang Language) 96 | { 97 | SetLang.defaultLang = Language; 98 | } 99 | 100 | /// init again the connection if you use a Thread or a Timer. 101 | public void InitTarget() 102 | { 103 | if (SetAPI.API == SelectAPI.TargetManager) 104 | Common.TmApi.InitComms(); 105 | } 106 | 107 | /// Connect your console with selected API. 108 | public bool ConnectTarget(int target = 0) 109 | { 110 | // We'll check again if the instance has been done, else you'll got an exception error. 111 | MakeInstanceAPI(GetCurrentAPI()); 112 | 113 | bool result = false; 114 | if (SetAPI.API == SelectAPI.TargetManager) 115 | result = Common.TmApi.ConnectTarget(target); 116 | else 117 | result = new ConsoleList(this).Show(); 118 | return result; 119 | } 120 | 121 | /// Connect your console with CCAPI. 122 | public bool ConnectTarget(string ip) 123 | { 124 | // We'll check again if the instance has been done. 125 | MakeInstanceAPI(GetCurrentAPI()); 126 | if (Common.CcApi.SUCCESS(Common.CcApi.ConnectTarget(ip))) 127 | { 128 | targetIp = ip; 129 | return true; 130 | } 131 | else return false; 132 | } 133 | 134 | /// Disconnect Target with selected API. 135 | public void DisconnectTarget() 136 | { 137 | if (SetAPI.API == SelectAPI.TargetManager) 138 | Common.TmApi.DisconnectTarget(); 139 | else Common.CcApi.DisconnectTarget(); 140 | } 141 | 142 | /// Attach the current process (current Game) with selected API. 143 | public bool AttachProcess() 144 | { 145 | // We'll check again if the instance has been done. 146 | MakeInstanceAPI(GetCurrentAPI()); 147 | 148 | bool AttachResult = false; 149 | if (SetAPI.API == SelectAPI.TargetManager) 150 | AttachResult = Common.TmApi.AttachProcess(); 151 | else if (SetAPI.API == SelectAPI.ControlConsole) 152 | AttachResult = Common.CcApi.SUCCESS(Common.CcApi.AttachProcess()); 153 | return AttachResult; 154 | } 155 | 156 | public string GetConsoleName() 157 | { 158 | if (SetAPI.API == SelectAPI.TargetManager) 159 | return Common.TmApi.SCE.GetTargetName(); 160 | else 161 | { 162 | if (targetName != String.Empty) 163 | return targetName; 164 | 165 | if (targetIp != String.Empty) 166 | { 167 | List Data = new List(); 168 | Data = Common.CcApi.GetConsoleList(); 169 | if (Data.Count > 0) 170 | { 171 | for (int i = 0; i < Data.Count; i++) 172 | if (Data[i].Ip == targetIp) 173 | return Data[i].Name; 174 | } 175 | } 176 | return targetIp; 177 | } 178 | } 179 | 180 | /// Set memory to offset with selected API. 181 | public void SetMemory(uint offset, byte[] buffer) 182 | { 183 | if (SetAPI.API == SelectAPI.TargetManager) 184 | Common.TmApi.SetMemory(offset, buffer); 185 | else if (SetAPI.API == SelectAPI.ControlConsole) 186 | Common.CcApi.SetMemory(offset, buffer); 187 | } 188 | 189 | /// Get memory from offset using the Selected API. 190 | public void GetMemory(uint offset, byte[] buffer) 191 | { 192 | if (SetAPI.API == SelectAPI.TargetManager) 193 | Common.TmApi.GetMemory(offset, buffer); 194 | else if (SetAPI.API == SelectAPI.ControlConsole) 195 | Common.CcApi.GetMemory(offset, buffer); 196 | } 197 | 198 | /// Get memory from offset with a length using the Selected API. 199 | public byte[] GetBytes(uint offset, int length) 200 | { 201 | byte[] buffer = new byte[length]; 202 | if (SetAPI.API == SelectAPI.TargetManager) 203 | Common.TmApi.GetMemory(offset, buffer); 204 | else if (SetAPI.API == SelectAPI.ControlConsole) 205 | Common.CcApi.GetMemory(offset, buffer); 206 | return buffer; 207 | } 208 | 209 | /// Change current API. 210 | public void ChangeAPI(SelectAPI API) 211 | { 212 | SetAPI.API = API; 213 | MakeInstanceAPI(GetCurrentAPI()); 214 | } 215 | 216 | /// Return selected API. 217 | public SelectAPI GetCurrentAPI() 218 | { 219 | return SetAPI.API; 220 | } 221 | 222 | /// Return selected API into string format. 223 | public string GetCurrentAPIName() 224 | { 225 | string output = String.Empty; 226 | if (SetAPI.API == SelectAPI.TargetManager) 227 | output = Enum.GetName(typeof(SelectAPI), SelectAPI.TargetManager).Replace("Manager"," Manager"); 228 | else output = Enum.GetName(typeof(SelectAPI), SelectAPI.ControlConsole).Replace("Console", " Console"); 229 | return output; 230 | } 231 | 232 | /// This will find the dll ps3tmapi_net.dll for TMAPI. 233 | public Assembly PS3TMAPI_NET() 234 | { 235 | return Common.TmApi.PS3TMAPI_NET(); 236 | } 237 | 238 | /// Use the extension class with your selected API. 239 | public Extension Extension 240 | { 241 | get { return new Extension(SetAPI.API); } 242 | } 243 | 244 | /// Access to all TMAPI functions. 245 | public TMAPI TMAPI 246 | { 247 | get { return new TMAPI(); } 248 | } 249 | 250 | /// Access to all CCAPI functions. 251 | public CCAPI CCAPI 252 | { 253 | get { return new CCAPI(); } 254 | } 255 | 256 | public class ConsoleList 257 | { 258 | private PS3API Api; 259 | private List data; 260 | 261 | public ConsoleList(PS3API f) 262 | { 263 | Api = f; 264 | data = Api.CCAPI.GetConsoleList(); 265 | } 266 | 267 | /// Return the systeme language, if it's others all text will be in english. 268 | private Lang getSysLanguage() 269 | { 270 | if (SetLang.defaultLang == Lang.Null) 271 | { 272 | if (CultureInfo.CurrentCulture.ThreeLetterWindowsLanguageName.StartsWith("FRA")) 273 | return Lang.French; 274 | else return Lang.English; 275 | } 276 | else return SetLang.defaultLang; 277 | } 278 | 279 | private string strTraduction(string keyword) 280 | { 281 | if (getSysLanguage() == Lang.French) 282 | { 283 | switch (keyword) 284 | { 285 | case "btnConnect": return "Connexion"; 286 | case "btnRefresh": return "Rafraîchir"; 287 | case "errorSelect": return "Vous devez d'abord sélectionner une console."; 288 | case "errorSelectTitle": return "Sélectionnez une console."; 289 | case "selectGrid": return "Sélectionnez une console dans la grille."; 290 | case "selectedLbl": return "Sélection :"; 291 | case "formTitle": return "Choisissez une console..."; 292 | case "noConsole": return "Aucune console disponible, démarrez CCAPI Manager (v2.5) et ajoutez une nouvelle console."; 293 | case "noConsoleTitle": return "Aucune console disponible."; 294 | } 295 | } 296 | else 297 | { 298 | switch (keyword) 299 | { 300 | case "btnConnect": return "Connection"; 301 | case "btnRefresh": return "Refresh"; 302 | case "errorSelect": return "You need to select a console first."; 303 | case "errorSelectTitle": return "Select a console."; 304 | case "selectGrid": return "Select a console within this grid."; 305 | case "selectedLbl": return "Selected :"; 306 | case "formTitle": return "Select a console..."; 307 | case "noConsole": return "None consoles available, run CCAPI Manager (v2.5) and add a new console."; 308 | case "noConsoleTitle": return "None console available."; 309 | } 310 | } 311 | return "?"; 312 | } 313 | 314 | public bool Show() 315 | { 316 | bool Result = false; 317 | int tNum = -1; 318 | 319 | // Instance of widgets 320 | Label lblInfo = new Label(); 321 | Button btnConnect = new Button(); 322 | Button btnRefresh = new Button(); 323 | ListViewGroup listViewGroup = new ListViewGroup("Consoles", HorizontalAlignment.Left); 324 | ListView listView = new ListView(); 325 | Form formList = new Form(); 326 | 327 | // Create our button connect 328 | btnConnect.Location = new Point(12, 254); 329 | btnConnect.Name = "btnConnect"; 330 | btnConnect.Size = new Size(198, 23); 331 | btnConnect.TabIndex = 1; 332 | btnConnect.Text = strTraduction("btnConnect"); 333 | btnConnect.UseVisualStyleBackColor = true; 334 | btnConnect.Enabled = false; 335 | btnConnect.Click += (sender, e) => 336 | { 337 | if(tNum > -1) 338 | { 339 | if (Api.ConnectTarget(data[tNum].Ip)) 340 | { 341 | Api.setTargetName(data[tNum].Name); 342 | Result = true; 343 | } 344 | else Result = false; 345 | formList.Close(); 346 | } 347 | else 348 | MessageBox.Show(strTraduction("errorSelect"), strTraduction("errorSelectTitle"), MessageBoxButtons.OK, MessageBoxIcon.Error); 349 | }; 350 | 351 | // Create our button refresh 352 | btnRefresh.Location = new Point(216, 254); 353 | btnRefresh.Name = "btnRefresh"; 354 | btnRefresh.Size = new Size(86, 23); 355 | btnRefresh.TabIndex = 1; 356 | btnRefresh.Text = strTraduction("btnRefresh"); 357 | btnRefresh.UseVisualStyleBackColor = true; 358 | btnRefresh.Click += (sender, e) => 359 | { 360 | tNum = -1; 361 | listView.Clear(); 362 | lblInfo.Text = strTraduction("selectGrid"); 363 | btnConnect.Enabled = false; 364 | data = Api.CCAPI.GetConsoleList(); 365 | int sizeD = data.Count(); 366 | for (int i = 0; i < sizeD; i++) 367 | { 368 | ListViewItem item = new ListViewItem(" " + data[i].Name + " - " + data[i].Ip); 369 | item.ImageIndex = 0; 370 | listView.Items.Add(item); 371 | } 372 | }; 373 | 374 | // Create our list view 375 | listView.Font = new Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 376 | listViewGroup.Header = "Consoles"; 377 | listViewGroup.Name = "consoleGroup"; 378 | listView.Groups.AddRange(new ListViewGroup[] {listViewGroup}); 379 | listView.HideSelection = false; 380 | listView.Location = new Point(12, 12); 381 | listView.MultiSelect = false; 382 | listView.Name = "ConsoleList"; 383 | listView.ShowGroups = false; 384 | listView.Size = new Size(290, 215); 385 | listView.TabIndex = 0; 386 | listView.UseCompatibleStateImageBehavior = false; 387 | listView.View = View.List; 388 | listView.ItemSelectionChanged += (sender, e) => 389 | { 390 | tNum = e.ItemIndex; 391 | btnConnect.Enabled = true; 392 | string Name, Ip = "?"; 393 | if (data[tNum].Name.Length > 18) 394 | Name = data[tNum].Name.Substring(0, 17) + "..."; 395 | else Name = data[tNum].Name; 396 | if (data[tNum].Ip.Length > 16) 397 | Ip = data[tNum].Name.Substring(0, 16) + "..."; 398 | else Ip = data[tNum].Ip; 399 | lblInfo.Text = strTraduction("selectedLbl") + " " + Name + " / " + Ip; 400 | }; 401 | 402 | // Create our label 403 | lblInfo.AutoSize = true; 404 | lblInfo.Location = new Point(12, 234); 405 | lblInfo.Name = "lblInfo"; 406 | lblInfo.Size = new Size(158, 13); 407 | lblInfo.TabIndex = 3; 408 | lblInfo.Text = strTraduction("selectGrid"); 409 | 410 | // Create our form 411 | formList.MinimizeBox = false; 412 | formList.MaximizeBox = false; 413 | formList.ClientSize = new Size(314, 285); 414 | formList.AutoScaleDimensions = new SizeF(6F, 13F); 415 | formList.AutoScaleMode = AutoScaleMode.Font; 416 | formList.FormBorderStyle = FormBorderStyle.FixedSingle; 417 | formList.StartPosition = FormStartPosition.CenterScreen; 418 | formList.Text = strTraduction("formTitle"); 419 | formList.Controls.Add(listView); 420 | formList.Controls.Add(lblInfo); 421 | formList.Controls.Add(btnConnect); 422 | formList.Controls.Add(btnRefresh); 423 | 424 | // Start to update our list 425 | ImageList imgL = new ImageList(); 426 | imgL.Images.Add(Resources.ps3); 427 | listView.SmallImageList = imgL; 428 | int sizeData = data.Count(); 429 | 430 | for (int i = 0; i < sizeData; i++) 431 | { 432 | ListViewItem item = new ListViewItem(" " + data[i].Name + " - " + data[i].Ip); 433 | item.ImageIndex = 0; 434 | listView.Items.Add(item); 435 | } 436 | 437 | // If there are more than 0 targets we show the form 438 | // Else we inform the user to create a console. 439 | if (sizeData > 0) 440 | formList.ShowDialog(); 441 | else 442 | { 443 | Result = false; 444 | formList.Close(); 445 | MessageBox.Show(strTraduction("noConsole"), strTraduction("noConsoleTitle"), MessageBoxButtons.OK, MessageBoxIcon.Error); 446 | } 447 | 448 | return Result; 449 | } 450 | } 451 | } 452 | } 453 | -------------------------------------------------------------------------------- /src/api/TMAPI.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.4 : // 7 | // - Support CCAPI v2.6 C# by iMCSx // 8 | // - Set Boot Console ID // 9 | // - Popup better form with icon // 10 | // - CCAPI Consoles List Popup French/English // 11 | // - CCAPI Get Console Info // 12 | // - CCAPI Get Console List // 13 | // - CCAPI Get Number Of Consoles // 14 | // - Get Console Name TMAPI/CCAPI // 15 | // // 16 | // Credits : FM|T Enstone , Buc-ShoTz // 17 | // // 18 | // Follow me : // 19 | // // 20 | // FrenchModdingTeam.com // 21 | // Youtube.com/iMCSx // 22 | // Twitter.com/iMCSx // 23 | // Facebook.com/iMCSx // 24 | // // 25 | // ************************************************* // 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Globalization; 30 | using System.IO; 31 | using System.Linq; 32 | using System.Reflection; 33 | using System.Text; 34 | using System.Windows.Forms; 35 | using System.Xml; 36 | 37 | using PS3Lib.NET; 38 | 39 | namespace PS3Lib 40 | { 41 | public class TMAPI 42 | { 43 | public static int Target = 0xFF; 44 | public static bool AssemblyLoaded = true; 45 | public static PS3TMAPI.ResetParameter resetParameter; 46 | 47 | public TMAPI() 48 | { 49 | 50 | } 51 | 52 | public Extension Extension 53 | { 54 | get { return new Extension(SelectAPI.TargetManager); } 55 | } 56 | 57 | public class SCECMD 58 | { 59 | /// Get the target status and return the string value. 60 | public string SNRESULT() 61 | { 62 | return Parameters.snresult; 63 | } 64 | 65 | /// Get the target name. 66 | public string GetTargetName() 67 | { 68 | if (Parameters.ConsoleName == null || Parameters.ConsoleName == String.Empty) 69 | { 70 | PS3TMAPI.InitTargetComms(); 71 | PS3TMAPI.TargetInfo TargetInfo = new PS3TMAPI.TargetInfo(); 72 | TargetInfo.Flags = PS3TMAPI.TargetInfoFlag.TargetID; 73 | TargetInfo.Target = TMAPI.Target; 74 | PS3TMAPI.GetTargetInfo(ref TargetInfo); 75 | Parameters.ConsoleName = TargetInfo.Name; 76 | } 77 | return Parameters.ConsoleName; 78 | } 79 | 80 | /// Get the target status and return the string value. 81 | public string GetStatus() 82 | { 83 | if (TMAPI.AssemblyLoaded) 84 | return "NotConnected"; 85 | Parameters.connectStatus = new PS3TMAPI.ConnectStatus(); 86 | PS3TMAPI.GetConnectStatus(Target, out Parameters.connectStatus, out Parameters.usage); 87 | Parameters.Status = Parameters.connectStatus.ToString(); 88 | return Parameters.Status; 89 | } 90 | 91 | /// Get the ProcessID by the current process. 92 | public uint ProcessID() 93 | { 94 | return Parameters.ProcessID; 95 | } 96 | 97 | /// Get an array of processID's. 98 | public uint[] ProcessIDs() 99 | { 100 | return Parameters.processIDs; 101 | } 102 | 103 | /// Get some details from your target. 104 | public PS3TMAPI.ConnectStatus DetailStatus() 105 | { 106 | return Parameters.connectStatus; 107 | } 108 | } 109 | 110 | public SCECMD SCE 111 | { 112 | get { return new SCECMD(); } 113 | } 114 | 115 | public class Parameters 116 | { 117 | public static string 118 | usage, 119 | info, 120 | snresult, 121 | Status, 122 | MemStatus, 123 | ConsoleName; 124 | public static uint 125 | ProcessID; 126 | public static uint[] 127 | processIDs; 128 | public static byte[] 129 | Retour; 130 | public static PS3TMAPI.ConnectStatus 131 | connectStatus; 132 | } 133 | 134 | /// Enum of flag reset. 135 | public enum ResetTarget 136 | { 137 | Hard, 138 | Quick, 139 | ResetEx, 140 | Soft 141 | } 142 | 143 | public void InitComms() 144 | { 145 | PS3TMAPI.InitTargetComms(); 146 | } 147 | 148 | /// Connect the default target and initialize the dll. Possible to put an int as arugment for determine which target to connect. 149 | public bool ConnectTarget(int TargetIndex = 0) 150 | { 151 | bool result = false; 152 | if(AssemblyLoaded) 153 | PS3TMAPI_NET(); 154 | AssemblyLoaded = false; 155 | Target = TargetIndex; 156 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.InitTargetComms()); 157 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.Connect(TargetIndex, null)); 158 | return result; 159 | } 160 | 161 | /// Connect the target by is name. 162 | public bool ConnectTarget(string TargetName) 163 | { 164 | bool result = false; 165 | if (AssemblyLoaded) 166 | PS3TMAPI_NET(); 167 | AssemblyLoaded = false; 168 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.InitTargetComms()); 169 | if (result) 170 | { 171 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.GetTargetFromName(TargetName, out Target)); 172 | result = PS3TMAPI.SUCCEEDED(PS3TMAPI.Connect(Target, null)); 173 | } 174 | return result; 175 | } 176 | 177 | /// Disconnect the target. 178 | public void DisconnectTarget() 179 | { 180 | PS3TMAPI.Disconnect(Target); 181 | } 182 | 183 | /// Power on selected target. 184 | public void PowerOn(int numTarget = 0) 185 | { 186 | if (Target != 0xFF) 187 | numTarget = Target; 188 | PS3TMAPI.PowerOn(numTarget); 189 | } 190 | 191 | /// Power off selected target. 192 | public void PowerOff(bool Force) 193 | { 194 | PS3TMAPI.PowerOff(Target, Force); 195 | } 196 | 197 | /// Attach and continue the current process from the target. 198 | public bool AttachProcess() 199 | { 200 | bool isOK = false; 201 | PS3TMAPI.GetProcessList(Target, out Parameters.processIDs); 202 | if (Parameters.processIDs.Length > 0) 203 | isOK = true; 204 | else isOK = false; 205 | if (isOK) 206 | { 207 | ulong uProcess = Parameters.processIDs[0]; 208 | Parameters.ProcessID = Convert.ToUInt32(uProcess); 209 | PS3TMAPI.ProcessAttach(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID); 210 | PS3TMAPI.ProcessContinue(Target, Parameters.ProcessID); 211 | Parameters.info = "The Process 0x" + Parameters.ProcessID.ToString("X8") + " Has Been Attached !"; 212 | } 213 | return isOK; 214 | } 215 | 216 | /// Set memory to the target (byte[]). 217 | public void SetMemory(uint Address, byte[] Bytes) 218 | { 219 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, Bytes); 220 | } 221 | 222 | /// Set memory to the address (byte[]). 223 | public void SetMemory(uint Address, ulong value) 224 | { 225 | byte[] b = BitConverter.GetBytes(value); 226 | Array.Reverse(b); 227 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, b); 228 | } 229 | 230 | /// Set memory with value as string hexadecimal to the address (string). 231 | public void SetMemory(uint Address, string hexadecimal, EndianType Type = EndianType.BigEndian) 232 | { 233 | byte[] Entry = StringToByteArray(hexadecimal); 234 | if (Type == EndianType.LittleEndian) 235 | Array.Reverse(Entry); 236 | PS3TMAPI.ProcessSetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, Entry); 237 | } 238 | 239 | /// Get memory from the address. 240 | public void GetMemory(uint Address, byte[] Bytes) 241 | { 242 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Bytes); 243 | } 244 | 245 | /// Get a bytes array with the length input. 246 | public byte[] GetBytes(uint Address, uint lengthByte) 247 | { 248 | byte[] Longueur = new byte[lengthByte]; 249 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Longueur); 250 | return Longueur; 251 | } 252 | 253 | /// Get a string with the length input. 254 | public string GetString(uint Address, uint lengthString) 255 | { 256 | byte[] Longueur = new byte[lengthString]; 257 | PS3TMAPI.ProcessGetMemory(Target, PS3TMAPI.UnitType.PPU, Parameters.ProcessID, 0, Address, ref Longueur); 258 | string StringResult = Hex2Ascii(ReplaceString(Longueur)); 259 | return StringResult; 260 | } 261 | 262 | internal static string Hex2Ascii(string iMCSxString) 263 | { 264 | StringBuilder builder = new StringBuilder(); 265 | for (int i = 0; i <= (iMCSxString.Length - 2); i += 2) 266 | { 267 | builder.Append(Convert.ToString(Convert.ToChar(int.Parse(iMCSxString.Substring(i, 2), NumberStyles.HexNumber)))); 268 | } 269 | return builder.ToString(); 270 | } 271 | 272 | internal static byte[] StringToByteArray(string hex) 273 | { 274 | string replace = hex.Replace("0x", ""); 275 | string Stringz = replace.Insert(replace.Length - 1, "0"); 276 | 277 | int Odd = replace.Length; 278 | bool Nombre; 279 | if (Odd % 2 == 0) 280 | Nombre = true; 281 | else 282 | Nombre = false; 283 | try 284 | { 285 | if (Nombre == true) 286 | { 287 | return Enumerable.Range(0, replace.Length) 288 | .Where(x => x % 2 == 0) 289 | .Select(x => Convert.ToByte(replace.Substring(x, 2), 16)) 290 | .ToArray(); 291 | } 292 | else 293 | { 294 | return Enumerable.Range(0, replace.Length) 295 | .Where(x => x % 2 == 0) 296 | .Select(x => Convert.ToByte(Stringz.Substring(x, 2), 16)) 297 | .ToArray(); 298 | } 299 | } 300 | catch { throw new System.ArgumentException("Value not possible.", "Byte Array"); } 301 | } 302 | 303 | internal static string ReplaceString(byte[] bytes) 304 | { 305 | string PSNString = BitConverter.ToString(bytes); 306 | PSNString = PSNString.Replace("00", string.Empty); 307 | PSNString = PSNString.Replace("-", string.Empty); 308 | for(int i = 0; i < 10; i++) 309 | PSNString = PSNString.Replace("^" + i.ToString(), string.Empty); 310 | return PSNString; 311 | } 312 | 313 | /// Reset target to XMB , Sometimes the target restart quickly. 314 | public void ResetToXMB(ResetTarget flag) 315 | { 316 | if (flag == ResetTarget.Hard) 317 | resetParameter = PS3TMAPI.ResetParameter.Hard; 318 | else if (flag == ResetTarget.Quick) 319 | resetParameter = PS3TMAPI.ResetParameter.Quick; 320 | else if (flag == ResetTarget.ResetEx) 321 | resetParameter = PS3TMAPI.ResetParameter.ResetEx; 322 | else if (flag == ResetTarget.Soft) 323 | resetParameter = PS3TMAPI.ResetParameter.Soft; 324 | PS3TMAPI.Reset(Target, resetParameter); 325 | } 326 | 327 | internal static Assembly LoadApi; 328 | ///Load the PS3 API for use with your Application .NET. 329 | public Assembly PS3TMAPI_NET() 330 | { 331 | AppDomain.CurrentDomain.AssemblyResolve += (s, e) => 332 | { 333 | var filename = new AssemblyName(e.Name).Name; 334 | var x = string.Format(@"C:\Program Files\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 335 | var x64 = string.Format(@"C:\Program Files (x64)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 336 | var x86 = string.Format(@"C:\Program Files (x86)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename); 337 | if (System.IO.File.Exists(x)) 338 | LoadApi = Assembly.LoadFile(x); 339 | else 340 | { 341 | if (System.IO.File.Exists(x64)) 342 | LoadApi = Assembly.LoadFile(x64); 343 | 344 | else 345 | { 346 | if (System.IO.File.Exists(x86)) 347 | LoadApi = Assembly.LoadFile(x86); 348 | else 349 | { 350 | MessageBox.Show("Target Manager API cannot be founded to:\r\n\r\n" + x86, "Error with PS3 API!", MessageBoxButtons.OK, MessageBoxIcon.Error); 351 | } 352 | } 353 | } 354 | return LoadApi; 355 | }; 356 | return LoadApi; 357 | } 358 | } 359 | } 360 | -------------------------------------------------------------------------------- /src/extra/ArrayBuilder.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.4 : // 7 | // - Support CCAPI v2.6 C# by iMCSx // 8 | // - Set Boot Console ID // 9 | // - Popup better form with icon // 10 | // - CCAPI Consoles List Popup French/English // 11 | // - CCAPI Get Console Info // 12 | // - CCAPI Get Console List // 13 | // - CCAPI Get Number Of Consoles // 14 | // - Get Console Name TMAPI/CCAPI // 15 | // // 16 | // Credits : FM|T Enstone , Buc-ShoTz // 17 | // // 18 | // Follow me : // 19 | // // 20 | // FrenchModdingTeam.com // 21 | // Youtube.com/iMCSx // 22 | // Twitter.com/iMCSx // 23 | // Facebook.com/iMCSx // 24 | // // 25 | // ************************************************* // 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Linq; 30 | using System.Text; 31 | using System.Threading.Tasks; 32 | 33 | namespace PS3Lib 34 | { 35 | public enum EndianType 36 | { 37 | LittleEndian, 38 | BigEndian 39 | } 40 | 41 | public class ArrayBuilder 42 | { 43 | private byte[] buffer; 44 | private int size; 45 | 46 | public ArrayBuilder(byte[] BytesArray) 47 | { 48 | buffer = BytesArray; 49 | size = buffer.Length; 50 | } 51 | 52 | /// Enter into all functions "Reader". 53 | public ArrayReader Read 54 | { 55 | get { return new ArrayReader(buffer); } 56 | } 57 | 58 | /// Enter into all functions "Writer". 59 | public ArrayWriter Write 60 | { 61 | get { return new ArrayWriter(buffer); } 62 | } 63 | 64 | public class ArrayReader 65 | { 66 | private byte[] buffer; 67 | private int size; 68 | 69 | public ArrayReader(byte[] BytesArray) 70 | { 71 | buffer = BytesArray; 72 | size = buffer.Length; 73 | } 74 | 75 | sbyte GetSByte(int pos) 76 | { 77 | return (sbyte)buffer[pos]; 78 | } 79 | 80 | public byte GetByte(int pos) 81 | { 82 | return buffer[pos]; 83 | } 84 | 85 | public char GetChar(int pos) 86 | { 87 | string s = buffer[pos].ToString(); 88 | char b = s[0]; 89 | return b; 90 | } 91 | 92 | public bool GetBool(int pos) 93 | { 94 | return buffer[pos] != 0; 95 | } 96 | 97 | public short GetInt16(int pos, EndianType Type = EndianType.BigEndian) 98 | { 99 | byte[] b = new byte[2]; 100 | for(int i = 0; i < 2; i++) 101 | b[i] = buffer[pos + i]; 102 | if (Type == EndianType.BigEndian) 103 | Array.Reverse(b, 0, 2); 104 | return BitConverter.ToInt16(b, 0); 105 | } 106 | 107 | public int GetInt32(int pos, EndianType Type = EndianType.BigEndian) 108 | { 109 | byte[] b = new byte[4]; 110 | for (int i = 0; i < 4; i++) 111 | b[i] = buffer[pos + i]; 112 | if (Type == EndianType.BigEndian) 113 | Array.Reverse(b, 0, 4); 114 | return BitConverter.ToInt32(b, 0); 115 | } 116 | 117 | public long GetInt64(int pos, EndianType Type = EndianType.BigEndian) 118 | { 119 | byte[] b = new byte[8]; 120 | for (int i = 0; i < 8; i++) 121 | b[i] = buffer[pos + i]; 122 | if (Type == EndianType.BigEndian) 123 | Array.Reverse(b, 0, 8); 124 | return BitConverter.ToInt64(b, 0); 125 | } 126 | 127 | public ushort GetUInt16(int pos, EndianType Type = EndianType.BigEndian) 128 | { 129 | byte[] b = new byte[2]; 130 | for (int i = 0; i < 2; i++) 131 | b[i] = buffer[pos + i]; 132 | if (Type == EndianType.BigEndian) 133 | Array.Reverse(b, 0, 2); 134 | return BitConverter.ToUInt16(b, 0); 135 | } 136 | 137 | public uint GetUInt32(int pos, EndianType Type = EndianType.BigEndian) 138 | { 139 | byte[] b = new byte[4]; 140 | for (int i = 0; i < 4; i++) 141 | b[i] = buffer[pos + i]; 142 | if (Type == EndianType.BigEndian) 143 | Array.Reverse(b, 0, 4); 144 | return BitConverter.ToUInt32(b, 0); 145 | } 146 | 147 | public ulong GetUInt64(int pos, EndianType Type = EndianType.BigEndian) 148 | { 149 | byte[] b = new byte[8]; 150 | for (int i = 0; i < 8; i++) 151 | b[i] = buffer[pos + i]; 152 | if (Type == EndianType.BigEndian) 153 | Array.Reverse(b, 0, 8); 154 | return BitConverter.ToUInt64(b, 0); 155 | } 156 | 157 | public byte[] GetBytes(int pos, int length) 158 | { 159 | byte[] b = new byte[length]; 160 | for (int i = 0; i < length; i++) 161 | b[i] = buffer[pos + i]; 162 | return b; 163 | } 164 | 165 | public string GetString(int pos) 166 | { 167 | int strlen = 0; 168 | while (true) 169 | if (buffer[pos + strlen] != (byte)0) 170 | strlen++; 171 | else break; 172 | byte[] b = new byte[strlen]; 173 | for (int i = 0; i < strlen; i++) 174 | b[i] = buffer[pos+i]; 175 | return Encoding.UTF8.GetString(b); 176 | } 177 | 178 | public float GetFloat(int pos) 179 | { 180 | byte[] b = new byte[4]; 181 | for (int i = 0; i < 4; i++) 182 | b[i] = buffer[pos+i]; 183 | Array.Reverse(b, 0, 4); 184 | return BitConverter.ToSingle(b, 0); 185 | } 186 | } 187 | 188 | public class ArrayWriter 189 | { 190 | private byte[] buffer; 191 | private int size; 192 | 193 | public ArrayWriter(byte[] BytesArray) 194 | { 195 | buffer = BytesArray; 196 | size = buffer.Length; 197 | } 198 | 199 | public void SetSByte(int pos, sbyte value) 200 | { 201 | buffer[0 + pos] = (byte)value; 202 | } 203 | 204 | public void SetByte(int pos, byte value) 205 | { 206 | buffer[0 + pos] = value; 207 | } 208 | 209 | public void SetChar(int pos, char value) 210 | { 211 | byte[] b = Encoding.UTF8.GetBytes(value.ToString()); 212 | buffer[0 + pos] = b[0]; 213 | } 214 | 215 | public void SetBool(int pos, bool value) 216 | { 217 | byte[] b = new byte[1]; 218 | b[0] = value ? (byte)1 : (byte)0; 219 | buffer[pos] = b[0]; 220 | } 221 | 222 | public void SetInt16(int pos, short value, EndianType Type = EndianType.BigEndian) 223 | { 224 | byte[] b = BitConverter.GetBytes(value); 225 | if (Type == EndianType.BigEndian) 226 | Array.Reverse(b, 0, 2); 227 | for (int i = 0; i < 2; i++) 228 | buffer[i + pos] = b[i]; 229 | } 230 | 231 | public void SetInt32(int pos, int value, EndianType Type = EndianType.BigEndian) 232 | { 233 | byte[] b = BitConverter.GetBytes(value); 234 | if (Type == EndianType.BigEndian) 235 | Array.Reverse(b, 0, 4); 236 | for (int i = 0; i < 4; i++) 237 | buffer[i + pos] = b[i]; 238 | } 239 | 240 | public void SetInt64(int pos, long value, EndianType Type = EndianType.BigEndian) 241 | { 242 | byte[] b = BitConverter.GetBytes(value); 243 | if (Type == EndianType.BigEndian) 244 | Array.Reverse(b, 0, 8); 245 | for (int i = 0; i < 8; i++) 246 | buffer[i + pos] = b[i]; 247 | } 248 | 249 | public void SetUInt16(int pos, ushort value, EndianType Type = EndianType.BigEndian) 250 | { 251 | byte[] b = BitConverter.GetBytes(value); 252 | if (Type == EndianType.BigEndian) 253 | Array.Reverse(b, 0, 2); 254 | for (int i = 0; i < 2; i++) 255 | buffer[i + pos] = b[i]; 256 | } 257 | 258 | public void SetUInt32(int pos, uint value, EndianType Type = EndianType.BigEndian) 259 | { 260 | byte[] b = BitConverter.GetBytes(value); 261 | if (Type == EndianType.BigEndian) 262 | Array.Reverse(b, 0, 4); 263 | for (int i = 0; i < 4; i++) 264 | buffer[i + pos] = b[i]; 265 | } 266 | 267 | public void SetUInt64(int pos, ulong value, EndianType Type = EndianType.BigEndian) 268 | { 269 | byte[] b = BitConverter.GetBytes(value); 270 | if (Type == EndianType.BigEndian) 271 | Array.Reverse(b, 0, 8); 272 | for (int i = 0; i < 8; i++) 273 | buffer[i + pos] = b[i]; 274 | } 275 | 276 | public void SetBytes(int pos, byte[] value) 277 | { 278 | int valueSize = value.Length; 279 | for (int i = 0; i < valueSize; i++) 280 | buffer[i + pos] = value[i]; 281 | } 282 | 283 | public void SetString(int pos, string value) 284 | { 285 | byte[] b = Encoding.UTF8.GetBytes(value+"\0"); 286 | for (int i = 0; i < b.Length; i++) 287 | buffer[i + pos] = b[i]; 288 | } 289 | 290 | public void SetFloat(int pos, float value) 291 | { 292 | byte[] b = BitConverter.GetBytes(value); 293 | Array.Reverse(b, 0, 4); 294 | for (int i = 0; i < 4; i++) 295 | buffer[i + pos] = b[i]; 296 | } 297 | } 298 | } 299 | } 300 | -------------------------------------------------------------------------------- /src/extra/Extensions.cs: -------------------------------------------------------------------------------- 1 | // ************************************************* // 2 | // --- Copyright (c) 2014 iMCS Productions --- // 3 | // ************************************************* // 4 | // PS3Lib v4 By FM|T iMCSx // 5 | // // 6 | // Features v4.4 : // 7 | // - Support CCAPI v2.6 C# by iMCSx // 8 | // - Set Boot Console ID // 9 | // - Popup better form with icon // 10 | // - CCAPI Consoles List Popup French/English // 11 | // - CCAPI Get Console Info // 12 | // - CCAPI Get Console List // 13 | // - CCAPI Get Number Of Consoles // 14 | // - Get Console Name TMAPI/CCAPI // 15 | // // 16 | // Credits : FM|T Enstone , Buc-ShoTz // 17 | // // 18 | // Follow me : // 19 | // // 20 | // FrenchModdingTeam.com // 21 | // Youtube.com/iMCSx // 22 | // Twitter.com/iMCSx // 23 | // Facebook.com/iMCSx // 24 | // // 25 | // ************************************************* // 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Linq; 30 | using System.Text; 31 | 32 | namespace PS3Lib 33 | { 34 | public class Extension 35 | { 36 | private SelectAPI CurrentAPI; 37 | public Extension(SelectAPI API) 38 | { 39 | CurrentAPI = API; 40 | if (API == SelectAPI.TargetManager) 41 | if (Common.TmApi == null) 42 | Common.TmApi = new TMAPI(); 43 | if (API == SelectAPI.ControlConsole) 44 | if (Common.CcApi == null) 45 | Common.CcApi = new CCAPI(); 46 | } 47 | 48 | /// Read a signed byte. 49 | public sbyte ReadSByte(uint offset) 50 | { 51 | byte[] buffer = new byte[1]; 52 | GetMem(offset, buffer, CurrentAPI); 53 | return (sbyte)buffer[0]; 54 | } 55 | 56 | /// Read a byte a check if his value. This return a bool according the byte detected. 57 | public bool ReadBool(uint offset) 58 | { 59 | byte[] buffer = new byte[1]; 60 | GetMem(offset, buffer, CurrentAPI); 61 | return buffer[0] != 0; 62 | } 63 | 64 | /// Read and return an integer 16 bits. 65 | public short ReadInt16(uint offset) 66 | { 67 | byte[] buffer = GetBytes(offset, 2, CurrentAPI); 68 | Array.Reverse(buffer, 0, 2); 69 | return BitConverter.ToInt16(buffer, 0); 70 | } 71 | 72 | /// Read and return an integer 32 bits. 73 | public int ReadInt32(uint offset) 74 | { 75 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 76 | Array.Reverse(buffer, 0, 4); 77 | return BitConverter.ToInt32(buffer, 0); 78 | } 79 | 80 | /// Read and return an integer 64 bits. 81 | public long ReadInt64(uint offset) 82 | { 83 | byte[] buffer = GetBytes(offset, 8, CurrentAPI); 84 | Array.Reverse(buffer, 0, 8); 85 | return BitConverter.ToInt64(buffer, 0); 86 | } 87 | 88 | /// Read and return a byte. 89 | public byte ReadByte(uint offset) 90 | { 91 | byte[] buffer = GetBytes(offset, 1, CurrentAPI); 92 | return buffer[0]; 93 | } 94 | 95 | /// Read a string with a length to the first byte equal to an value null (0x00). 96 | public byte[] ReadBytes(uint offset, int length) 97 | { 98 | byte[] buffer = GetBytes(offset, (uint)length, CurrentAPI); 99 | return buffer; 100 | } 101 | 102 | /// Read and return an unsigned integer 16 bits. 103 | public ushort ReadUInt16(uint offset) 104 | { 105 | byte[] buffer = GetBytes(offset, 2, CurrentAPI); 106 | Array.Reverse(buffer, 0, 2); 107 | return BitConverter.ToUInt16(buffer, 0); 108 | } 109 | 110 | /// Read and return an unsigned integer 32 bits. 111 | public uint ReadUInt32(uint offset) 112 | { 113 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 114 | Array.Reverse(buffer, 0, 4); 115 | return BitConverter.ToUInt32(buffer, 0); 116 | } 117 | 118 | /// Read and return an unsigned integer 64 bits. 119 | public ulong ReadUInt64(uint offset) 120 | { 121 | byte[] buffer = GetBytes(offset, 8, CurrentAPI); 122 | Array.Reverse(buffer, 0, 8); 123 | return BitConverter.ToUInt64(buffer, 0); 124 | } 125 | 126 | /// Read and return a Float. 127 | public float ReadFloat(uint offset) 128 | { 129 | byte[] buffer = GetBytes(offset, 4, CurrentAPI); 130 | Array.Reverse(buffer, 0, 4); 131 | return BitConverter.ToSingle(buffer, 0); 132 | } 133 | 134 | /// Read a string very fast and stop only when a byte null is detected (0x00). 135 | public string ReadString(uint offset) 136 | { 137 | int block = 40; 138 | int addOffset = 0; 139 | string str = ""; 140 | repeat: 141 | byte[] buffer = ReadBytes(offset + (uint)addOffset, block); 142 | str += Encoding.UTF8.GetString(buffer); 143 | addOffset += block; 144 | if (str.Contains('\0')) 145 | { 146 | int index = str.IndexOf('\0'); 147 | string final = str.Substring(0, index); 148 | str = String.Empty; 149 | return final; 150 | } 151 | else 152 | goto repeat; 153 | } 154 | 155 | /// Write a signed byte. 156 | public void WriteSByte(uint offset, sbyte input) 157 | { 158 | byte[] buff = new byte[1]; 159 | buff[0] = (byte)input; 160 | SetMem(offset, buff, CurrentAPI); 161 | } 162 | 163 | /// Write a boolean. 164 | public void WriteBool(uint offset, bool input) 165 | { 166 | byte[] buff = new byte[1]; 167 | buff[0] = input ? (byte)1 : (byte)0; 168 | SetMem(offset, buff, CurrentAPI); 169 | } 170 | 171 | /// Write an interger 16 bits. 172 | public void WriteInt16(uint offset, short input) 173 | { 174 | byte[] buff = new byte[2]; 175 | BitConverter.GetBytes(input).CopyTo(buff, 0); 176 | Array.Reverse(buff, 0, 2); 177 | SetMem(offset, buff, CurrentAPI); 178 | } 179 | 180 | /// Write an integer 32 bits. 181 | public void WriteInt32(uint offset, int input) 182 | { 183 | byte[] buff = new byte[4]; 184 | BitConverter.GetBytes(input).CopyTo(buff, 0); 185 | Array.Reverse(buff, 0, 4); 186 | SetMem(offset, buff, CurrentAPI); 187 | } 188 | 189 | /// Write an integer 64 bits. 190 | public void WriteInt64(uint offset, long input) 191 | { 192 | byte[] buff = new byte[8]; 193 | BitConverter.GetBytes(input).CopyTo(buff, 0); 194 | Array.Reverse(buff, 0, 8); 195 | SetMem(offset, buff, CurrentAPI); 196 | } 197 | 198 | /// Write a byte. 199 | public void WriteByte(uint offset, byte input) 200 | { 201 | byte[] buff = new byte[1]; 202 | buff[0] = input; 203 | SetMem(offset, buff, CurrentAPI); 204 | } 205 | 206 | /// Write a byte array. 207 | public void WriteBytes(uint offset, byte[] input) 208 | { 209 | byte[] buff = input; 210 | SetMem(offset, buff, CurrentAPI); 211 | } 212 | 213 | /// Write a string. 214 | public void WriteString(uint offset, string input) 215 | { 216 | byte[] buff = Encoding.UTF8.GetBytes(input); 217 | Array.Resize(ref buff, buff.Length + 1); 218 | SetMem(offset, buff, CurrentAPI); 219 | } 220 | 221 | /// Write an unsigned integer 16 bits. 222 | public void WriteUInt16(uint offset, ushort input) 223 | { 224 | byte[] buff = new byte[2]; 225 | BitConverter.GetBytes(input).CopyTo(buff, 0); 226 | Array.Reverse(buff, 0, 2); 227 | SetMem(offset, buff, CurrentAPI); 228 | } 229 | 230 | /// Write an unsigned integer 32 bits. 231 | public void WriteUInt32(uint offset, uint input) 232 | { 233 | byte[] buff = new byte[4]; 234 | BitConverter.GetBytes(input).CopyTo(buff, 0); 235 | Array.Reverse(buff, 0, 4); 236 | SetMem(offset, buff, CurrentAPI); 237 | } 238 | 239 | /// Write an unsigned integer 64 bits. 240 | public void WriteUInt64(uint offset, ulong input) 241 | { 242 | byte[] buff = new byte[8]; 243 | BitConverter.GetBytes(input).CopyTo(buff, 0); 244 | Array.Reverse(buff, 0, 8); 245 | SetMem(offset, buff, CurrentAPI); 246 | } 247 | 248 | /// Write a Float. 249 | public void WriteFloat(uint offset, float input) 250 | { 251 | byte[] buff = new byte[4]; 252 | BitConverter.GetBytes(input).CopyTo(buff, 0); 253 | Array.Reverse(buff, 0, 4); 254 | SetMem(offset, buff, CurrentAPI); 255 | } 256 | 257 | private void SetMem(uint Address, byte[] buffer, SelectAPI API) 258 | { 259 | if (API == SelectAPI.ControlConsole) 260 | Common.CcApi.SetMemory(Address, buffer); 261 | else if (API == SelectAPI.TargetManager) 262 | Common.TmApi.SetMemory(Address, buffer); 263 | } 264 | 265 | private void GetMem(uint offset, byte[] buffer, SelectAPI API) 266 | { 267 | if (API == SelectAPI.ControlConsole) 268 | Common.CcApi.GetMemory(offset, buffer); 269 | else if (API == SelectAPI.TargetManager) 270 | Common.TmApi.GetMemory(offset, buffer); 271 | } 272 | 273 | private byte[] GetBytes(uint offset, uint length, SelectAPI API) 274 | { 275 | byte[] buffer = new byte[length]; 276 | if (API == SelectAPI.ControlConsole) 277 | buffer = Common.CcApi.GetBytes(offset, length); 278 | else if (API == SelectAPI.TargetManager) 279 | buffer = Common.TmApi.GetBytes(offset, length); 280 | return buffer; 281 | } 282 | 283 | private class Common 284 | { 285 | public static CCAPI CcApi; 286 | public static TMAPI TmApi; 287 | } 288 | 289 | } 290 | } --------------------------------------------------------------------------------