Recently I have begun development on the PSP, I have started with a (XMB) plugin module for firmware 3.90 m33.
I have a question regarding my plugin and, maybe it is related, a question about usbhostfs. If someone would be so kind as to explain a few things for me I would really appreciate it!
1) My understanding is a module (prx) can be either usermode or kernel mode. I use the following macro to start my plugin as kernel: PSP_MODULE_INFO("Save game manager", 0x1000, 1, 1);
The compiled prx is then stored in the memory stick under seplugins (and activated on the PSP recovery menu).
Is it correct to assume a XMB plugin can run correctly in kernel mode?
Is user mode just a restricted (non-administrator) mode, or is there a use for it?
2) I am trying to create a test file via USB using the usbhostfs driver with the sceIO functions.. however even though the calls to all functions return success no file is created?
Here is a snippet of my function:
Code: Select all
u32 module = sceKernelLoadModule("ms0:/usbhostfs.prx", 0, NULL);
sceKernelStartModule(module, 0, NULL, NULL, NULL);
sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
sceUsbStart("USBHostFSDriver", 0, 0);
sceUsbActivate(0x1C9);
// delay here for driver initialisation.
At this point the PC running usbhostfs acknowledges the usb connection.
Here is how I continue on to write a test file:
Code: Select all
SceUID suid = sceIoOpen("host0:/test.txt", PSP_O_WRONLY | PSP_O_CREAT, 0777);
sceIoWrite(suid, "T", 1);
sceIoClose(suid);
I really have searched and for days tried various methods to access usb host. It's definately put a halt on my development; so as a last resort I hope someone here can shed some light on what I missed or did wrongly.
Thank you for your time.
C.