Monday, 24 October 2016

Reversing PlayStation VR device (I)

First i need to give thanks to:
 The title of this blog article explains very well  about which is the main purpose of this blog entry.

PlayStation VR (before known by Morpheus) is the new device from Sony for Virtual Reality marketplace. As you know there are a few actors right now in this marketplace:
  • Oculus.
  • HTC.
  • Sony.
  • Google.
  • Samsung.
  • Others vendors.

 PlayStation VR need different parts:
  • VR headset.
  • Processor Unit.
  • PlayStation 4
  • PlayStation 4 Camera
  • PlayStation Move and PlayStation dualshock
  • TV with hdmi
Connection schema from Sony:
I have spoken already about PlayStation Move and PlayStation Camera  here in this blog and about its new design in my twitter account:



So now we are going to speak about usb connection between Processor Unit and PlayStation 4 because we want to use PlayStation VR in other platform different than PlayStation 4.

Processor Unit is a black box, if you want to know more about it you will need two things:
  1. Information about hardware. Sony published morpheus_bridge source for 1.50 and 2.0 and it will give you good information about how usb device is build and detailed information about all their 9 interfaces.
  2. An usb dump made with a usb protocol hardware analyzer.
1 was already published and 2 was shared by tokkyo_tw so...

LET THE GAME BEGIN

What happen when you connect usb connector from Processor Unit to a Mac/PC?

Easy you can see a new usb device with these usb descriptors

You can check in morpheus_bridge source code that all information is already there.

Usb dump was done with:
  • Software: USB Protocol Suite 7.35
  • Hardware: USBTrace 2500H
USB Protocol Suite can be downloaded from here you must register your user to dowload it.

We are going to work with files from dump:
  • connect-to-ps4 (psvr off).usb
  • connect-to-ps4 (psvr on in game (rez))-then-vrmode-on.usb
  • connect-to-ps4 (psvr on in game (rez)).usb
  • switch-to-vr-mode (in rez).usb
We will choose  connect-to-ps4 (psvr off).usb file first opening it with USB Protocol Suite.

With PlayStation Camera we got dump from beagle hardware analyzer from totalphase and their tool is multiplatform and easy to use for me.

USB Protocol Suite is for windows only and it is  a little hard to use but task can be done with it.

After opening file, choose in menu View Apply Decoding Scripts and check that you have following interfaces and their usb class applied:





and in the endpoint option the same: 



A problem that i find with this tool is that sometimes it can't put the right type of endponint , class and packet size , so check it with usb descriptors first.(Some weird sometimes identify some endpoint with bulk type when they are interrupt type check with usb descriptor that info is correct)

Choose in menu View Transfer Level and Hide all except Transfers options and  in menu Report Detail, View Data and Decode Field View options.

After that we can go transfer by transfer to make our analysis.

I am not going to tech you how usb protocol works for that you have plenty of information, if you don't know about it stop here.

First transfers are about get device and config ,interaface and endpoint descriptors, basically a dump for all descriptors


For your reference these standard request transfer give you all information about device:
  • Transfer 4 device descriptor
  • Transfer 11 configuration descriptor
  • Transfer 12 all descriptor
  • Transfer 13 status
All these transfer can give you all usb descriptor for this device and you can compare with information in morpheus_bridge  source and lsusb output. It is the same.  Check Decoded Field View Tab to see values from these standard requests transfers.

Transfer 14 set usb configuration to 1
Transfer 15 get size for string at index 3: 30 bytes (14 characters)
Transfer 16 get string at index 3 : PS VR 3D Audio  (name associated to interface 0)
Transfer 17 put alternate setting to 1 in inteface 0
Transfer 18 get size for string at index 4: 24 bytes
Transfer 19 get string at index 4: PS VR Audio (name associated to interface 1)
Transfer 20 21 22  23  25 and 26 are audio claass requests to get min max res from both channels associate to control volume features on interface 1
Transfer 24 is a isoc transfer empty no audio send yet to endpoint 1 OUT
Transfer 27 28 29 set volume to channel 1, channel 2 and again channel 1
Transfer 30 set alternate 1 to interface 3
Transfer 31 set alternate 1 to interface 2
Transfer 32 get size for string at index 7 : 26 bytes (12 caracteres)
Transfer 33 get string at index 7:  PS VR Sensor  (associated to interface 4)
Transfer 34 get report descriptor  from interface 4
/*0x06, 0x01, 0xff, // Usage Page (Vendor-defined 0xFF01)
    0x09, 0x01, // Usage (Vendor-defined 0x0001)
    0xa1, 0x01, // Collection (Application)
    0x09, 0x10, // Usage (Vendor-defined 0x0010)
    0x15, 0x00,       //    Logical minimum (0)
    0x26, 0xff, 0x00, //    Logical maximum (255)
    0x75, 0x08,       //    Report Size (8)
    0x95, 0x40,       //    Report Count (64)
    0x81, 0x02,       //    Input
    0xc0 // End Collection
 */
Transfer 35 get size for string at index 8 : 28 bytes (13 caracteres)
Transfer 36 get string at index 8:  PS VR Control    (associated to interface 5)
Transfer 37 get report descriptor from interface 5
/*
    0x06, 0x00, 0xff, // Usage Page (Vendor-defined 0xFF00)
    0x15, 0x00, // Logical Minimum(0)
    0x26, 0xff, 0x00, // Logical Maximun(255)
    0x09, 0x08, //Usage (Vendor-defined 0x0008)
    0xa1, 0x01, // Collection (Application)
    0x09, 0x80, // Usage (Vendor-defined 0x0080)
    0x85, 0x40, // Report ID (0X40)
    0x75, 0x08, // Report Size(0x8)
    0x95, 0x04, // Report Count(0x4)
    0xb1, 0x02, // Feature
    0xc0
*/
Transfer 38 put alternating setting to 3 to interface 6
Transfer 39 get size for string at index 10 : 26 bytes (12 caracteres)
Transfer 40 get string at index 10: PS VR BulkIn  (associated to interface 7)
Transfer 41 get size for string at index 11: 30 bytes (14 caracteres)
Transfer 42 get string at index 11: PS VR Control2  (associated to interface 8)
Transger 43 get report descriptor from interface 8
/*
    0x06, 0xf0, 0xff, // Usage Page (Vendor-defined 0xFFF0)
    0x15, 0x00, // Logical Minimum(0)
    0x26, 0xff, 0x00, // Logical Maximum(255)
    0x75, 0x08, // Report Size(0x8)
    0x95, 0x3f, // Report Count(0x3F)

    0x09, 0x01, // Usage(Vendor-defined 0x0001)
    0xa1, 0x01, // Collection(Application)
    0x85, 0xd0, // Report ID(0xD0)
    0x09, 0xd0, // Usage(Vendor-defined 0x00d0)
    0xb1, 0x02, // Feature

    0x85, 0xd1, // Report ID(0xD1)
    0x09, 0xd1, // Usage(Vendor-defined 0x00d1)
    0xb1, 0x02, // Feature

    0x85, 0xd2, // Report ID(0xD2)
    0x09, 0xd2, // Usage(Vendor-defined 0x00d2)
    0xb1, 0x02, // Feature

    0x85, 0xd3, // Report ID(0xD3)
    0x09, 0xd3, // Usage(Vendor-defined 0x00d3)
    0xb1, 0x02, // Feature
    0xc0, // End Collection 

    0x09, 0x02, // Usage(Vendor-defined 0x0002)
    0xa1, 0x01, // Collection(Application)
    0x85, 0xe0, // Report ID(0xE0)
    0x09, 0xe0, // Usage(Vendor-defined 0x00e0)
    0xb1, 0x02, // Feature

    0x85, 0xe1, // Report ID(0xE1)
    0x09, 0xe1, // Usage(Vendor-defined 0x00e1)
    0xb1, 0x02, // Feature

    0x85, 0xe2, // Report ID(0xE2)
    0x09, 0xe2, // Usage(Vendor-defined 0x00e2)
    0xb1, 0x02, // Feature

    0x85, 0xe3, // Report ID(0xE3)
    0x09, 0xe3, // Usage(Vendor-defined 0x00e3)
    0xb1, 0x02, // Feature

    0x85, 0xe4, // Report ID(0xE4)
    0x09, 0xe4, // Usage(Vendor-defined 0x00e4)
    0xb1, 0x02, // Feature

    0x85, 0xe5, // Report ID(0xE5)
    0x09, 0xe5, // Usage(Vendor-defined 0x00e5)
    0xb1, 0x02, // Feature

    0x85, 0xe6, // Report ID(0xE6)
    0x09, 0xe6, // Usage(Vendor-defined 0x00e6)
    0xb1, 0x02, // Feature

    0x85, 0xe7, // Report ID(0xE7)
    0x09, 0xe7, // Usage(Vendor-defined 0x00e7)
    0xb1, 0x02, // Feature

    0x85, 0xe8, // Report ID(0xE8)
    0x09, 0xe8, // Usage(Vendor-defined 0x00e8)
    0xb1, 0x02, // Feature

    0x85, 0xe9, // Report ID(0xE9)
    0x09, 0xe9, // Usage(Vendor-defined 0x00e9)
    0xb1, 0x02, // Feature

    0x85, 0xef, // Report ID(0xEF)
    0x09, 0xef, // Usage(Vendor-defined 0x00ef)
    0x95, 0x04, // Report Count(0x4)
    0xb1, 0x02, // Feature
    0xc0, // End Collection 

    0x09, 0x40, // Usage(Vendor-defined 0x0040)
    0xa1, 0x01, // Collection(Application)
    0x85, 0xf0, // Report ID(0xF0)
    0x09, 0x47, // Usage(Vendor-defined 0x0047)
    0x15, 0x00, // Logical Minimum(0)
    0x26, 0xff, 0x00, // Logical Maximum(255)
    0x75, 0x08, // Report Size(0x8)
    0x95, 0x3f, // Report Count(0x3F)
    0xb1, 0x02, // Feature

    0x85, 0xf1, // Report ID(0xF1)
    0x09, 0x48, // Usage(Vendor-defined 0x0048)
    0x95, 0x3f, // Report Count(0x3F)
    0xb1, 0x02, // Feature

    0x85, 0xf2, // Report ID(0xF2)
    0x09, 0x49, // Usage(Vendor-defined 0x0049)
    0x95, 0x0f, // Report Count(0x0F)
    0xb1, 0x02, // Feature

    0x85, 0xf3, // Report ID(0xF3)
    0x0a, 0x01, 0x47, // Usage(Vendor-defined 0x4701)
    0x95, 0x07, // Report Count(0x07)
    0xb1, 0x02, // Feature
    0xc0 // End Collection 
 */
Ttrasfer 44 set idle to interface 8

Translation to c/c++ code with libusb api call is direct with all information from dump. All repoorts are described in morpheus_bridge source code so it's confirm all  is fine.

TO BE CONTINUED



Monday, 24 August 2015

Reversing sceLibCamera

Well, first thanks to all people involved in WebKit exploit. Without their tools i could't dump module and reverse it.

1) We need dump the module. Load libSceCamera.sprx its id is 31. So load it first.

2) Dump it. its index is 20 when it is loaded.

3) Idapro to the rescue. We need offset for all functions that can be called from other modules. Only a brief view and you can see that Sony is using printf("%s ...\n",__FUNCTION__,..) in his code (Thanks of this help Sony) so many function names are you waiting for you with the offset ready :P and plenty of them are the same names that we know from vita and ps3.

you can use getFunctionAddressByName sycall 591 with the names that you see in idapro so you can confirm all function names and the offsets.

The list is:

sceCameraAudioOpen Offset = 0x6d00
sceCameraClose Offset = 0x5550
sceCameraCloseByHandle Offset = 0x55b0
sceCameraGetAttribute Offset = 0x5a10
sceCameraGetAutoExposureGain Offset = 0x5ba0
sceCameraGetAutoWhiteBalance Offset = 0x5d00
sceCameraGetConfig Offset = 0x5710
sceCameraGetContrast Offset = 0x5e60
sceCameraGetDefectivePixelCancellation Offset = 0x5fc0
sceCameraGetDeviceConfig Offset = 0x6dc0
sceCameraGetDeviceInfo Offset = 0x5af0
sceCameraGetExposureGain Offset = 0x6120
sceCameraGetFrameData Offset = 0x5950
sceCameraGetGamma Offset = 0x62c0
sceCameraGetHue Offset = 0x6460
sceCameraGetLensCorrection Offset = 0x65c0
sceCameraGetSaturation Offset = 0x6720
sceCameraGetSharpness Offset = 0x6880
sceCameraGetWhiteBalance Offset = 0x69e0
sceCameraIsAttached Offset = 0x6bd0
sceCameraIsValidFrameData Offset = 0x59b0
sceCameraOpen Offset = 0x5430
sceCameraOpenByModuleId Offset = 0x54c0
sceCameraSetAttribute Offset = 0x5a80
sceCameraSetAutoExposureGain Offset = 0x5c50
sceCameraSetAutoWhiteBalance Offset = 0x5db0
sceCameraSetCalibData Offset = 0x6c70
sceCameraSetConfig Offset = 0x5610
sceCameraSetConfigInternal Offset = 0x5690
sceCameraSetContrast Offset = 0x5f10
sceCameraSetDefectivePixelCancellation Offset = 0x6070
sceCameraSetExposureGain Offset = 0x6200
sceCameraSetGamma Offset = 0x63a0
sceCameraSetHue Offset = 0x6510
sceCameraSetLensCorrection Offset = 0x6670
sceCameraSetSaturation Offset = 0x67d0
sceCameraSetSharpness Offset = 0x6930
sceCameraSetWhiteBalance Offset = 0x6ac0
sceCameraStart Offset = 0x5790
sceCameraStartByHandle Offset = 0x5810
sceCameraStop Offset = 0x5890
sceCameraStopByHandle Offset = 0x58f0

there are more but are internals and you can't use it outside the module.

4) Now fun job. Dissasemble each function that you can use from WebKit. You will see that Sony is using the same error Codes than in vita so this will help you to follow better the code. For example function sceCameraStop is at offset 0x5890 you can see its code in the next capture:



Remember:
"The first is placed in rdi, the second in rsi, the third in rdx, and then rcx, r8 and r9. Only the 7th argument and onwards are passed on the stack
For calls that may call functions that use varargs or stdargs (prototype-less
calls or calls to functions containing ellipsis (. . . ) in the declaration)
%al is used as hidden argument to specify the number of vector registers used."

so here we go:

edi contains parameter passed to the function. It is comparing with itself so basically if it is less or equal to 0 go to loc_58c7.

You will see that in loc_58c7 it is using something like:

printf("%s invalid handle:%d\n",__FUNCTION,arg1);

then you will see our old friend 802E0000h aka SCE_CAMERA_ERROR_PARAM well known in psp2sdk. So if you pass an arg1 less or equal than 0 to this function  you will get that.

So now what happen if you pass a valid handle greater than 0. When you open it will give you handle 1. If you are not open previously the camera what happen? Test and error and you will see.

if handle >0 it will call loc_58e3 with 2 parameter first is our handle and second you can see in the code. Result is saved on rsx and if it is not 0 (our old friend SCE_OK) it will return code error. For example try to call close before open and it will return  0x802e0004 aka SCE_CAMERA_ERROR_NOT_OPEN

Easy don't you?

int sceCameraClose(int handle) 0 on success error codes on fail

5) Follow reversing functions. Advice some function are using structures in their parameter so it check if these structures are not NULL and depend of the function check the first 32 bits in these structures it is harcoded on the code so it you can call with a valid chain.data from WebKit and set the correct values on that first 32 bits you can call all the functions described with success.

6) What do you wait to help to open sdk?

sample output from ps4:

https://gist.github.com/psxdev/0aec149948e0dbb3c382

The best is yet to come ;) (greets to Kojima san)





Sunday, 15 February 2015

Reversing PlayStation 4 Camera

I have been working with PlayStation 4 Camera since 2013. So i want to share with you all things learned since then.

First of all, if device has not a public/free driver , you need to make reverse engineering  and you need to look for information about its chipset and make a research about it. So you need to open the device and look for information about its different chips. After making some research we can show the next high level design diagram:


PlayStation 4 Camera is using a propietary connector called AUX, however it is a USB 3 cable so our first goal was to cut off the AUX connector and connect it to  an USB3 male connector, after this we can connect directly to Mac/PC with USB3 female ports.  Next step was to get an USB sniffer capture from PlayStation 4 with a beagle device in the middle, without this we could not have learnt about how to initialize the device and their different options.

Chips description:

  • OV580. It is an asic from Omnivision a typical custom USB bridge solution to manage all other chip. No information or datasheet about it without signing a NDA with Omnivision. Other companies using it are Mantis Vision and LeapMotion. I have worked with others Omnivision USB bridge solutions included in PlayStation EyeToy(OV519) and PlayStation Eye(OV534) so basically it is the same work i made with other drivers for Omnivision.

  • OV9713.  Two cmos sensors well documented with full datasheet available in google.

  • AK5703. An analogical to digital converter connected with an microphone array (4). Datasheet is available.  The datasheet was very helpfull to get audio properly from PlayStation 4 Camera.

  • 4g51A. An eeprom chip. It contains the initial configuration for PlayStation 4 Camera.

When you connect device to a Mac/PC  with  USB3 it  is in boot mode waiting for loading firmware. Analizing sniffer capture we got the firmware and steps needed  to load it  to device. So after loading firmware you have and special UVC Camera device and you can learn about their different streaming modes.

Interface 1 alt setting 0 describe all video modes with these possible options:

  •     mode 0 fps 60(default), 30, 15, 8 video left and video right frames 1280x800

  •     mode 1 fps 120(default), 60, 30, 15, 8 video left and video right frames 640x400

  •     mode 2 fps 240(default), 120, 60, 30 video left and video right frames 320x192

OV580 is delivering in each mode:

  •     mode 0 3448x2x808 bytes frame each row with:
        header 32 bytes
        audio 64 bytes
        video left 1280x2 bytes
        video right 1280x2 bytes
        video interleave 840x2 bytes

  •     mode 1 1748x2x408 bytes frame each row with:
        header 32 bytes
        audio 64 bytes
        video left 640x2 bytes
        video right 640x2 bytes
        video interleave 420x2 bytes
  •     mode 2 898x2x200 bytes frame each row with
        header 32 bytes
        audio 64 bytes
        video left 320x2 bytes
        video right 320x2 bytes
        video interleave 210x2 bytes

Part of Header is showed in the next screenshot:


Part of Audio is showed in the next screenshot:


Audio has 4 channel i use Audicity tool loading a 10 second capture a reproducing 4 audio channels with success.  AK5703 datasheet was very helpfull. An screenshot from audicity tool:

Videl Left and Right can be converted to RGB with CV_YUV2RGB_YUY2 conversion:

cv::Mat yuv(size_y,size_x,CV_8UC2 ,in);
cv::Mat rgb(size_y,size_x,CV_8UC3, out);
 cv::cvtColor(yuv, rgb, CV_YUV2RGB_YUY2);

Video interleave it is also the same video format but it is making a mix of two sensor

A sample application made using basic PS4EYECam driver showing a 640x400 mode for two PlayStation Cameras at the same time:






Low level usb stuff is implemented and available in my repository. EyeLab  is a  poc of multi camera   application using PS4EYECam driver and it is not in the repository,  you don't need to make changes  in the driver to support multi cameras you need to do it at application level.

So after this i can say that PlayStation 4 Camera is full documented and it can be supported on other platforms. All information needed is here and in my repository.

PlayStation 4 receives frames with format explained here. I suppose that secondary processor makes all the job to parse frames(video and audio) and connect with image/audio libraries from sdk(if someone want to share it with me you can contact with me :P).  PlayStation 4 only has 1 AUX port so a multicam solution would be hard to implement like i am doing now in Osx.




Sunday, 21 September 2014

PS4EYECam released

I had released the first public version of PS4EYECam driver.

You can get full information in my PS4EYECam repository

It is the first public driver for PlayStation 4 Camera licensed under gpl.

I have free afternoons availables if someone is interested to offer me a partial job :P

Enjoy and remember the best is yet to come....




Thursday, 28 February 2013

ps3dev builder with Osx Mountain Lion

i have just released a tool to let you build under Osx Mountain Lion:
- Sony binutils and toolchain gcc 4.1.1 for SDK 3.60. Don't ask about how to get SDK 3.60
- ps3dev binutils,toolchain , psl1ght and ps3libraries

More details at:

https://github.com/bigboss-ps3dev/ps3dev-mountain-lion

Enjoy more to come...

Sunday, 27 January 2013

gemlight new libgem sample

New sample available using libgem. It shows how to use PlayStation Move without PlayStation Eye. It is not a graphic sample, you will need your pc/mac listening to show debug messages.

You can get it here

Working now in something for osx's users more to come...



Sunday, 2 October 2011

Eskiss and video output added to gemsample

This weekend KaKaRoToKS released Eskiss with Move support, some parts of gemsaple was added to efl ecore_psl1ght, very cool indeed. Check an enjoy downloading here

Video output is commited now to gemsample in my repo and will be on psl1ght repo soon!!


time to test efl stuff and finish kinect stuff...



Saturday, 24 September 2011

Let's "Move" the Scene

At last good values from sensors :)

I have updated libgem, added libspurs and 2 samples to psl1ght

My repository
https://github.com/bigboss-ps3dev/PSL1GHT

Output from gemsample

Waiting for connection...
Receiving data... (0x00012200/0x00051b90)
Launching...
Loading modules
laod camera module return 0
load gem module return 0
sysSpuInitialize return 0
sysThreadGetId return 0 ppu_thread_id 14500e1
sysThreadGetPriority return 0 ppu_prio 1001
Initializing spurs
Initializing spurs attribute
Setting name prefix
Initializing with attribute
SPURS 5 spu threads availables
SPU Number:0 SPU Thread ID:400100
SPU Number:1 SPU Thread ID:1400100
SPU Number:2 SPU Thread ID:2400100
SPU Number:3 SPU Thread ID:3400100
SPU Number:4 SPU Thread ID:4400100

checking SpursInfo
SpursInfo:
nSpus=5
spuGroupPriority=250
ppuThreadPriority=1000
exitIfNoWork=1
namePrefix=gemsample
SPU Number:0 SPU Thread ID:400100
SPU Number:1 SPU Thread ID:1400100
SPU Number:2 SPU Thread ID:2400100
SPU Number:3 SPU Thread ID:3400100
SPU Number:4 SPU Thread ID:4400100
SPURS initialized correctly!!!
return from GemGetMemorySize 120000 size in bytes needed for move device to init libgem
preparing GemAttribute structure with sprus and memory stuff is very important align correctly spurs structure
calling GemInit with GemAttribute structure version=2 max_connect=1 spurs=40000480 memory_ptr=42100010
return from GemInit 0
GemPrepareCamera return 0 exposure set to 128 and quality to 0.5
GemReset return 0
sysMemContainerCreate() for camera container returned 0
cameraInit() returned 0
Buffer at 00000000
Buffer at 00000000
Buffer at 00000000
Found me an eye, arrr!
cameraOpenEx returned 00000000
Video dimensions: 640x480
Buffer at 30012800
pbuf0 Buffer at 00000000
pbuf0 Buffer at 00000000
camInf.info_ver 101
Setting CameraReadEx 30012800 buffer to cameraInfoex buffer
GemPrepareCamera return 0 exposure set to 128 and quality to 0.5 before cameraStart
lets go!! It's time to look your face in Sony Bravia :P
cameraStart return 0
Move pressed
Cross pressed
X,Y,Z position (mm) 189.509033 -434.033752 1296.131104
accelerometer device coordinates [6.500000,7.700000,103.000000,1.000000]
Cross pressed
X,Y,Z position (mm) 205.927002 -436.941956 1308.244629
accelerometer device coordinates [6.500000,7.700000,103.000000,1.000000]
Cross pressed
X,Y,Z position (mm) 480.563812 -408.114563 1329.933350
accelerometer device coordinates [6.500000,7.700000,103.000000,1.000000]
Cross pressed
X,Y,Z position (mm) 451.881927 -410.955933 1318.307007
accelerometer device coordinates [6.500000,7.700000,103.000000,1.000000]
T pressed value 3
Frame 37710 center of the sphere in world coordinates 225.594498 -426.935089 1311.220947 1.000000
T pressed value 65
Frame 37784 center of the sphere in world coordinates 234.835403 -410.534790 1307.632690 1.000000
T pressed value 56
Frame 37830 center of the sphere in world coordinates 257.285767 -395.657898 1304.284424 1.000000
T pressed value 40
Frame 37870 center of the sphere in world coordinates 184.035355 -413.298737 1293.195068 1.000000
T pressed value 28
Frame 37913 center of the sphere in world coordinates -25.703981 -418.746521 1424.280518 1.000000
T pressed value 34
Frame 37954 center of the sphere in world coordinates -150.024338 -483.764923 1466.980103 1.000000
T pressed value 3
Frame 37996 center of the sphere in world coordinates -139.128952 -504.165009 1442.249023 1.000000
T pressed value 56
Frame 38022 center of the sphere in world coordinates -135.642822 -500.102112 1434.872437 1.000000
T pressed value 6
Frame 38046 center of the sphere in world coordinates -132.609375 -498.069946 1420.702271 1.000000
T pressed value 82
Frame 38091 center of the sphere in world coordinates -118.836090 -498.801636 1414.320679 1.000000
T pressed value 53
Frame 38262 center of the sphere in world coordinates 219.987030 -379.421387 1404.661133 1.000000
T pressed value 10
Frame 38472 center of the sphere in world coordinates 323.159851 -448.891632 1547.447510 1.000000
T pressed value 26
Frame 38831 center of the sphere in world coordinates 522.609131 -434.194733 1562.819214 1.000000
T pressed value 8
Frame 38886 center of the sphere in world coordinates 510.464722 -425.098969 1531.408203 1.000000
Triangle pressed
u [467.616608]
v [243.786667]
r [7.523668]
projectionx [0.274799]
projectiony [-0.007953]
distance [1611.913208]
visible=1 r_valid=1
tiemestamp=1831793693
Triangle pressed
u [374.323914]
v [255.018234]
r [7.731226]
projectionx [0.101714]
projectiony [-0.028791]
distance [1568.638672]
visible=1 r_valid=1
tiemestamp=1834009472
Triangle pressed
u [417.485352]
v [243.696060]
r [7.827722]
projectionx [0.181791]
projectiony [-0.007785]
distance [1549.301392]
visible=1 r_valid=1
tiemestamp=1835225555
Triangle pressed
u [458.676208]
v [247.511475]
r [7.927076]
projectionx [0.258212]
projectiony [-0.014864]
distance [1529.883179]
visible=1 r_valid=1
tiemestamp=1836075268
Triangle pressed
u [475.832306]
v [252.331787]
r [7.865773]
projectionx [0.290041]
projectiony [-0.023807]
distance [1541.806519]
visible=1 r_valid=1
tiemestamp=1836741731
Triangle pressed
u [485.739349]
v [256.604187]
r [7.828753]
projectionx [0.308422]
projectiony [-0.031733]
distance [1549.097290]
visible=1 r_valid=1
tiemestamp=1837424876
Triangle pressed
u [494.324524]
v [259.002686]
r [7.882169]
projectionx [0.324350]
projectiony [-0.036183]
distance [1538.599487]
visible=1 r_valid=1
tiemestamp=1838124604
Triangle pressed
u [505.946564]
v [267.037445]
r [7.904655]
projectionx [0.345912]
projectiony [-0.051090]
distance [1534.222534]
visible=1 r_valid=1
tiemestamp=1838824246
Triangle pressed
u [515.426575]
v [277.453888]
r [7.867825]
projectionx [0.363500]
projectiony [-0.070415]
distance [1541.404663]
visible=1 r_valid=1
tiemestamp=1839690729
Triangle pressed
u [521.867493]
v [291.747559]
r [7.855508]
projectionx [0.375450]
projectiony [-0.096934]
distance [1543.821289]
visible=1 r_valid=1
tiemestamp=1840573715
Triangle pressed
u [523.607788]
v [300.297150]
r [7.867825]
projectionx [0.378679]
projectiony [-0.112796]
distance [1541.404663]
visible=1 r_valid=1
tiemestamp=1841906582
Triangle pressed
u [515.597290]
v [275.254120]
r [7.760409]
projectionx [0.363817]
projectiony [-0.066334]
distance [1562.739868]
visible=1 r_valid=1
tiemestamp=1842589508
Triangle pressed
u [502.364777]
v [261.510590]
r [7.853453]
projectionx [0.339267]
projectiony [-0.040836]
distance [1544.225220]
visible=1 r_valid=1
tiemestamp=1842989369
Triangle pressed
u [460.853729]
v [242.027481]
r [7.995967]
projectionx [0.262252]
projectiony [-0.004689]
distance [1516.702148]
visible=1 r_valid=1
tiemestamp=1843489242
Triangle pressed
u [432.043274]
v [235.523392]
r [8.025161]
projectionx [0.208800]
projectiony [0.007378]
distance [1511.184692]
visible=1 r_valid=1
tiemestamp=1843839141
Triangle pressed
u [406.969330]
v [215.424347]
r [8.167543]
projectionx [0.162281]
projectiony [0.044667]
distance [1484.840576]
visible=1 r_valid=1
tiemestamp=1844322311
Triangle pressed
u [380.524200]
v [214.097504]
r [8.175434]
projectionx [0.113217]
projectiony [0.047129]
distance [1483.407471]
visible=1 r_valid=1
tiemestamp=1844855363
Triangle pressed
u [407.755707]
v [227.469681]
r [8.104139]
projectionx [0.163740]
projectiony [0.022320]
distance [1496.457520]
visible=1 r_valid=1
tiemestamp=1845171952
Triangle pressed
u [441.074799]
v [243.503540]
r [8.030184]
projectionx [0.225556]
projectiony [-0.007428]
distance [1510.239502]
visible=1 r_valid=1
tiemestamp=1845455027
Triangle pressed
u [471.704102]
v [261.234985]
r [7.781185]
projectionx [0.282382]
projectiony [-0.040325]
distance [1558.567261]
visible=1 r_valid=1
tiemestamp=1845804868
Triangle pressed
u [493.436279]
v [285.374908]
r [7.687237]
projectionx [0.322702]
projectiony [-0.085111]
distance [1577.614990]
visible=1 r_valid=1
tiemestamp=1846371549
Triangle pressed
u [481.684326]
v [268.126495]
r [7.666198]
projectionx [0.300899]
projectiony [-0.053110]
distance [1581.944580]
visible=1 r_valid=1
tiemestamp=1847037968
Triangle pressed
u [451.177032]
v [236.552795]
r [7.835966]
projectionx [0.244299]
projectiony [0.005468]
distance [1547.671387]
visible=1 r_valid=1
tiemestamp=1847870924
Triangle pressed
u [439.619263]
v [226.912308]
r [7.913836]
projectionx [0.222856]
projectiony [0.023354]
distance [1532.442749]
visible=1 r_valid=1
tiemestamp=1848687293
Triangle pressed
u [431.101837]
v [226.425247]
r [7.954504]
projectionx [0.207053]
projectiony [0.024257]
distance [1524.608154]
visible=1 r_valid=1
tiemestamp=1849287046
Triangle pressed
u [415.781769]
v [230.620239]
r [8.017118]
projectionx [0.178630]
projectiony [0.016475]
distance [1512.700684]
visible=1 r_valid=1
tiemestamp=1849953468
Triangle pressed
u [396.752502]
v [239.167206]
r [8.079232]
projectionx [0.143326]
projectiony [0.000617]
distance [1501.070923]
visible=1 r_valid=1
tiemestamp=1850886468
Triangle pressed
u [439.451355]
v [247.016159]
r [8.085217]
projectionx [0.222544]
projectiony [-0.013945]
distance [1499.959961]
visible=1 r_valid=1
tiemestamp=1851619412
Triangle pressed
u [449.005798]
v [250.121674]
r [8.072244]
projectionx [0.240270]
projectiony [-0.019706]
distance [1502.370483]
visible=1 r_valid=1
tiemestamp=1852535657
Triangle pressed
u [426.747223]
v [241.951523]
r [8.129959]
projectionx [0.198974]
projectiony [-0.004548]
distance [1491.704956]
visible=1 r_valid=1
tiemestamp=1853435393
Triangle pressed
u [417.064728]
v [235.196320]
r [8.006046]
projectionx [0.181011]
projectiony [0.007985]
distance [1514.792725]
visible=1 r_valid=1
tiemestamp=1854118583
Triangle pressed
u [431.997528]
v [245.086334]
r [8.540620]
projectionx [0.208715]
projectiony [-0.010364]
distance [1419.979004]
visible=1 r_valid=1
tiemestamp=1854701741
Triangle pressed
u [441.774719]
v [259.114746]
r [8.790345]
projectionx [0.226855]
projectiony [-0.036391]
distance [1379.638672]
visible=1 r_valid=1
tiemestamp=1855251396
Triangle pressed
u [446.370483]
v [267.522522]
r [9.159265]
projectionx [0.235381]
projectiony [-0.051990]
distance [1324.069214]
visible=1 r_valid=1
tiemestamp=1855701256
Triangle pressed
u [445.791107]
v [279.648895]
r [9.489860]
projectionx [0.234306]
projectiony [-0.074488]
distance [1277.943115]
visible=1 r_valid=1
tiemestamp=1856167655
Triangle pressed
u [442.675964]
v [279.683411]
r [9.940524]
projectionx [0.228527]
projectiony [-0.074552]
distance [1220.006104]
visible=1 r_valid=1
tiemestamp=1856684264
Triangle pressed
u [427.323761]
v [287.231140]
r [10.420423]
projectionx [0.200044]
projectiony [-0.088555]
distance [1163.820435]
visible=1 r_valid=1
tiemestamp=1857200662
Triangle pressed
u [413.394775]
v [295.300568]
r [10.901438]
projectionx [0.174202]
projectiony [-0.103526]
distance [1112.468018]
visible=1 r_valid=1
tiemestamp=1857817071
Triangle pressed
u [422.021118]
v [291.990326]
r [10.733618]
projectionx [0.190206]
projectiony [-0.097385]
distance [1129.861328]
visible=1 r_valid=1
tiemestamp=1858116898
Triangle pressed
u [434.123077]
v [283.060028]
r [10.246875]
projectionx [0.212659]
projectiony [-0.080816]
distance [1183.531616]
visible=1 r_valid=1
tiemestamp=1858400227
Triangle pressed
u [443.127686]
v [282.977173]
r [9.432184]
projectionx [0.229365]
projectiony [-0.080663]
distance [1285.757446]
visible=1 r_valid=1
tiemestamp=1858683554
Triangle pressed
u [447.493805]
v [285.821014]
r [8.890385]
projectionx [0.237465]
projectiony [-0.085939]
distance [1364.114258]
visible=1 r_valid=1
tiemestamp=1858916672
Triangle pressed
u [447.327820]
v [279.390198]
r [7.987894]
projectionx [0.237157]
projectiony [-0.074008]
distance [1518.235107]
visible=1 r_valid=1
tiemestamp=1859366488
Triangle pressed
u [446.239929]
v [278.633667]
r [7.527963]
projectionx [0.235139]
projectiony [-0.072604]
distance [1610.993652]
visible=1 r_valid=1
tiemestamp=1859683058
Triangle pressed
u [447.631439]
v [277.551575]
r [7.298936]
projectionx [0.237721]
projectiony [-0.070597]
distance [1661.543579]
visible=1 r_valid=1
tiemestamp=1859949639
Triangle pressed
u [447.413574]
v [274.575653]
r [6.932533]
projectionx [0.237316]
projectiony [-0.065075]
distance [1749.360596]
visible=1 r_valid=1
tiemestamp=1860232971
Triangle pressed
u [447.619263]
v [271.980255]
r [6.581963]
projectionx [0.237698]
projectiony [-0.060260]
distance [1842.535645]
visible=1 r_valid=1
tiemestamp=1860566060
Triangle pressed
u [446.398590]
v [269.859192]
r [6.447278]
projectionx [0.235433]
projectiony [-0.056325]
distance [1881.026611]
visible=1 r_valid=1
tiemestamp=1860782653
Triangle pressed
u [448.356293]
v [269.602325]
r [6.319905]
projectionx [0.239065]
projectiony [-0.055848]
distance [1918.937134]
visible=1 r_valid=1
tiemestamp=1861082429
Triangle pressed
u [447.650391]
v [266.737183]
r [6.123670]
projectionx [0.237756]
projectiony [-0.050533]
distance [1980.430176]
visible=1 r_valid=1
tiemestamp=1861415768
Unloading modules
unload gem module return 0
unload camera module return 0

more to come....

Sunday, 21 August 2011

kinect psl1ght video stream done

:) video rgb output streaming on my Bravia. Stream for video endpoint done.
Next i need to fix depth endpoint don't get valid frames by now...

Kinect Driver for PlayStation 3
Copyright (C) 2010,2011 Antonio José Ramos Márquez aka bigboss
Creating a send_sema semaforo...
Creating a send_cmd mutex...
Mutex 2231383040 is created.
initializing event queue attr
Event queue created with id=(0x000000008D003500)
Function name kinectSetNotifyEventQueue
event port created with id 234894848
event port connected to queue
Function name kinect_probe dev_id=33
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_MOTOR idProduct b002
Function name kinect_attach dev_id=33
Getting device descriptor
Function name nuimotor_attach dev_id=33
Kinect NUI_MOTOR detected
Getting configuration descriptor
Number of interfaces 1
Getting interface descriptor
Verifying number of endpoints
Getting control endpoint descriptor for NUI_MOTOR 0
tryng to open control endpoint 0
Function name nuimotor_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Registering kinect driver return (0)
Function name nuimotor_control_done result=0x0 count=0 arg=0x0
Function name nuimotor_control_transfer step=1 arg=0
Function name nuimotor_control_transfer step=2 arg=0
init motor
Sending event NUIMOTOR_READY
Function name nuimotor_control_done result=0x0 count=1 arg=0x2
Received event NUIMOTOR_READY now it's time to angle and led settings
Function name kinectSetTiltDegs
NUIMOTOR angle received to 0
NUIMOTOR angle set to 0
Function name nuimotor_control_transfer step=3 arg=0
set angle
kinectSetTiltDegs return 0
Function name kinectSetLed
Function name nuimotor_control_transfer step=4 arg=1
Function name nuimotor_control_done result=0x0 count=0 arg=0x3
set led
motor ready time to camera and audio sending NUIMOTOR_ENABLED
kinectSetLed return 0
Function name nuimotor_control_done result=0x0 count=0 arg=0x4
Nuimotor initialized set angle and led set to red done...
Function name kinect_probe dev_id=34
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_AUDIO idProduct ad02
Function name kinect_attach dev_id=34
Getting device descriptor
Function name nuiaudio_attach dev_id=34
Kinect NUI_AUDIO detected
Getting configuration descriptor
Verifying number of endpoints 4
Getting control endpoint descriptor for NUI_AUDIO 1
Function name nuiaudio_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name nuiaudio_control_done result=0x0 count=0 arg=0x0
Function name nuiaudio_control_transfer step=1 arg=0
Set Interface (bInterfaceNumber=0, bAlternateSetting=0)
Sending event NUIAUDIO_READY
Received event NUIAUDIO_READY TODO audio initialization and isoc stuff
Function name kinect_probe dev_id=35
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_CAMERA idProduct ae02
Function name kinect_attach dev_id=35
Getting device descriptor
Function name nuicamera_attach dev_id=35
Kinect NUI_CAMERA detected
Getting configuration descriptor
Verifying number of endpoints 2
Getting control endpoint descriptor for NUI_CAMERA 2
Verifying endpoint 129
Found video camera endpoint 129
Getting endpoint for NUI_CAMERA color pipe_id3
Verifying endpoint 130
Found depth camera endpoint 130
Getting endpoint for NUI_CAMERA depth pipe_id 4
Function name nuicamera_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name nuicamera_control_done result=0x0 count=0 arg=0x0
Function name nuicamera_control_transfer step=1 arg=0
Sending event NUICAMERA_READY
Received event NUICAMERA_READY
Function name kinect_find_video_mode
Function name kinectSetVideoMode
Function name kinect_find_depth_mode
Function name kinectSetDepthMode
Function name kinect_find_video_mode
Function name kinect_find_depth_mode
local rgb buffer 50000420
local depth buffer 52100870
Function name kinectSetVideoBuffer buf=50000420
Function name stream_setbuf
Function name kinectSetDepthBuffer buf=52100870
Function name stream_setbuf
Unhandled event: 00000122
startdepth
Function name kinectStartDepth
Function name kinect_find_depth_mode
Function name kinect_find_depth_mode
Function name stream_init
framesize 422400 last_pkt_size 1132 pkt_size 1748
Function name write_register reg=0105 <= data=00
Write Reg 0x0105 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0000 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0105 <= 0x00
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad len 0001 != 0006
send_cmd return FFFFFFFF
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x00
Function name write_register reg=0012 <= data=03
Write Reg 0x0012 <= 0x03
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0002 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0012 <= 0x03
Function name write_register reg=0013 <= data=01
Write Reg 0x0013 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0003 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0013 <= 0x01
Function name write_register reg=0014 <= data=1e
Write Reg 0x0014 <= 0x1e
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0004 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0014 <= 0x1e
Function name write_register reg=0006 <= data=02
Write Reg 0x0006 <= 0x02
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x02
Function name read_register reg=0006
Read Reg 0x0006 =>
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0002 tag=0006 len=0002: 0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=22 arg=0x1
Function name setCount count=22 result=0
Function name getCount
actual_len 22
send_cmd: Bad cmd 300 != 200
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0002 tag=0006 len=0002: 0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x1
Function name setCount count=12 result=0
Function name getCount
actual_len 12
send_cmd return 4
Read Reg 0x0006 => 0x100
Function name write_register reg=0017 <= data=00
Write Reg 0x0017 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0017 <= 0x00
Function name kinectStartVideo
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
Function name kinect_find_video_mode
Function name stream_init
framesize 614400 last_pkt_size 24 pkt_size 1908
Function name write_register reg=000c <= data=05
Write Reg 0x000c <= 0x05
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad tag 0700 != 0800
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x000c <= 0x05
Function name write_register reg=000d <= data=01
Write Reg 0x000d <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x000d <= 0x01
Function name write_register reg=000e <= data=0f
Write Reg 0x000e <= 0x0f
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000a len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x000e <= 0x0f
Function name write_register reg=0005 <= data=01
Write Reg 0x0005 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000b len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000b len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0005 <= 0x01
Function name write_register reg=0047 <= data=00
Write Reg 0x0047 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000c len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0b00 != 0c00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000c len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0047 <= 0x00
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 1 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 3d3ea7f2
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 11 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 2 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 46c5b40a
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
usb_transfer depth enabled
usb_transfer depth enabled
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 3 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 54d34c47
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 51 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 52 packets in buf (323 total), resyncing...
[Stream 70] Inconsistent flag 82 with 7 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 4 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 5a4dc008
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 10 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 5 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 5e5a585f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 2 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 6 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 676770a9
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 7 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 6c2af6b5
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 8 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 712b76a8
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 9 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 75eefcb4
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 10 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 7fb302b3
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 11 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 88832116
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 12 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 8d46a722
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 11 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 13 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 92472715
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 2 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 13 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 14 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 9b174578
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 50 packets in buf (323 total), resyncing...
fram_size 614400 valid_frames 15 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 9fdacb84
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 16 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS a4db4b77
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 50 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 51 packets in buf (323 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 17 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS a99ed183
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 18 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS ae62578f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 19 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS b2abe9cd
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 20 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS b76f6fd9
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 14 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 21 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS c5400e2f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 22 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS ca7d8809
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 52 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 53 packets in buf (323 total), resyncing...
Function name kinectStopDepth
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000d len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0c00 != 0d00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000d len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x00
Function name stream_freebufs
Function name kinectStopVideo
Function name write_register reg=0005 <= data=00
Write Reg 0x0005 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0d00 != 0e00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad len 0001 != 0006
send_cmd return FFFFFFFF
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0005 <= 0x00
Function name stream_freebufs
Exiting for real.


more to come...


Monday, 15 August 2011

kinect psl1ght work in progress

nuimotor: i can move it, get tilt status, set led, all fine. One only control endpoint.
nuicamera: i can write and read commands using control endpoint some command to start video and depth sometimes fail i must implement retry for write_register and send_cmd stuff. Two additional endpoints enabled for depth and video.Next step will be learn to parsing streams. I must rewrite some stuff for isoc stream and processing packets.
nuiaudio: 1 control endpoint and four exta endpoint detected. Todo almost everything for audio, i have some code from eyetoy in ps2 perhaps i can port it.

Output from actual sample driver code using psl1ght. Libfreenect was a good start point however usb stuff is something different in PlayStation:

PS3Load v0.1
Waiting for connection...
Receiving data... (0x00010687/0x00041d60)
Launching...
Initializing pad...
Function name kinectInit
Kinect Driver for PlayStation 3
Copyright (C) 2010,2011 Antonio José Ramos Márquez aka bigboss
Creating a send_sema semaforo...
Creating a send_cmd mutex...
Mutex 2231383040 is created.
initializing event queue attr
Event queue created with id=(0x000000008D003500)
Function name kinectSetNotifyEventQueue
event port created with id 234894848
event port connected to queue
Function name kinect_probe dev_id=4
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_MOTOR idProduct b002
Function name kinect_attach dev_id=4
Getting device descriptor
Function name nuimotor_attach dev_id=4
Kinect NUI_MOTOR detected
Getting configuration descriptor
Number of interfaces 1
Getting interface descriptor
Verifying number of endpoints
Getting control endpoint descriptor for NUI_MOTOR 0
tryng to open control endpoint 0
Function name nuimotor_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name kinect_probe dev_id=12
USB device probe for kinect getting device descriptor
init motor
Getting endpoint for NUI_CAMERA depth pipe_id 4
Function name nuicamera_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Registering kinect driver return (0)
Sending event NUICAMERA_READY
Function name kinectSetTiltDegs
NUIMOTOR angle received to 20
NUIMOTOR angle set to 40
Function name nuimotor_control_transfer step=3 arg=40
set angle
kinectSetTiltDegs return 0
Function name kinectSetLed
Function name nuimotor_control_transfer step=4 arg=1
set led
motor ready time to camera and audio sending NUIMOTOR_ENABLED
kinectSetLed return 0
Function name kinectUpdateTiltState
Sending event NUIAUDIO_READY
updating tilt state
kinectUpdateTiltState return 0
Function name nuimotor_control_done result=0x0 count=0 arg=0x3
Function name kinectGetTiltStatus
tilt status=0
Function name kinectGetTiltDegs
Function name nuimotor_control_done result=0x0 count=0 arg=0x4
Function name kinectGetMksAccel
Received event NUICAMERA_READY
Nuimotor initialized set angle and led set to red done...
Function name kinect_find_video_mode
Function name nuimotor_control_done result=0x0 count=10 arg=0x5
Function name kinect_find_depth_mode
Function name kinectSetDepthMode
Function name kinect_find_video_mode
local rgb buffer 50000830
Function name kinectSetVideoBuffer buf=50000830
Function name stream_setbuf
Received event NUIAUDIO_READY TODO audio initialization and isoc stuff
Function name kinectStartDepth
Function name kinect_find_depth_mode
Function name kinect_find_depth_mode
Function name stream_init
Function name usb_transfer type=1
Function name write_register reg=0105 <= data=00
Write Reg 0x0105 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0000 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0012 <= data=03
Write Reg 0x0012 <= 0x03
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0002 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0013 <= data=01
Write Reg 0x0013 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0003 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Control cmd=0003 tag=0004 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0006 <= data=02
Write Reg 0x0006 <= 0x02
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
send_cmd returned 0 [0000 f000], 0000 expected
Function name write_register reg=0017 <= data=00
Write Reg 0x0017 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name kinectStartVideo
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
Function name kinect_find_video_mode
Function name stream_init
Function name usb_transfer type=0
Function name write_register reg=000c <= data=05
Write Reg 0x000c <= 0x05
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0006 len=0004: 0
Function name stream_done type=0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad tag 0500 != 0600
send_cmd return FFFFFFFF
Function name write_register reg=000d <= data=01
Write Reg 0x000d <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0006 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=000e <= data=0f
Write Reg 0x000e <= 0x0f
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0005 <= data=01
Write Reg 0x0005 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
send_cmd returned 0 [0000 f000], 0000 expected
Function name write_register reg=0047 <= data=00
Write Reg 0x0047 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name kinectStopDepth
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0800 != 0900
send_cmd return FFFFFFFF
Function name stream_freebufs
Function name kinectStopVideo
Function name write_register reg=0005 <= data=00
Write Reg 0x0005 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name stream_freebufs
Exiting for real.


more to come

Wednesday, 10 August 2011

usbd at last

Finally i got usbd stuff running fine on PSL1GHT, so next step will be refactory my kinect sprx module and port it to PSL1GHT.

Time to code.

credits must go to an0nym0u5 https://github.com/an0nym0u5/PSL1GHT

Saturday, 23 April 2011

Move.me code repository

Pc side is public now, you can get it at:

http://code.google.com/p/moveme/

PS3 side i believe that it is in closed beta by now on PSN.

More to come.

Wednesday, 2 March 2011

Move.me

Expect libgem improve soon... :P
Move.me

Sunday, 16 January 2011

gemtest sample for libgem

Today i have updated toochain,psl1ght and ps3libraries on my mac included nvidia shader stuff. A busy day xD.


After Matthew Parlane libgem commit there is no reason to add a sample for libgem in my repository and send to official psl1ght repo.

my repo:

https://github.com/bigboss-ps3dev/PSL1GHT

check https://github.com/HACKERCHANNEL/PSL1GHT when they accept changes.

Sample need PlayStation Eye and PlayStation Move.

It will track gyroscope sensor y axis and x axis and it will move camera frame with your Move device.

Saturday, 15 January 2011

Firmware 3.55, psl1ght and libgem

Today i have been working on samples for libgem for psl1ght.

ps3load with udp debug support shows that it crash on sysProcessExitSpawn2, i tried including npDrmProcessExitSpawn2 from npdrm lib instead on psl1ght but with no success. You can upload self signed elf but it will return to xmb after call sysProcessExitSpawn2 or npDrmProcessExitSpawn2 by now...

Instead of install stuff from usb, i am uploading EBOOT.BIN in a USRDIR previously installed on ps3 in a prepared package, it's quicker than make pkg put on usb and install it on PS3 3.55.



About libgem it has now:

- calibrating support, Move get a hue colour and it's internally calibrated. You point directly to PlayStation Eye press Move button and it's automatically calibrated passing for all status flags.
- All move buttons(cross, circle, triangle,square, select, start, move and trigger with analog pressure) supported with readGemPad function with internal state like some libpad examples released in the past, it's good to use it for menu selections or whatever stuff that need it.
- Gyroscope on y and x axis,move xmb control like. Understand which is y and x and when it's positive or negative was fun and moving camera frame using this effect :P.
- debugPrintf function over udp for samples in 3.55 firmware

more to come...

Tuesday, 7 December 2010

PlayStation Move is here...

Move with psl1ght work in progress , right now tryng to understand GemState variables to make cool things. Device is fully working and calibrating and hue tracking is right.

PS3Load v0.1
Waiting for connection...
Receiving data... (0x0000979e/0x00051bd0)
Launching...
Loading modules
camera module load return 0
gem module load return 0
Register callback return 0
lv2MemContinerCreate() returned 0
init screen
return from GemGetMemorySize 120000 size in bytes needed for move device to init libgem
lv2MemContinerCreate() for memory usage needed in libgem returned 0
preparing GemAttribute structure with sprus and memory stuff
calling GemInit with GemAttribute structure version=2 max_connect=1 spurs=D000FC20 memory_ptr=3F000004
return from GemInit 0
GemPrepareCamera return 0 exposure set to 400 and quality to 0.8
GemReset retunr 0
init pad
cameraInit() returned 0
Found me an eye, arrr!
cameraOpenEx returned 00000000
Video dimensions: 640x480
Buffer at 30015000
Set readCameraInfoEx data structure needed for Move hue tracking
Preparing GemVideoConvert structure by now i am not going to use it so output_format set to 1
GemPrepareVideoConvert return 0
GemPrepareCamera return 0 exposure set to 400 and quality to 0.8 before cameraStart
lets go!! look your face in Sony Bravia
GemGetState return 2
first calibrate device
GemCalibrate return 0
Calibrating is in proccess...
GemGetState return 5
Second set a hue value to track or let Sony choose for you :P
GemTrackHues return 0
Yeah Move it's running fine, light on!!!!!
GemGetState return 0
center of the sphere in world coordinates -30.902700 -64.770447 241.581284 1.000000
sphere velocity 0.000000 0.000000 0.000000 0.000000 mm/s
sphere acceleration 0.000000 0.000000 0.000000 0.000000 mm/s^2
device orientation in world coordinates 0.084998 0.124090 -0.144880 0.977950 radians/s
device angular velocity in world coordinates 0.000000 0.000000 0.000000 0.000000 radians/s^2
position player's hand in world coordinates -0.069252 -80.036690 339.186462 1.000000 mm
velocity player's hand in world coordinates 0.000000 0.000000 0.000000 0.000000 mm/s^
acceleration player's hand in world coordinates 0.000000 0.000000 0.000000 0.000000 mm/s^2
timestamp 1683306414
sensor temperature 0.000000
camera pitch angle 0.000000
tracking flag 0
before GemEnd
return from GemEnd 0
Exiting for real.

ugly captures with my old iphone:


Sunday, 28 November 2010

Kinect driver for PlayStation 3

Well last weekend i bought a Microsoft Kinect device, today i had free time to make things happens...

First PlayStation 3 only see a NUIMOTOR device. After NUIMOTOR is correctly initialized, NUICAMERA and NUIAUDIO are shown and i can detect and control them, OpenKinect documentation about devices and protocols was very helpfull.

NUICAMERA has 2 isoc endpoints one for rgb and other for depth. Stuff is similar to my old eyetoy driver isoc frames and then parsing them to get real frames for user process and i believe that i can use my old eyetoy code with this.

Now i need only TIME to play with the new toy.....

Output from ugly and unfinished kinect sample driver:


PS3Load v0.1
Waiting for connection...
Receiving data... (0x0000cd83/0x0003da11)
Receiving arguments... 0x0000000d
Launching...
Sample Kinect Driver for PlayStation 3 Antonio José Ramos Márquez aka bigboss
Registering kinect driver return 0
kinect_probe:: dev_id=11
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_MOTOR idProduct b002
kinect_attach:: dev_id=11
Getting device descriptor
nuimotor_attach:: dev_id=11
Kinect NUI_MOTOR detected
Getting configuration descriptor
Number of interfaces 1
Getting interface descriptor
Verifying number of endpoints
Getting control endpoint descriptor for NUI_MOTOR 0
tryng to open control endpoint 0
nuimotor_control_transfer:: param0=0 param1=1
Set Configuration (bConfigurationValue=1)
nuimotor_control_done:: result=0x0 count=0 arg=0
nuimotor_control_transfer:: param0=1 param1=0
Set Interface (bInterfaceNumber=0, bAlternateSetting=0)
nuimotor_control_done:: result=0x50 count=0 arg=1
result=0x50 count=0 arg=1
nuimotor_control_transfer:: param0=2 param1=0
Sending event NUIMOTOR_READY
Received event NUIMOTOR_READY now it's time to angle and led settings
nuimotor_control_transfer:: param0=3 param1=0
init motor
nuimotor_control_done:: result=0x0 count=1 arg=3
nuimotor_control_transfer:: param0=4 param1=0
set angle
nuimotor_control_done:: result=0x0 count=0 arg=4
nuimotor_control_transfer:: param0=5 param1=0
set led
nuimotor_control_done:: result=0x0 count=0 arg=5
nuimotor_control_transfer:: param0=6 param1=0
motor ready time to camera and audio sending NUIMOTOR_ENABLED
Nuimotor initialized set angle and led to red done tryng to see if other devices are already availables
kinect_probe:: dev_id=12
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_AUDIO idProduct ad02
kinect_attach:: dev_id=12
Getting device descriptor
nuiaudio_attach:: dev_id=12
Kinect NUI_AUDIO detected
Getting configuration descriptor
Verifying number of endpoints 4
Getting control endpoint descriptor for NUI_AUDIO 1
nuiaudio_control_transfer:: param0=0 param1=1
Set Configuration (bConfigurationValue=1)
nuiaudio_control_done:: result=0x0 count=0 arg=0
nuiaudio_control_transfer:: param0=1 param1=0
Set Interface (bInterfaceNumber=0, bAlternateSetting=0)
nuiaudio_control_done:: result=0x50 count=0 arg=1
result=0x50 count=0 arg=1
nuiaudio_control_transfer:: param0=2 param1=0
Sending event NUIAUDIO_READY
Received event NUIAUDIO_READY TODO audio initialization and isoc stuff
kinect_probe:: dev_id=13
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_CAMERA idProduct ae02
kinect_attach:: dev_id=13
Getting device descriptor
nuicamera_attach:: dev_id=13
Kinect NUI_CAMERA detected
Getting configuration descriptor
Verifying number of endpoints 2
Getting control endpoint descriptor for NUI_CAMERA 2
nuicamera_control_transfer:: param0=0 param1=1
Set Configuration (bConfigurationValue=1)
nuicamera_control_done:: result=0x0 count=0 arg=0
nuicamera_control_transfer:: param0=1 param1=0
Set Interface (bInterfaceNumber=0, bAlternateSetting=0)
nuicamera_control_done:: result=0x50 count=0 arg=1
result=0x50 count=0 arg=1
nuicamera_control_transfer:: param0=2 param1=0
Sending event NUICAMERA_READY
Received event NUICAMERA_READY TODO camera initialization and isoc stuff
kinect_detach:: dev_id=12
nuiaudio_detach:: dev_id=12
Sending event NUIAUDIO_DETACH
kinect_detach:: dev_id=11
nuimotor_detach:: dev_id=11
Sending event NUIMOTOR_DETACH
kinect_detach:: dev_id=13
nuicamera_detach:: dev_id=13
Sending event NUICAMERA_DETACH
Event received NUIAUDIO_DETACH
Event received NUIMOTOR_DETACH
Event received NUICAMERA_DETACH
time to go to XMB and unregister kinect driver...

Sunday, 14 November 2010

Work in progress :P

Porting old playstation stuff to PSL1GHT



more to come...

Friday, 12 November 2010

PSL1GHT with Eye and EyeToy support

Matthew Parlane(Thank you for your explanation about nfid :P) made the real job, i only add EyeToy support in camera sample.


In the other hand, marcan made kinect open source driver (GRANDE marcan!!!!), ummm a port for PSL1GHT? perhaps i need more free time

you can get my changes at https://github.com/bigboss-ps3dev/PSL1GHT

Monday, 8 November 2010

libcairo, thread and mutex support for PSL1GHT

This weekend was fun, making cool things with libcairo and thread.

Now it's time to usb stack and eyetoy and eye things :)