Chotto Cam accessing
Chotto Cam accessing
Hi everyone,
I am pretty new to psp homebrew programming (although I am not new to programming in itself).
A week ago, I at last recieved this tiny USB Chotto Camera for PSP straight from Japan. I have been waiting for ages for this camera to be released, as my main interest in psp homebrew is videocam-related (tracking, augmented reality, and so on...).
BUT, before I get round to all these interested things, first of all, I need to be able to access/read this damn USB device.
I've been searching the forums and haven't found anything about the camera itself, and very little information about accessing the usb port...
I know the commercial Chotto shot Edit UMD require usbcam.prx and usbmic.prx to access the device, so maybe using calls to the usbcam.prx could be a way (instead of merely reprogramming a camera driver), but this prx would require to know what, where and how to access these calls... and I unfortunately don't have the faintest idea how to that.
Anyone here have any idea? clue?
Thx very much in advance.
Yours sincerily,
sashimi
ps: if this topic is best in the software development section, then please let it be.
I am pretty new to psp homebrew programming (although I am not new to programming in itself).
A week ago, I at last recieved this tiny USB Chotto Camera for PSP straight from Japan. I have been waiting for ages for this camera to be released, as my main interest in psp homebrew is videocam-related (tracking, augmented reality, and so on...).
BUT, before I get round to all these interested things, first of all, I need to be able to access/read this damn USB device.
I've been searching the forums and haven't found anything about the camera itself, and very little information about accessing the usb port...
I know the commercial Chotto shot Edit UMD require usbcam.prx and usbmic.prx to access the device, so maybe using calls to the usbcam.prx could be a way (instead of merely reprogramming a camera driver), but this prx would require to know what, where and how to access these calls... and I unfortunately don't have the faintest idea how to that.
Anyone here have any idea? clue?
Thx very much in advance.
Yours sincerily,
sashimi
ps: if this topic is best in the software development section, then please let it be.
Okay, I looked a little into camera_plugin.prx from FW3.01 and BOOT.BIN from Chotto Edit, and there is a nice set of APIs to call for the camera to work :)
There are two modes for picture input, which require different API sets:
- still picture
- video
Furthermore there are APIs to get the sound with the integrated microphone.
As I don't have a Chotto Cam, it is impossible for me to test out what I disassemble...
So... How does it work? Well, first you have to initialize the camera. This is done very trivially, as one does not need to do much: just load the usb driver modules and start them. :) Assuming usbacc.prx and usbcam.prx are loaded by your app, these are the steps you need to do to enable the camera: (add error checking and other stuff on ret != 0)
At the end of your app you will also need to stop the drivers, so just take the above calls and replace sceUsbStart by sceUsbStop...
Now the camera should be initialized, which is quite good.
I haven't yet looked in detail into the video part, because it takes some setup for codecs etc, but I think this is the way it works for the still pictures:
1) allocate memory buffer of something like 2097152 bytes (what it does in the camera_plugin.prx). It allocates it in a weird way, by using 64 byte clusters(?)
2) Then, call the function for getting the image with the buffer address as the parameter and buffer size divided by 64 as the second one...
3) Finally, wait for the image input to be finished with the waitinputend function. Add the error checking as usual.... (/me waaay too lazy to do that)
These functions should be imported with the stubs generated by the various tools provided in the pspsdk (psplink --stubs :P)...
Now, a last "Post Mortem"... There are only preliminary finds in the ORDER of the functions to call, but there might be some more initialization necessary earlier on in the application. I'll try to track down the still image capture from the module_start, in order to get the inits right.
About the movies and sound, I haven't figures all of the things out but this is the set of functions to call, in some definite order and arguments which i didn't figure out yet:
Sorry for the imprecise info, but I'd just need a bit more time and a little confirmation/infirmation about the still image capture before going on :)
Cheers,
Adrahil
There are two modes for picture input, which require different API sets:
- still picture
- video
Furthermore there are APIs to get the sound with the integrated microphone.
As I don't have a Chotto Cam, it is impossible for me to test out what I disassemble...
So... How does it work? Well, first you have to initialize the camera. This is done very trivially, as one does not need to do much: just load the usb driver modules and start them. :) Assuming usbacc.prx and usbcam.prx are loaded by your app, these are the steps you need to do to enable the camera: (add error checking and other stuff on ret != 0)
Code: Select all
sceUsbStart("USBBusDriver", 0, 0);
sceUsbStart("USBAccBaseDriver", 0, 0);
sceUsbStart("USBCamDriver", 0, 0);
sceUsbStart("USBCamMicDriver", 0, 0);
Now the camera should be initialized, which is quite good.
I haven't yet looked in detail into the video part, because it takes some setup for codecs etc, but I think this is the way it works for the still pictures:
1) allocate memory buffer of something like 2097152 bytes (what it does in the camera_plugin.prx). It allocates it in a weird way, by using 64 byte clusters(?)
2) Then, call the function for getting the image with the buffer address as the parameter and buffer size divided by 64 as the second one...
3) Finally, wait for the image input to be finished with the waitinputend function. Add the error checking as usual.... (/me waaay too lazy to do that)
Code: Select all
//sceUsbCamStillInput
//(second param to confirm...)
int sceUsbCam_FB0A6C5D(void* buffer, int buffer_64k_size);
//sceUsbCamStillWaitInputEnd
int sceUsbCam_7563AFA1(void);
Now, a last "Post Mortem"... There are only preliminary finds in the ORDER of the functions to call, but there might be some more initialization necessary earlier on in the application. I'll try to track down the still image capture from the module_start, in order to get the inits right.
About the movies and sound, I haven't figures all of the things out but this is the set of functions to call, in some definite order and arguments which i didn't figure out yet:
Code: Select all
sceUsbCam_CFE9E999 //microphone codec and buffer init.
sceUsbCam_2E930264 //video codec and buffer init.
sceUsbCam_1D686870 //int sceUsbCamSetEvLevel(int EvLevel);
sceUsbCam_574A8C3F //sceUsbCamStartVideo
sceUsbCam_82A64030 //sceUsbCamStartMic
sceUsbCam_4C34F553 //sceUsbCamGetLensDirection
sceUsbCam_D293A100 //sceUsbCamRegisterLensRotationCallback
sceUsbCam_C484901F //sceUsbCamSetZoom
sceUsbCam_3DC0088E //sceUsbCamReadMic
sceUsbCam_99D86281 //sceUsbCamReadVideoFrame
sceUsbCam_B048A67D //sceUsbCamWaitReadMicEnd
sceUsbCam_F90B2293 //sceUsbCamWaitReadVideoFrameEnd
sceUsbCam_41EE8797 //sceUsbCamUnregisterLensRotationCallback
sceUsbCam_6CF32CB9 //sceUsbCamStopVideo
sceUsbCam_5145868A //sceUsbCamStopMic
Cheers,
Adrahil
Hi!
I am definitively thrilled to find someone working on it (at last :) ).
I have got plenty of work meanwhile, I won't be able to take a dip into this for a little while, but if ever you want me to test some code, I'd be very happy to help, as I have got the chotto cam.
I'll be waiting for some news from you :p
Thank you very much for your work!
faithfully,
sashimi
I am definitively thrilled to find someone working on it (at last :) ).
I have got plenty of work meanwhile, I won't be able to take a dip into this for a little while, but if ever you want me to test some code, I'd be very happy to help, as I have got the chotto cam.
I'll be waiting for some news from you :p
Thank you very much for your work!
faithfully,
sashimi
*BUMP*
I was looking into the camera api calls myself and found this nifty bit of information. HTH. please let me know if you make any progress with this and I will post my findings as well..
http://moonlight.lan.st/2.80/kd/usbcam.html
I was looking into the camera api calls myself and found this nifty bit of information. HTH. please let me know if you make any progress with this and I will post my findings as well..
http://moonlight.lan.st/2.80/kd/usbcam.html
*bump again*
Any update about accessing the chotto cam ?
I feel very frustrated about the lack of interest about the camera, coz a bunch of projects I have in mind involve video input :/
Please, could anyone with reverse engineering skills out there take a look at 3.40 usbcam.prx and usbacc.prx?
Thx very much in advance!
Cheers
Any update about accessing the chotto cam ?
I feel very frustrated about the lack of interest about the camera, coz a bunch of projects I have in mind involve video input :/
Please, could anyone with reverse engineering skills out there take a look at 3.40 usbcam.prx and usbacc.prx?
Thx very much in advance!
Cheers
-
- Posts: 41
- Joined: Mon Mar 19, 2007 6:27 pm
I thought I might bump this topic up a little as well since there seems to be a bit of interest here.
I just got one of the cameras last week and I am pretty keen to get it working for us homebrew devs. Unfortunately I have no experience reverse engineering any of the Sony prxes or with the assembly language needed to do so.
I have written up a program that is basically the start of adrahil's analysis.
ie
- load usbacc.prx & usbcam.prx
- start all the drivers USBBusDriver, USBAccBaseDriver, USBCamDriver & USBCamMicDriver
Once all that is done if I call sceUsbActivate(PSP_USBCAM_PID); the light comes on on the camera. The usb state from sceUsbGetState() is 0x211 when activated and 0x111 when deactivated
I'll give the sceUsbCamStillInput a go next and see if anything happens. I am not too sure where to go after that. Investigate usbcam.prx and try to figure out the API a bit further or investigate camera_plugin.prx and try and figure out how they are using the API. Camera_plugin.prx is a much larger program and from what I have checked out so far uses multiple threads to capture frames in the background so is probably a little more difficult for someone starting out with reverse engineering to get started on.
I'll keep you posted with my progress.
Edit* Forgot to mention with the GPS program source floating around there is an API call sceUsbGpsOpen() if anyone knows of a similar call needed for the camera please let me know.
I just got one of the cameras last week and I am pretty keen to get it working for us homebrew devs. Unfortunately I have no experience reverse engineering any of the Sony prxes or with the assembly language needed to do so.
I have written up a program that is basically the start of adrahil's analysis.
ie
- load usbacc.prx & usbcam.prx
- start all the drivers USBBusDriver, USBAccBaseDriver, USBCamDriver & USBCamMicDriver
Once all that is done if I call sceUsbActivate(PSP_USBCAM_PID); the light comes on on the camera. The usb state from sceUsbGetState() is 0x211 when activated and 0x111 when deactivated
I'll give the sceUsbCamStillInput a go next and see if anything happens. I am not too sure where to go after that. Investigate usbcam.prx and try to figure out the API a bit further or investigate camera_plugin.prx and try and figure out how they are using the API. Camera_plugin.prx is a much larger program and from what I have checked out so far uses multiple threads to capture frames in the background so is probably a little more difficult for someone starting out with reverse engineering to get started on.
I'll keep you posted with my progress.
Edit* Forgot to mention with the GPS program source floating around there is an API call sceUsbGpsOpen() if anyone knows of a similar call needed for the camera please let me know.
There isn't much to the code. I have removed all the normal callbacks set up code and so forth. There is instructions on how to extract the prx files here http://en.wikibooks.org/wiki/Map_This!# ... usbgps.prx
just extract the usbcam.prx instead
just extract the usbcam.prx instead
Code: Select all
// Define the module info section
PSP_MODULE_INFO("ARPSP", 0, 1, 1);
#define PSP_USBCAM_PID 0x282
unsigned int usbState = 0;
// Main function for our app
int main(int argc, char *argv[])
{
SceCtrlData pad;
pspDebugScreenInit();
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
// set up usb system
SceUID usbModule = 0;
SceUID camModule = 0;
usbModule = pspSdkLoadStartModule("usbacc.prx", PSP_MEMORY_PARTITION_KERNEL);
camModule = pspSdkLoadStartModule("usbcam.prx", PSP_MEMORY_PARTITION_KERNEL);
int usbBusRes = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
int usbBaseRes = sceUsbStart("USBAccBaseDriver", 0, 0);
int usbCamRes = sceUsbStart("USBCamDriver", 0, 0);
int usbCamMicRes = sceUsbStart("USBCamMicDriver", 0, 0);
int usbResult = 0;
while ( gameDone == 0 )
{
pspDebugScreenSetXY(0, 2);
sceCtrlReadBufferPositive(&pad, 1);
printf("usbModule = 0x%x \n", usbModule);
printf("camModule = 0x%x \n", camModule);
printf("result bus = %d \n", usbBusRes);
printf("result base = %d \n", usbBaseRes);
printf("result camera = %d \n", usbCamRes);
printf("result mic = %d \n", usbCamMicRes);
printf("result usb = %d \n", usbResult);
printf("USB State = 0x%x %s \n", usbState, (usbState & PSP_USB_ACTIVATED) ? "[activated] " : "[deactivated]");
if ( pad.Buttons != 0 )
{
// Start / Stop Cam if CROSS
if (pad.Buttons & PSP_CTRL_CROSS)
{
if (usbState & PSP_USB_ACTIVATED)
usbResult = sceUsbDeactivate(PSP_USBCAM_PID);
else
usbResult = sceUsbActivate(PSP_USBCAM_PID);
// sceUsbWaitCancel();
// Get state of the USB
usbState = sceUsbGetState();
}
}
}
// USB Deactivate
sceUsbDeactivate(PSP_USBCAM_PID);
// sceUsbWaitCancel();
usbCamMicRes = sceUsbStop("USBCamMicDriver", 0, 0);
usbCamRes = sceUsbStop("USBCamDriver",0,0);
usbBaseRes = sceUsbStop("USBAccBaseDriver",0,0);
usbBusRes = sceUsbStop(PSP_USBBUS_DRIVERNAME,0,0);
sceKernelExitGame();
return 0;
}
I have tried calling those 2 function calls sceUsbCamStillInput and sceUsbCamStillWaitInputEnd. However if I include them in my program it just hangs and will eventually the PSP will turn off. I suspect there is something wrong with my stubs file.
I tried calling sceUsbCamSetupStill passing 0 as the parameter. It returns an error code (0x80243902) if I call it whether the usb device is activated or not. Since this doesn't make the PSP hang there must be something working with my stubs.
I am a bit stuck now as I would like to make sure my stubs and header are ok before going on. I'll past the contents of those files below. I am using the prx files from DA 3.40 OE firmware if it helps.
sceUsbCam.S
pspUsbCam.h
If anyone can see anything wrong with them please let me know and save me ripping my hair out.
I tried calling sceUsbCamSetupStill passing 0 as the parameter. It returns an error code (0x80243902) if I call it whether the usb device is activated or not. Since this doesn't make the PSP hang there must be something working with my stubs.
I am a bit stuck now as I would like to make sure my stubs and header are ok before going on. I'll past the contents of those files below. I am using the prx files from DA 3.40 OE firmware if it helps.
sceUsbCam.S
Code: Select all
.set noreorder
#include "pspstub.s"
STUB_START "sceUsbCam",0x00090000,0x00360005
STUB_FUNC 0x03ED7A82,sceUsbCamSetupMic
STUB_FUNC 0x08AEE98A,sceUsbCamSetMicGain
STUB_FUNC 0x09C26C7E,sceUsbCamSetContrast
STUB_FUNC 0x0A41A298,sceUsbCam_0A41A298
STUB_FUNC 0x11A1F128,sceUsbCamGetAutoImageReverseState
STUB_FUNC 0x17F7B2FB,sceUsbCamSetupVideo
STUB_FUNC 0x1A46CFE7,sceUsbCamStillPollInputEnd
STUB_FUNC 0x1D686870,sceUsbCamSetEvLevel
STUB_FUNC 0x1E958148,sceUsbCam_1E958148
STUB_FUNC 0x2BCD50C0,sceUsbCamGetEvLevel
STUB_FUNC 0x2E930264,sceUsbCam_2E930264
STUB_FUNC 0x36636925,sceUsbCamReadMicBlocking
STUB_FUNC 0x383E9FA8,sceUsbCamGetSaturation
STUB_FUNC 0x3DC0088E,sceUsbCamReadMic
STUB_FUNC 0x3F0CF289,sceUsbCamSetupStill
STUB_FUNC 0x41E73E95,sceUsbCamPollReadVideoFrameEnd
STUB_FUNC 0x41EE8797,sceUsbCamUnregisterLensRotationCallback
STUB_FUNC 0x4C34F553,sceUsbCamGetLensDirection
STUB_FUNC 0x4F3D84D5,sceUsbCamSetBrightness
STUB_FUNC 0x5145868A,sceUsbCamStopMic
STUB_FUNC 0x574A8C3F,sceUsbCamStartVideo
STUB_FUNC 0x5778B452,sceUsbCamGetMicDataLength
STUB_FUNC 0x61BE5CAC,sceUsbCamStillInputBlocking
STUB_FUNC 0x622F83CC,sceUsbCamSetSharpness
STUB_FUNC 0x6784E6A8,sceUsbCam_6784E6A8
STUB_FUNC 0x6CF32CB9,sceUsbCamStopVideo
STUB_FUNC 0x6E205974,sceUsbCamSetSaturation
STUB_FUNC 0x70F522C5,sceUsbCamGetBrightness
STUB_FUNC 0x7563AFA1,sceUsbCamStillWaitInputEnd
STUB_FUNC 0x7DAC0C71,sceUsbCamReadVideoFrameBlocking
STUB_FUNC 0x82A64030,sceUsbCamStartMic
STUB_FUNC 0x951BEDF5,sceUsbCamSetReverseMode
STUB_FUNC 0x95F8901E,sceUsbCam_95F8901E
STUB_FUNC 0x994471E0,sceUsbCamGetImageEffectMode
STUB_FUNC 0x99D86281,sceUsbCamReadVideoFrame
STUB_FUNC 0x9E8AAF8D,sceUsbCamGetZoom
STUB_FUNC 0xA063A957,sceUsbCamGetContrast
STUB_FUNC 0xA720937C,sceUsbCamStillCancelInput
STUB_FUNC 0xAA7D94BA,sceUsbCam_AA7D94BA
STUB_FUNC 0xB048A67D,sceUsbCamWaitReadMicEnd
STUB_FUNC 0xC484901F,sceUsbCamSetZoom
STUB_FUNC 0xC72ED6D3,sceUsbCam_C72ED6D3
STUB_FUNC 0xCFE9E999,sceUsbCam_CFE9E999
STUB_FUNC 0xD293A100,sceUsbCamRegisterLensRotationCallback
STUB_FUNC 0xD4876173,sceUsbCamSetImageEffectMode
STUB_FUNC 0xD5279339,sceUsbCamGetReverseMode
STUB_FUNC 0xD865997B,sceUsbCam_D865997B
STUB_FUNC 0xDF9D0C92,sceUsbCamGetReadVideoFrameSize
STUB_FUNC 0xE5959C36,sceUsbCamStillGetInputLength
STUB_FUNC 0xF8847F60,sceUsbCamPollReadMicEnd
STUB_FUNC 0xF90B2293,sceUsbCamWaitReadVideoFrameEnd
STUB_FUNC 0xF93C4669,sceUsbCamAutoImageReverseSW
STUB_FUNC 0xFB0A6C5D,sceUsbCamStillInput
STUB_FUNC 0xFDB68C23,sceUsbCamGetSharpness
STUB_END
Code: Select all
#ifndef __PSPUSBCAM_H__
#define __PSPUSBCAM_H__
#ifdef __cplusplus
extern "C" {
#endif
#define PSP_USBCAM_PID 0x282
#define PSP_USBCAM_DRIVERNAME "USBCamDriver"
#define PSP_USBCAMMIC_DRIVERNAME "USBCamMicDriver"
// Unknown
int sceUsbCamSetupStill(u32 a0);
// from forums
int sceUsbCamStillInput(void* buffer, int buffer_64k_size);
int sceUsbCamStillWaitInputEnd(void);
#ifdef __cplusplus
}
#endif
#endif
There it is.
This sample outputs video from the camera to the screen, and saves a 1024x768 still image to /PSP/PHOTO whenever R is pressed. (i don't know why camera_plugin missed this resolution in the options).
http://www.megaupload.com/?d=3H7AL01K
I've tried to imitate what i saw in camera_plugin.prx. Anyways, that module used sceUsbCamSetupStillEx and sceUsbCamSetupVideoEx which still have a lot of parameters that i have not deduced (some of them maybe related to camera lens position?), so i prefered to use the simpler functions sceUsbCamSetupStill and sceUsbCamSetupVideo.
Note: the sample has been tested only under 3.40 OE (running in the 3.40 kernel), but i guess it should work in others OE, in devhook 2.71+ and HEN 2.71+ too.
This sample outputs video from the camera to the screen, and saves a 1024x768 still image to /PSP/PHOTO whenever R is pressed. (i don't know why camera_plugin missed this resolution in the options).
http://www.megaupload.com/?d=3H7AL01K
I've tried to imitate what i saw in camera_plugin.prx. Anyways, that module used sceUsbCamSetupStillEx and sceUsbCamSetupVideoEx which still have a lot of parameters that i have not deduced (some of them maybe related to camera lens position?), so i prefered to use the simpler functions sceUsbCamSetupStill and sceUsbCamSetupVideo.
Note: the sample has been tested only under 3.40 OE (running in the 3.40 kernel), but i guess it should work in others OE, in devhook 2.71+ and HEN 2.71+ too.
That's it, I want one (I guess the Go! Cam is the exact same thing?) :)
But I can't find it in the stores in Zurich... Any idea where to order one cheaply to Switzerland? Or should I just order a Chotto Cam from playasia?
Yeah slightly OT, sorry about that...
But I can't find it in the stores in Zurich... Any idea where to order one cheaply to Switzerland? Or should I just order a Chotto Cam from playasia?
Yeah slightly OT, sorry about that...
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Yeah the Go Cam is same thing. I guess it will be cheaper to get it from an european shop, since it was released in europe a couple of months ago.ector wrote:That's it, I want one (I guess the Go! Cam is the exact same thing?) :)
But I can't find it in the stores in Zurich... Any idea where to order one cheaply to Switzerland? Or should I just order a Chotto Cam from playasia?
Yeah slightly OT, sorry about that...
Two new samples.
First one is a correction of the previous one. Video was correct, but when you took photos, the image was reversed from left to right if the camera looked to you, and reversed from up-down and left-right when looking to the other side. It seems that the sceUsbCamAutoImageReverseSW(1) only affects video, and not still images, so i had to check the lens direction manually and set the reverseflags field of the SetupStill structure properly.
Second one is an example of audio recording from the camera mic. It records wav pcm files to /PSP/MUSIC.
http://www.megaupload.com/?d=666JJNHU
Changes to the includes: added documentation of the mic functions, added the lens callback functions documentation.
Changes to the libs: added the nid sceUsbCamSetupMicEx, and added the library pspusbcam_driver for those that want to use the camera in a kernel prx.
Now, only the following functions are missing from documentation:
- sceUsbCam_1E958148: it is referenced by camera_plugin.prx, but the function that uses it is never called (there is neither jal to it, nor a pointer to it). The code sets first parameter to 0xC0000003, and the second parameter seems a pointer to an integer that receives something.
- sceUsbCam_6784E6A8, sceUsbCam_95F8901E, sceUsbCam_AA7D94BA, sceUsbCam_C72ED6D3 and sceUsbCam_D865997B. They are neither used nor referenced by camera_plugin.
First one is a correction of the previous one. Video was correct, but when you took photos, the image was reversed from left to right if the camera looked to you, and reversed from up-down and left-right when looking to the other side. It seems that the sceUsbCamAutoImageReverseSW(1) only affects video, and not still images, so i had to check the lens direction manually and set the reverseflags field of the SetupStill structure properly.
Second one is an example of audio recording from the camera mic. It records wav pcm files to /PSP/MUSIC.
http://www.megaupload.com/?d=666JJNHU
Changes to the includes: added documentation of the mic functions, added the lens callback functions documentation.
Changes to the libs: added the nid sceUsbCamSetupMicEx, and added the library pspusbcam_driver for those that want to use the camera in a kernel prx.
Now, only the following functions are missing from documentation:
- sceUsbCam_1E958148: it is referenced by camera_plugin.prx, but the function that uses it is never called (there is neither jal to it, nor a pointer to it). The code sets first parameter to 0xC0000003, and the second parameter seems a pointer to an integer that receives something.
- sceUsbCam_6784E6A8, sceUsbCam_95F8901E, sceUsbCam_AA7D94BA, sceUsbCam_C72ED6D3 and sceUsbCam_D865997B. They are neither used nor referenced by camera_plugin.
Hi,
Very nice job !
I'm very interested in what you do, but I have an error while running your first sample.
Error 0x80243005 starting usbacc driver.
my psp is a TA-082 with a CF (3.40 OE-A)
Did I made something wrong ?
(excuse my english I'm french)
--------------------------------------------------------------
EDIT
--------------------------------------------------------------
I'm sorry, I just put your sample in the wrong directory (Game150 instead of Game340) I'm so stupid...
Very nice job !
I'm very interested in what you do, but I have an error while running your first sample.
Error 0x80243005 starting usbacc driver.
my psp is a TA-082 with a CF (3.40 OE-A)
Did I made something wrong ?
(excuse my english I'm french)
--------------------------------------------------------------
EDIT
--------------------------------------------------------------
I'm sorry, I just put your sample in the wrong directory (Game150 instead of Game340) I'm so stupid...
Psp prog
I managed to put a mask in foreground but I just can't take pictures... :(
here is the code I modified.
http://sexy-banane.mine.nu/~vrac/depot/ ... e_mask.zip
you can easyli change the mask. Black part of the foreground image become invisible.
Enjoy
Edit one more mask just for fun
here is the code I modified.
http://sexy-banane.mine.nu/~vrac/depot/ ... e_mask.zip
you can easyli change the mask. Black part of the foreground image become invisible.
Enjoy
Edit one more mask just for fun
Last edited by guyver2 on Tue Jul 10, 2007 9:28 am, edited 1 time in total.
Psp prog
If you look at the disassembly of the usbcam.prx sceUsbCam_1E958148 gets called by all the Get/Set functions internallykururin wrote:Two new samples.
- sceUsbCam_1E958148: it is referenced by camera_plugin.prx, but the function that uses it is never called (there is neither jal to it, nor a pointer to it). The code sets first parameter to 0xC0000003, and the second parameter seems a pointer to an integer that receives something.
Looked to it now. It seems it follows the following pattern:Cubane wrote:If you look at the disassembly of the usbcam.prx sceUsbCam_1E958148 gets called by all the Get/Set functions internallykururin wrote:Two new samples.
- sceUsbCam_1E958148: it is referenced by camera_plugin.prx, but the function that uses it is never called (there is neither jal to it, nor a pointer to it). The code sets first parameter to 0xC0000003, and the second parameter seems a pointer to an integer that receives something.
0x80000002 -> getcontrast
0x00000002 -> setcontrast
0x80000003 -> getsaturation
0x00000003 -> setsaturation
, etc
I tested that 0xc0000003 code of camera_plugin when the saturation was 125, and it returned 807 in the pointer, who knows what it means. Tested later when saturation was 11, and same, so it probably doesn't depend of saturation value.
video and audio streaming from chottocam to voip...
It's a plesure to start my posting just from what I'd like to find.... Code to capture images and audio from chottocam...thanks to all contributes, clear and very well working, even if at "proof of concept" stage...
I am going deeply within Skype Public APIs in order to understand if in some way it is possible to use them for calls and video calls.
These APIs are under Windows.
May be in some way the chottocam and wifi psp power together some Voip protocol APIs will integrate a Voip System firstly for chatting, than for voicecalls, finally for video calls.
I'm not a monster of programming, better an integrator of parts.... I hope to have support and being lucky....
I am going deeply within Skype Public APIs in order to understand if in some way it is possible to use them for calls and video calls.
These APIs are under Windows.
May be in some way the chottocam and wifi psp power together some Voip protocol APIs will integrate a Voip System firstly for chatting, than for voicecalls, finally for video calls.
I'm not a monster of programming, better an integrator of parts.... I hope to have support and being lucky....
Thanks to all! the source is well working with Cam!
Please has anyone suggestions or help to convert jpeg "buffer" image captured from Go!Cam to a bmp image?
I'd like to use the captured frame with Nanodesktop or better with OpenCV Recognition library: a bmp should work even to be internally converted to IplImage (proprietary format of OpenCV).
Any conversion source code from jpeg to bitmap?
Thanks a lot!
c
Please has anyone suggestions or help to convert jpeg "buffer" image captured from Go!Cam to a bmp image?
I'd like to use the captured frame with Nanodesktop or better with OpenCV Recognition library: a bmp should work even to be internally converted to IplImage (proprietary format of OpenCV).
Any conversion source code from jpeg to bitmap?
Thanks a lot!
c