forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

_Hooking sceUsb_

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Apr 05, 2008 10:10 am    Post subject: _Hooking sceUsb_ Reply with quote

I posted this in some other thread around, but that thread is falling in the abyss of unread posts!! I'm trying to patch sceUsb functions using apihook.c (part of pikey). Patches are reported to be applied correctly. I first tried to log onto a file each single call, but nothing ever happens so i thought i hooked the wrong functions (logging stops after patches are applied).
Then i thought that there are problems writing to a file (with standard functions sceIoOpen(), sceIoWrite()) from a system library, so i tryed to mess up things to see if it has effect; i made sceUsbStart() replacement returning always 1: this prevents USB mass storage to be activated (ahah!something is moving...) eventually with an error, but can't forbid programs like mapThis to find the USB GPS (and things continue not to be logged on file...). In the very end, i tryed to output some debug info to SIO, but this hangs the PSP (same problem we got with pikey: i guess it calls some function not yet in memory in the moment of module startup...)
PLEASE....any suggestion????????
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sat Apr 05, 2008 11:26 am    Post subject: Reply with quote

Depending on the fuction's parameters, pass an Identifiable pointer address and use it to do logging.

Reason sceIo* wont work is sceUsb doesnt import that lib.
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Apr 05, 2008 6:33 pm    Post subject: Reply with quote

Hhmm...ok, i forgot that my replacement functions are part of sceUsb once hooked..so now i know why logging doesn't take place as expected. I don't understand what you mean by "passing an identifiable address", or at least i guess i understand the general concept but i am not able to do it...can you give a short example? By the way, i still can't understand why signalling failure in usb module load function works some times and some other not...same thing i noticed while trying to hook OSK functions. Can someone explain the general lines so i can continue researching on my own?????? Thanks in advance.
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sat Apr 05, 2008 10:59 pm    Post subject: Reply with quote

Suppose
#define EVIDIDENTIFIER 98485123
#define BITSIDENTIFIER -340348

int SetEventFlag_Rs (SceUID evid, u32 bits)

Big Hint :)
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group