| View previous topic :: View next topic |
| Author |
Message |
wmspider
Joined: 08 Jul 2007 Posts: 3
|
Posted: Sun Jul 08, 2007 11:12 am Post subject: Import irx functions without symbols |
|
|
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 |
|
 |
radad
Joined: 19 May 2004 Posts: 246 Location: Melbourne, Australia
|
Posted: Sun Jul 08, 2007 12:34 pm Post subject: |
|
|
| 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 |
|
 |
wmspider
Joined: 08 Jul 2007 Posts: 3
|
Posted: Sun Jul 08, 2007 11:39 pm Post subject: |
|
|
| 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 |
|
 |
radad
Joined: 19 May 2004 Posts: 246 Location: Melbourne, Australia
|
Posted: Mon Jul 09, 2007 9:39 am Post subject: |
|
|
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 |
|
 |
wmspider
Joined: 08 Jul 2007 Posts: 3
|
Posted: Mon Jul 09, 2007 7:52 pm Post subject: |
|
|
| Ok, i think i got it. I'll look through irx.h to see how it works exactly. Thanks! |
|
| Back to top |
|
 |
|