How to make system call ?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
1073X
Posts: 6
Joined: Fri Aug 18, 2006 9:44 pm

How to make system call ?

Post by 1073X »

Hi, everybody.I have a question about IMPORT modules.

I found that in the xxx_driver.s,there would be IMPORT_START, IMPORT_FUNC macro to generate the stub function.
When i read the IMPORT_START and IMPORT_FUNC macro in "pspimport.s", i was puzzled.It seems these macroes set some data structs.But, how these code invoke the system call? I cant find the real function address ? Is there any wizardly mechanism in the PSP kernel to make these stubs work?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

Yeah, there's some sort of magic going on :)
The macro adds the import to .lib.stub, .rodata.scenid, ... sections, which basically give information to the PSP kernel about what functions to import into the application on loading...
1073X
Posts: 6
Joined: Fri Aug 18, 2006 9:44 pm

Post by 1073X »

adrahil wrote:Yeah, there's some sort of magic going on :)
The macro adds the import to .lib.stub, .rodata.scenid, ... sections, which basically give information to the PSP kernel about what functions to import into the application on loading...
Thanks for your answer. ^.^
i have another question.Can i get the prx file of system module? Like usb driver or display driver ...
I read the document < ModuleTutorialv1.pdf > and found that the module code is placed in *.prx . So i think there would be any prx file that hold the system call code. Im i right? pls dont laugh at me.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

http://silverspring.lan.st/

Ciaooo
Sakya
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

1073X wrote:
adrahil wrote:Yeah, there's some sort of magic going on :)
The macro adds the import to .lib.stub, .rodata.scenid, ... sections, which basically give information to the PSP kernel about what functions to import into the application on loading...
Thanks for your answer. ^.^
i have another question.Can i get the prx file of system module? Like usb driver or display driver ...
I read the document < ModuleTutorialv1.pdf > and found that the module code is placed in *.prx . So i think there would be any prx file that hold the system call code. Im i right? pls dont laugh at me.
If you mount flash0: to the USB (the newer custom firmware versions will do this from the recovery menu or from the vsh if 3.71 M33), you can copy all the system prx's. However, then you need to use PRXdecrypter on them as they are encrypted and compressed. The latest version is 1.7. Just google for it.
1073X
Posts: 6
Joined: Fri Aug 18, 2006 9:44 pm

Post by 1073X »

Thanks all of you. im trying.
This is realy a great place.
Post Reply