loadcore unregister libraries

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
whizdom
Posts: 5
Joined: Sat Jun 25, 2005 4:58 am

loadcore unregister libraries

Post by whizdom »

Hey all,

I'm attempting to learn a little bit more about the RPC system in PS2. I was trying to see if I can replace a system RPC call with mine. It's more for learning to program with IOP than for any specific reason.

IOMANX replaces the adddrv and deldrv functions of ioman. So I tried something similar on my own ... I tried replacing cdvd driver's searchfile RPC. From the iop I tried removing RPC by using sceSifRemoveCmdHandler(int cid), where cid from ee/rpc/cdvd is CD_SERVER_SEARCHFILE. Now that doesn't work. I still can't replace it with my searchfile RPC (my RPC should output a "Hello World" message - I am loading the code with ps2link, so printf works fine. I've tested it!)
Q) I don't know how to use sceSifRemoveRpc for unregistering a previously registered system module - could someone tell me?
Q) Now I tried replacing it like IOMANX by playing with the library entries. I tried unregistering the whole CDVDFSV library entries (and it worked with a return value of 0), however CDVDMAN doesn't unregister (return value -1). Why is that? I am using loadcore's releaselibraryentries function. I also tried calling the cdvd exit function cdInit(CDVD_INIT_EXIT) before releasing the library entries - still doesn't work!
Q) Well, this may sound like a 100% dumb question, but I don't know the difference in cdvdman and cdvdfsv functions, what is cdvdman used for and what is cdvdfsv used for?
Q) I've also tried io_DelDrv("cdrom"), that doesn't help either. So I guess someone would would have to help me out here - what's the difference between the deldrv and unregistering the library? I guess del drv calls for cdvd exit function and the unregistering library removes all the export entries. Is that correct? Changing the order of whether i call deldrv first or unregister first doesn't seem to matter - nothing works :(
Q) For some reason RegisterLibraryEntries(&_cdvdtryal) returns -1, where _cdvdtryal is struct irx_export_table. Do I need to feel up the structure somehow before registerlibraryentries (iomanx doesn't seem to do so)?
- I've tried replacing the sceCdSearchFile exactly like iomanx replaces deldrv,adddrv. I failed again. No idea where I'm going wrong....

Oh boy, so many questions...!! I would sure appreciate if someone would help out this newbie.

Thanks in advance.
A curious learner!
Post Reply