Following up on his previous release, PlayStation 3 developer deroad has made available what he calls PS3 LibMove version 0.1 for introducing PlayStation Move homebrew support followed by a PS Vibe Mode Edition below.
Download: https://github.com/wargio/libmove/archive/master.zip / PS Vibe Move Edition v1.00 (Signed) PKG / PS Vibe Move Edition v1.00 (Unsigned) PKG / PS Vibe Move Edition v1.01 (Signed) PKG / PS Vibe Move Edition v1.01 (Unsigned) PKG / PS Vibe Move Edition v1.02 (Signed) / PS Vibe Move Edition v1.02 (Unsigned) PKG / https://github.com/wargio/libmove
To quote from his blog: I wanted to release this lib because someone would find it useful. i wrote some things, but most of the stuff were written by KaKaRoTo and bigboss.
This lib has been tested and works. for any bug report, please write to me on github or send me an email.
libmove for PSL1GHT V2
This lib will be installed inside the PORTLIBS
AuthorsChangelog:
- Deroad - libmove.cpp/.h movebuttons.h
- Jose Ramos Marquez (bigboss) - moveutil.cpp/.h spursutil.cpp/.h
- Youness Alaoui (KaKaRoTo) - moveutil.cpp/.h spursutil.cpp/.h
* 0.1
initial release
* 0.2
Fixed heap overflow (thanks to an anonymous girl?)
Linking
Add these libs on your makefile to compile your homebrew.
LicenseCode:-lmove -lgem -lcamera -lspurs
This lib is released under BSD License.
Example
Shortly following, deroad has also made available a PS Vibe Move Edition stating the following:Code:#include <libmove/libmove.h> int main(s32 argc, const char* argv[]){ movePadData data; init_move(); while(1){ getMovePadData(&data); if(data.BTN_ACTION) calibrate_move(); }else if(data.BTN_T){ goto end; } } end: end_move(); }
This homebrew should be only for ladies.. well what it does? it simple enable the rumble on the PS Move. you can choose the intensity with the trigger and then press the action button to keep that.. this homebrew should work on any TV.
v1.01 Changelog:What is libmove ? (via psxbrew.net/wiki/How_to_use_libmove)
- Fixed the blackscreen issue. now it should work.
Is a simple lib that allows to use the PlayStation Move controller on the PS3 through PSL1GHT (V2). This lib works only with the PlayStation Eye.
How to use it
Include
It's quite simple to use. First thing is including the lib into the source code.
You don't need any other header. that one include all the things.Code:#include <libmove/libmove.h>
Initialise libmove
then you need to initialise it:
This function return LIBMOVE_ERROR if something went wrong. If everything is fine, that returns LIBMOVE_OK. This can be an example of how to use this:Code:initLibMove();
End libmoveCode:if(initLibMove() == LIBMOVE_ERROR){ //Something went wrong return -1; }else{ //Do something.. }
To stop the lib, you can simply call this function. it will return LIBMOVE_ERROR if something went wrong. If everything is fine, that returns LIBMOVE_OK.
Get Gyroscope valuesCode:initLibMove();
To get the gyroscope values (x,y,z axis) you can use this function:
This piece of code return the x,y,z float value from the first ps move connected. You can use this function to track a cursor into the code in this way:Code:float x ,y ,z; getGyroPosition(PLAYSTATION_MOVE_PAD_0, &x, &y, &z);
Get the real position of the controllerCode://outside the loop: float x = screen_width/2 ,y = screen_height/2 ,z = 0; //this to get the pointer to the centre of the screen // inside the loop float x1 ,y1 ,z1; getGyroPosition(PLAYSTATION_MOVE_PAD_0, &x1, &y1, &z1); //all the gyroscope values when the move is not moving, are lower then -+2 //this means that when you move the controller you get higher values then abs(+-2) = +2 if(abs(x1) > 2) x += x1; if(abs(y1) > 2) y += y1; if(abs(z1) > 2) z += z1; //in this way you update the values with the new position only if you are actually moving the controller
you can get the controller position also through the 3D position:
this time you get the ball position compared to the distance from the Playstation Eye.Code:float x ,y ,z; getGyroPosition(PLAYSTATION_MOVE_PAD_0, &x, &y, &z);
Calibrate the controller
Calibrating the controller is quite simple. you need only need to know what controller and then call this:
Get controller buttonsCode:calibrateMove(PLAYSTATION_MOVE_PAD_0);
To get the controller buttons, you need to know what number of the controller get. In the example is always the first controller (PLAYSTATION_MOVE_PAD_0).
All the BTN_* return 1 (true) if the button is pressed, otherwise return 0 (false). An example:Code:movePadData movePad; getMovePadData(PLAYSTATION_MOVE_PAD_0, &movePad); movePadData is a struct that has the following buttons: /* Button information */ BTN_SELECT; BTN_T; BTN_ACTION; BTN_START; BTN_TRIANGLE; BTN_CIRCLE; BTN_CROSS; BTN_SQUARE; /* Analog nub information */ ANA_T;
There is also the trigger value (ANA_T). This returns a value between 0x00 and 0xff. 0x00 is when is not pressed, 0xff is the max value. You can also use BTN_T to only know if it is pressed or not (it will return 1 also if the value is at the least 0x01, but also with any value between 0x01 and 0xff).Code://somewhere in the code movePadData movePad; //somewhere else in the code getMovePadData(PLAYSTATION_MOVE_PAD_0, &movePad); if(movePad.BTN_ACTION){ //if the ACTION button is pressed //do something }
MakefileCode://somewhere in the code movePadData movePad; //somewhere else in the code getMovePadData(PLAYSTATION_MOVE_PAD_0, &movePad); if(movePad.ANA_T > 0x30){ //if the T button is pressed with the intensity of 0x31 or higher //do something }
To compile with this lib, you need to add the following flags:
Code:LDFLAGS = -lmove -lgem -lcamera -lspurs
More PlayStation 3 News...
13250 HeyManHRU
13207 PS3 News
11287 elser1
11119 oVERSoLDiER
9248 GrandpaHomer
8578 Tidusnake666
7968 saviour07
7340 condorstrike
7258 deank
6858 OGroteKoning
24951 PS3 News
5279 Starlight
2965 HeyManHRU
2173 CJPC
2122 elser1
1818 cfwprophet
1756 her0
1570 oVERSoLDiER
1291 GrandpaHomer
1080 barrybarryk






