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-21-2013, 11:17 AM #11
seb5594
Proud Former Admin
Thank you very much for the Release Smile
But how to Reset to XMB? You should add Disconnect, Restart, Turn Off Playstation and Turn On :P
06-21-2013, 02:14 PM #12
Originally posted by johnmcmil View Post
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

Already explained in the thread , don't forget to connect your target first.
06-21-2013, 04:52 PM #13
Sonoro
I like anteaters
Originally posted by seb5594 View Post
Thank you very much for the Release Smile
But how to Reset to XMB? You should add Disconnect, Restart, Turn Off Playstation and Turn On :P


Turn ON: PS3TMAPI.PowerON(); <- is declared, but it won't work since the tm is not connected while the console is off.
Turn OFF: PS3TMAPI.PowerOFF();
Reset to XMB: PS3TMAPI.Reset(PS3TMAPI.ResetParameters.ResetEx); <- haven't tested this one.
06-21-2013, 05:18 PM #14
Harry
Former Staff
Sweet release dude! Thanks for sharing, will be checking this out for sureWinky Winky.
06-21-2013, 06:52 PM #15
How the Fuck you found this out?
06-22-2013, 12:33 PM #16
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


I was using this
    DEX.ConnectDebug();
DetailStatus = DEX.SCE.DetailStatus();
MessageBoxEx.Show("" + DetailStatus);

But no matter what, even if the ps3 is turned off, or the ps3 is on and connected, the status always returns just this message "connected". How do I go about of fixing this?
Last edited by JemEO ; 06-22-2013 at 12:35 PM.
06-22-2013, 06:46 PM #17
Originally posted by johnmcmil View Post
I was using this
    DEX.ConnectDebug();
DetailStatus = DEX.SCE.DetailStatus();
MessageBoxEx.Show("" + DetailStatus);

But no matter what, even if the ps3 is turned off, or the ps3 is on and connected, the status always returns just this message "connected". How do I go about of fixing this?

I'll see this later
06-27-2013, 01:55 AM #18
Thread updated. PS3Lib v3.1 Released without changelog , every problems are now fixed.

A simple project visual studio has been added in the package. This source is ready to be compiled !

Useful for all beginners , just open it and try to build he will work fine...

Tell me if i forget something...
Last edited by iMCSx ; 06-27-2013 at 03:12 AM.

The following user thanked iMCSx for this useful post:

06-28-2013, 01:46 AM #19
SALEM-x
Little One
thanks bro but how can i turn on / off the ps3 ?
and also reset to XMB
i treied this one here but it didnt work !
Turn ON: PS3TMAPI.PowerON();
Turn OFF: PS3TMAPI.PowerOFF();
Reset to XMB: PS3TMAPI.Reset(PS3TMAPI.ResetParameters.ResetEx);

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo