Confusing problem with usb. Probably common...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dmonchild
Posts: 15
Joined: Sun Dec 23, 2007 5:46 pm

Confusing problem with usb. Probably common...

Post by dmonchild »

Alright i'm having some major problems getting the usb modules to load on any firmware other then 3.71, at 1st i thought oh it probably wants some spiffy call backs so i wrote the modules into call back threads and put them in, it doesn't make a difference.

The source from the sdk seems to work just great on any firmware compiled as an eboot.

I've scammed some lines from it that i thought looked appropriate, it all works great but the only catch is it doesn't work on any other firmwares other then 3.71, please note my final binary is PRX not eboot also. and the way i have it set up is potentialy dangerous and has been taken into consideration.

What could be done to the way i am putting this into my prx to make usb work on all firmwares rather then just 3.71?

i'd post my source but its 6000 lines. (I doubt their sql would like me for that)

Code: Select all

#include <pspusb.h>
#include <pspusbstor.h>
Here is my usb start.

Code: Select all

void usb&#40;&#41; 
&#123;

  //start necessary drivers
  LoadStartModule&#40;"flash0&#58;/kd/semawm.prx"&#41;;
  LoadStartModule&#40;"flash0&#58;/kd/usbstor.prx"&#41;;
  LoadStartModule&#40;"flash0&#58;/kd/usbstormgr.prx"&#41;;
  LoadStartModule&#40;"flash0&#58;/kd/usbstorms.prx"&#41;;
  LoadStartModule&#40;"flash0&#58;/kd/usbstorboot.prx"&#41;;
	
  sceUsbstorBootSetCapacity&#40;0x800000&#41;;
  sceUsbStart&#40;PSP_USBBUS_DRIVERNAME, 0, 0&#41;;
  sceUsbStart&#40;PSP_USBSTOR_DRIVERNAME, 0, 0&#41;;
  sceUsbActivate&#40;0x1c8&#41;;
  
&#125;
in the main i put

Code: Select all

usb&#40;&#41;;
to get the ball rolling. (works)

and in the stop thread i put sceUsbDeactivate(0x1c8);

Code: Select all

int _stop&#40;SceSize args, void *argp&#41;
&#123;
	sceUsbDeactivate&#40;0x1c8&#41;;
	running = 0;
 	sceKernelTerminateThread&#40;thid&#41;;
  return 0;
&#125;
Sorry about the noobish post :( but im really interested in this stuff i wake up early and dream about code , wack back 2 liters of cola in 20 hours of uptime while my computers melting just to learn lol...
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

dmonchild
Posts: 15
Joined: Sun Dec 23, 2007 5:46 pm

Post by dmonchild »

Insert_witty_name wrote:Check out this thread: http://forums.ps2dev.org/viewtopic.php?t=9181
Wow! witty you're in a lot of places @ the same time, irc, the other site where you'd also replied to a similar thread of mine and here.

Welp this was what i was looking for but didnt solve any problems.. very strange.. i've tried just about everything now. oh well i'll try again when i'm feeling like losing again.
Post Reply