Post: Local Button Monitoring (C++ | C# | Vb.Net)
07-14-2014, 06:34 PM #1
xPAQz
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); Yo guys,
today i release the Local Button Monitoring.
Big thanks to SC58 and Mango_Knife. SC released the Addresses. So im just going to release the Classes.
Anyways here it is:


C++

    
namespace ButtonMonitoring
{
int LocalButtons = 0xd19800;
enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
};
bool ButtonPressed(Buttons Button)
{
return (*(int*)(LocalButtons + Button) != 0);
}
}


You can use it like this:
    
if (ButtonMonitoring::ButtonPressed(ButtonMonitoring::R3))
{
console_write("R3 has been pressed");
}


C#
    private static UInt32 LocalButtons = 0xd19800;
public enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
}
public static Boolean ButtonPressed(Buttons Button)
{
return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + (UInt32)Button) == 1);
}


You can use it like this (Use a timer!)
    if (ButtonPressed(Buttons.Cross))
{
MessageBox.Show("Cross Have Pressed!","Success");
}


Vb.Net
    Private Shared LocalButtons As UInt32 = &HD19800
Public Enum Buttons
DpadUp = &H1FF
DpadDown = &H20F
DpadRight = &H21F
DpadLeft = -&HC47E5F
R3 = &H1CF
Square = &HEF
Cross = &HCF
LeftCursorUp = &H27F
LeftCursorLeft = &H29F
LeftCursorRight = &H2AF
LeftCursorDown = &H28F
R2 = &H1EF
L2 = &H1DF
Select = &H1AF
Start = &H19F
End Enum
Public Shared Function ButtonPressed(Button As Buttons) As Boolean
Return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + Button) = 1)
End Function


You can use it like this: (Use a timer!)
     If ButtonPressed(Buttons.Cross) Then
MessageBox.Show("Cross Have Pressed!", "Success")
End If
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to xPAQz for this useful post:

-JM-, GermanModdingPS, Joren, LaRip8, makeabce, Mango_Knife, Nana, NickBeHaxing, xDeluxeModz
07-27-2014, 02:16 PM #11
xPAQz
Bounty hunter
Originally posted by makeabce View Post
Nice mate Smile Now, create menu!
If you need help,talk to me in skype.


im working on a .sprx base ^^
i nearly finsihed it xD
07-27-2014, 04:59 PM #12
-JM-
Space Ninja
Originally posted by xPAQz View Post
Yo guys,
today i release the Local Button Monitoring.
Big thanks to SC58 and Mango_Knife. SC released the Addresses. So im just going to release the Classes.
Anyways here it is:


C++

    
namespace ButtonMonitoring
{
int LocalButtons = 0xd19800;
enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
};
bool ButtonPressed(Buttons Button)
{
return (*(int*)(LocalButtons + Button) != 0);
}
}


You can use it like this:
    
if (ButtonMonitoring::ButtonPressed(ButtonMonitoring::R3))
{
console_write("R3 has been pressed");
}


C#
    private static UInt32 LocalButtons = 0xd19800;
public enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
}
public static Boolean ButtonPressed(Buttons Button)
{
return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + (UInt32)Button) == 1);
}


You can use it like this (Use a timer!)
    if (ButtonPressed(Buttons.Cross))
{
MessageBox.Show("Cross Have Pressed!","Success");
}


Vb.Net
    Private Shared LocalButtons As UInt32 = &HD19800
Public Enum Buttons
DpadUp = &H1FF
DpadDown = &H20F
DpadRight = &H21F
DpadLeft = -&HC47E5F
R3 = &H1CF
Square = &HEF
Cross = &HCF
LeftCursorUp = &H27F
LeftCursorLeft = &H29F
LeftCursorRight = &H2AF
LeftCursorDown = &H28F
R2 = &H1EF
L2 = &H1DF
Select = &H1AF
Start = &H19F
End Enum
Public Shared Function ButtonPressed(Button As Buttons) As Boolean
Return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + Button) = 1)
End Function


You can use it like this: (Use a timer!)
     If ButtonPressed(Buttons.Cross) Then
MessageBox.Show("Cross Have Pressed!", "Success")
End If

great all language

The following user thanked -JM- for this useful post:

xPAQz
07-27-2014, 08:22 PM #13
Great Job Drack
07-29-2014, 09:55 AM #14
xPAQz
Bounty hunter
Originally posted by EnVatoHD View Post
Great Job Drack

thx Gandalf the Grey

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo