Post: [RELEASE] PS3Lib v3.1
06-19-2013, 09:42 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});
PS3 Library .NET



This will allow you to communicate with your PS3 Developers easily.
Connection with targets , read/write memory and more...

V4 Released : You must login or register to view this content.

This project is on CodePlex , you can download the project compiled (.DLL) or see the source You must login or register to view this content.


New Features :

*Automatic ps3tmapi_net.dll (You don't need to add as reference this dll , PS3Lib do it!)
*Connect a Target By Name
*Get a Target Name
*Reset To XMB
*PS3IO Extension (XboxDevelopmentExtender Converted)
*Extension Memory (CraigChrist XDevkit Extension Converted)


UPDATE v3.1 CHANGESET:


Some guys get a message "ps3tmapi_net.dll not found" when you try to connect to target, you must just add this in your Program.cs / Form_Load / Or just before ConnectDebug :

    PS3Lib.GetPs3Api.PS3TMAPI_NET();



What change in the v3.1 ?:

*Added a simple project with C# source with note for help all beginners (picture in below)
*Fixed GetStatus Method
*Fixed Extensions Writer
*Fixed Some Errors...


You must login or register to view this content.


SOURCE IN THE PACKAGE, DOWNLOAD IN BELOW.


How to use :

First , as i've said for the update v3.1 , don't forget to add this somewhere in your app :

    PS3Lib.GetPs3Api.PS3TMAPI_NET();


Add the dll as reference , and add it to your project :

    [B]using[/B] PS3Lib;

You must create an instance , example just after the partial class , then like this :

    [B]PS3API[/B] DEX = [B]new PS3API();[/B]
[B]PS3IO[/B] PS3IO = [B]new PS3IO();[/B]


You can change these words "DEX" and "PS3IO" (Not in bold) by what you want.
You don't need to create an instance for IO , if you don't want use it , don't create an instance it's not important.

You can now call a method , example in the event Form_Load :

    DEX.ConnectDebug("iMCSxDev");


Like you can see , we can now connect a target by his name , so you can add much target in Target Manager is not a problem.

But , you can always use the old way (Connect By Default) , because i use 2 methods with the same name , but not the same parameters example :

    DEX.ConnectDebug(); // This Connect the Target by default (0)

OR

DEX.ConnectDebug(5); This Connect the target 5.


I done this only if someone get problems , but it should work perfectly. I have added some others useful commands , first the command PS3TMAPI_NET(); This is included in the function connected , when you will connect your target with the PS3Lib (in your app) the dll will load automatically the ps3tmapi_net , then you DON'T need to add the ps3tmapi_net.dll into your project now... But if you want use a special command from the ps3tmapi_net.dll , you must just add it as reference but without include it in the same folder of your app if you release your app. How work this method ? :

    
internal static Assembly LoadApi;
public static Assembly PS3TMAPI_NET()
{
AppDomain.CurrentDomain.AssemblyResolve += (s, e) =>
{
var filename = new AssemblyName(e.Name).Name;
var x = string.Format(@"C:\Program Files\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
var x64 = string.Format(@"C:\Program Files (x64)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
var x86 = string.Format(@"C:\Program Files (x86)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
if (System.IO.File.Exists(x))
LoadApi = Assembly.LoadFile(x);
else
{
if (System.IO.File.Exists(x64))
LoadApi = Assembly.LoadFile(x64);


else
{
if (System.IO.File.Exists(x86))
LoadApi = Assembly.LoadFile(x86);
else
{
MessageBox.Show("Target Manager API cannot be founded to:

" + x86, "Error with PS3 API!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
return LoadApi;
};
return LoadApi;
}


As you can see , this method Load the dll but return too the assembly , then you can make the same things in your project with this return... I have just enter all popular path for this API my PS3 Attach Games run with this and it work for everyone...


PS3 Extensions & SCE Properties :

I have add some methods , but they are only available by their properties , easy to use but i'll write 2 example :

    
// Extension Propertie
float Jump = DEX.Extension.ReadFloat(0x0019780); // MW3 Offset , "Jump" has now the value 78. (If default)
string HostName = DEX.Extension.ReadString(0x01BBBC2C); // This will read your PSN for MW3...

// Extension SCE
uint CurrentProcess = DEX.SCE.ProcessID(); // Get the latest process attached...


I have just converted the XDevKit++ from CraigChrist into PS3. I have removed his Extension methods it was not needed for the dll , i have also added and edited some function , example the string is read in memory to the next null byte.


PS3IO (EndianIO) :

We can now use EndianIO for ps3... This allow to be free with the language. It's a bit like the extension , but different this read and write quickly your bytes and much methods are available , some example how to use :

    
using PS3Lib.IO;

// You must create an instance too , already said before...

// Put this into a function , this will set the noclip for MW3.
EndianIO IO = new EndianIO(PS3IO.StreamPS3(DEX), PS3Lib.IO.EndianType.BigEndian);
IO.Open();
IO.In.BaseStream.Position = 0x0110A280 + 0x35fc;
IO.Out.Write(0x00000001);

// Other Example , write noclip + redboxes
EndianIO IO = new EndianIO(PS3IO.StreamPS3(DEX), PS3Lib.IO.EndianType.BigEndian);
IO.Open();
IO.In.BaseStream.Position = 0x0110a280 + 0x35fc;
IO.Out.Write(0x00000001);
IO.In.BaseStream.Position = 0x0110a280 + 0x13;
IO.Out.Write((byte)0x10);



You can choose the Endian Type , and read/write memory , use just IO.Out. or IO.In. .

There are not only these methods , i have just write some examples , you will see every methods available if you explore it from your project.

I'm done with this thread , i know its a bit long for only a dll , but i would explain this perfectly , like this everyone understand how to work this.

I hope this will help you to develop some applications...

Thanks to Buc-ShoTz for the first PS3Lib released , CraigChrist for his XDevKit base , and the creator of the XboxDevExtander.


You must login or register to view this content.



Have fun Winky Winky
Last edited by iMCSx ; 11-25-2013 at 04:48 AM.

The following 34 users say thank you to iMCSx for this useful post:

βounceModz, BrinkerzHD, Chxii, Daddy, FM|T Enstone, FM|T xDevOpS, Gabberhard, Gendjisan, gianluca33, Hacker41822, Harry, i_iTop_i, InfinityISB4CK, Insult, JemEO, Jenxz, KrElZo, Mango_Knife, matt0897, Nicktasticz, MW2TopTenWORLD, O-H, Pseudo_Soldier, RTE Modz, SALEM-x, SC58, Slice, Fatality, xRevolutions, Xx-GIPPI-xX
06-19-2013, 09:43 PM #2
FM|T xDevOpS
Save Point
Nice work Smile
06-19-2013, 09:56 PM #3
Chxii
Do a barrel roll!
Nice man like always Smile
06-19-2013, 10:02 PM #4
Sexual Release
06-19-2013, 10:16 PM #5
Ace
Former Staff Member
Great Release, I think alot have been waiting for this Happy
06-20-2013, 01:30 AM #6
KrElZo
Do a barrel roll!
Great release as always Happy
06-20-2013, 03:40 AM #7
Kurt
Banned
Good Job
06-20-2013, 09:02 AM #8
0xX0R
Save Point
Good Job Smile
06-20-2013, 10:35 AM #9
What i am Waiting For Is A LAN for OUR ps3s Would Be Awesome
what does this do NOOBS GUYS
06-21-2013, 10:17 AM #10
Originally posted by FM
PS3 Library v3.0 For .NET



This will allow you to communicate with your PS3 Developers easily.
Connection with targets , read/write memory and more...

This project is on CodePlex , you can download the project compiled (.DLL) or see the source You must login or register to view this content.


New Features :

*Automatic ps3tmapi_net.dll (You don't need to add as reference this dll , PS3Lib do it!)
*Connect a Target By Name
*Get a Target Name
*Reset To XMB
*PS3IO Extension (XboxDevelopmentExtender Converted)
*Extension Memory (CraigChrist XDevkit Extension Converted)


How to use :

Add the dll as reference , and add it to your project :

    [B]using[/B] PS3Lib;

You must create an instance , example just after the partial class , then like this :

    [B]PS3API[/B] DEX = [B]new PS3API();[/B]
[B]PS3IO[/B] PS3IO = [B]new PS3IO();[/B]


You can change these words "DEX" and "PS3IO" (Not in bold) by what you want.
You don't need to create an instance for IO , if you don't want use it , don't create an instance it's not important.

You can now call a method , example in the event Form_Load :

    DEX.ConnectDebug("iMCSxDev");


Like you can see , we can now connect a target by his name , so you can add much target in Target Manager is not a problem.

But , you can always use the old way (Connect By Default) , because i use 2 methods with the same name , but not the same parameters example :

    DEX.ConnectDebug(); // This Connect the Target by default (0)

OR

DEX.ConnectDebug(5); This Connect the target 5.


I done this only if someone get problems , but it should work perfectly. I have added some others useful commands , first the command PS3TMAPI_NET(); This is included in the function connected , when you will connect your target with the PS3Lib (in your app) the dll will load automatically the ps3tmapi_net , then you DON'T need to add the ps3tmapi_net.dll into your project now... But if you want use a special command from the ps3tmapi_net.dll , you must just add it as reference but without include it in the same folder of your app if you release your app. How work this method ? :

    
internal static Assembly LoadApi;
public static Assembly PS3TMAPI_NET()
{
AppDomain.CurrentDomain.AssemblyResolve += (s, e) =>
{
var filename = new AssemblyName(e.Name).Name;
var x = string.Format(@"C:\Program Files\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
var x64 = string.Format(@"C:\Program Files (x64)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
var x86 = string.Format(@"C:\Program Files (x86)\SN Systems\PS3\bin\ps3tmapi_net.dll", filename);
if (System.IO.File.Exists(x))
LoadApi = Assembly.LoadFile(x);
else
{
if (System.IO.File.Exists(x64))
LoadApi = Assembly.LoadFile(x64);


else
{
if (System.IO.File.Exists(x86))
LoadApi = Assembly.LoadFile(x86);
else
{
MessageBox.Show("Target Manager API cannot be founded to:

" + x86, "Error with PS3 API!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
return LoadApi;
};
return LoadApi;
}


As you can see , this method Load the dll but return too the assembly , then you can make the same things in your project with this return... I have just enter all popular path for this API my PS3 Attach Games run with this and it work for everyone...


PS3 Extensions & SCE Properties :

I have add some methods , but they are only available by their properties , easy to use but i'll write 2 example :

    
// Extension Propertie
float Jump = DEX.Extension.ReadFloat(0x0019780); // MW3 Offset , "Jump" has now the value 78. (If default)
string HostName = DEX.Extension.ReadString(0x01BBBC2C); // This will read your PSN for MW3...

// Extension SCE
uint CurrentProcess = DEX.SCE.ProcessID(); // Get the latest process attached...


I have just converted the XDevKit++ from CraigChrist into PS3. I have removed his Extension methods it was not needed for the dll , i have also added and edited some function , example the string is read in memory to the next null byte.


PS3IO (EndianIO) :

We can now use EndianIO for ps3... This allow to be free with the language. It's a bit like the extension , but different this read and write quickly your bytes and much methods are available , some example how to use :

    
using PS3Lib.IO;

// You must create an instance too , already said before...

// Put this into a function , this will set the noclip for MW3.
EndianIO IO = new EndianIO(PS3IO.StreamPS3(DEX), PS3Lib.IO.EndianType.BigEndian);
IO.Open();
IO.In.BaseStream.Position = 0x0110A280 + 0x35fc;
IO.Out.Write(0x00000001);

// Other Example , write noclip + redboxes
EndianIO IO = new EndianIO(PS3IO.StreamPS3(DEX), PS3Lib.IO.EndianType.BigEndian);
IO.Open();
IO.In.BaseStream.Position = 0x0110a280 + 0x35fc;
IO.Out.Write(0x00000001);
IO.In.BaseStream.Position = 0x0110a280 + 0x13;
IO.Out.Write((byte)0x10);



You can choose the Endian Type , and read/write memory , use just IO.Out. or IO.In. .

There are not only these methods , i have just write some examples , you will see every methods available if you explore it from your project.

I'm done with this thread , i know its a bit long for only a dll , but i would explain this perfectly , like this everyone understand how to work this.

I hope this will help you to develop some applications...

Thanks to Buc-ShoTz for the first PS3Lib released , CraigChrist for his XDevKit base , and the creator of the XboxDevExtander.


You must login or register to view this content.



Have fun Winky Winky


How do I use DEX.SCE.GetStatus(); and DEX.SCE.ProcessID(); ? I've tried different ways but cant figure out how to use those two. Amazing release by the way Happy
Last edited by JemEO ; 06-21-2013 at 10:19 AM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo