Import irx functions without symbols

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

Moderators: cheriff, Herben

Post Reply
wmspider
Posts: 3
Joined: Sun Jul 08, 2007 11:00 am

Import irx functions without symbols

Post by wmspider »

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...
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

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.
wmspider
Posts: 3
Joined: Sun Jul 08, 2007 11:00 am

Post by wmspider »

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...
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

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.
wmspider
Posts: 3
Joined: Sun Jul 08, 2007 11:00 am

Post by wmspider »

Ok, i think i got it. I'll look through irx.h to see how it works exactly. Thanks!
Post Reply