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 

Import irx functions without symbols

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



Joined: 08 Jul 2007
Posts: 3

PostPosted: Sun Jul 08, 2007 11:12 am    Post subject: Import irx functions without symbols Reply with quote

Hi,
i was wondering how i could import functions from irx modules that dont have a symbol table (In C programming language). In every tutorial i've read they say "you can easily find the functions and recreate the call in C". The problem is, i don't know how.
Maybe the solution to this problem is obvious or something, but im a newbie to this kind of stuff...
Back to top
View user's profile Send private message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Sun Jul 08, 2007 12:34 pm    Post subject: Reply with quote

irx modules have an export table which define by number the functions available. Sometime they have a name as well. But to work out the paramters expected you will have to look at the disassembly of the function. If you are a newbie it may be beyond you.
Back to top
View user's profile Send private message
wmspider



Joined: 08 Jul 2007
Posts: 3

PostPosted: Sun Jul 08, 2007 11:39 pm    Post subject: Reply with quote

Sorry, i'll try to put my question clearer: I am a newbie to loading modules, but i know how to program in c/c++ and i know how to dissassemble the module (i already know where the functions are and what arguments they need). the only problem is i don't know how to load the modules and call those funtions in my program if they arent defined in a .h file. i've never worked with external librariens, only with header files...
Back to top
View user's profile Send private message
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Mon Jul 09, 2007 9:39 am    Post subject: Reply with quote

For those modules that exist in the rom they have been defined in ps2sdk/iop/kernel. For example, take a look at cdvdman.s and its header cdvdman.h. You will need to create these files yourself if they don't exist for the module you are trying to import.

For modules created as part of the ps2sdk they have used a different system which are basically just macros to create the same thing as the assembly file above. For example, take a look at iomamx imports and irx_imports.h.
Back to top
View user's profile Send private message
wmspider



Joined: 08 Jul 2007
Posts: 3

PostPosted: Mon Jul 09, 2007 7:52 pm    Post subject: Reply with quote

Ok, i think i got it. I'll look through irx.h to see how it works exactly. Thanks!
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 -> PS2 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