| View previous topic :: View next topic |
| Author |
Message |
bubugian
Joined: 09 Oct 2008 Posts: 18
|
Posted: Wed Aug 12, 2009 3:17 am Post subject: sceHprmEnd, sceSysregUartIoEnable documentation |
|
|
I'm new with psp programming so please be patient if my questions are banal.
Looking for SIO prx code sample I found a Fanjita's sio sample that make this calls:
| Code: |
void _sioInit(void)
{
sceHprmEnd();
sceSysregUartIoEnable(4);
sceSysconCtrlHRPower(1);
}
|
I start to understand what sceHprmEnd (and ather) call do but I did not find any documentation. Not even inside sdk's header files.
Function prototype are declared at the top of code so I imagine locator will know (and solve) addresses to call..
Is there some function docs ? Where ?
Prefix 'sce' stand for Sony's api?
Will this lines:
| Code: |
USE_KERNEL_LIBC=1
USE_KERNEL_LIBS=1
|
indicate to use 'sce' functions?
I'd like to develop an application (prx) that will use RS232. I found some sample code here in ps2dev and I'll appreciate any suggestion on working prx code with CF 5.
Thanks very much for your help! |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Wed Aug 12, 2009 7:00 am Post subject: Re: sceHprmEnd, sceSysregUartIoEnable documentation |
|
|
| bubugian wrote: | I start to understand what sceHprmEnd (and ather) call do but I did not find any documentation. Not even inside sdk's header files.
Function prototype are declared at the top of code so I imagine locator will know (and solve) addresses to call..
Is there some function docs ? Where ?
Prefix 'sce' stand for Sony's api?
| Yes, they are provided by Sony in the PSP kernel. In the compiled binary, it's referenced by its NID which is found in src/hprm/sceHprm_driver.S in the SDK.
This particular function isn't documented, but some other documentation for sceHprm stuff is at http://psp.jim.sh/pspsdk-doc/group__Hprm.html
| Quote: |
Will this lines:
| Code: |
USE_KERNEL_LIBC=1
USE_KERNEL_LIBS=1
|
indicate to use 'sce' functions?
| Those are unrelated, they just tell the compiler/linker that you want to use Sony's built-in libc functions rather than the ones provided by newlib.
| Quote: | | I'd like to develop an application (prx) that will use RS232. I found some sample code here in ps2dev and I'll appreciate any suggestion on working prx code with CF 5. |
See http://forums.ps2dev.org/viewtopic.php?p=58653 |
|
| Back to top |
|
 |
bubugian
Joined: 09 Oct 2008 Posts: 18
|
Posted: Wed Aug 12, 2009 7:57 am Post subject: |
|
|
Thanks Jim for your help.
| Quote: |
Those are unrelated, they just tell the compiler/linker that you want to use Sony's built-in libc functions rather than the ones provided by newlib.
|
Is it necessary to specify in makefile to use 'sce' functions? Where ?
Is it possible to use a sort of overload of sce f ?
Many thanks. |
|
| Back to top |
|
 |
ab5000
Joined: 06 May 2008 Posts: 74
|
Posted: Wed Aug 12, 2009 6:32 pm Post subject: |
|
|
| bubugian wrote: | Thanks Jim for your help.
| Quote: |
Those are unrelated, they just tell the compiler/linker that you want to use Sony's built-in libc functions rather than the ones provided by newlib.
|
Is it necessary to specify in makefile to use 'sce' functions? Where ?
Is it possible to use a sort of overload of sce f ?
Many thanks. |
normally (without that lines) you use newlib (pspsdk libc). If you specify that in the makefile, your homebrew will use firmware libc.
sce* functions are ALWAYS avaiable. if you compile with newlib, fopen (for example) will be built-in in your app, if you compile with sce libc, it'll be called from a firmware module. sometimes (for example when you use VLF) you can't use newlib, so you need sce libc. _________________
| Code: | %:include<stdio.h>
int _(int __,int ___,int ____,int _____)
<%for(;____<___;_____=_____*__,____++);
return _____;%>main()<%printf
("%d\n",_(2,5,0,1));%> |
|
|
| Back to top |
|
 |
slasher2661996
Joined: 22 Feb 2009 Posts: 91 Location: Melbourne Australia ZOMG
|
Posted: Wed Aug 12, 2009 8:13 pm Post subject: |
|
|
| bubugian wrote: | Thanks Jim for your help.
| Quote: |
Those are unrelated, they just tell the compiler/linker that you want to use Sony's built-in libc functions rather than the ones provided by newlib.
|
Is it necessary to specify in makefile to use 'sce' functions? Where ?
Is it possible to use a sort of overload of sce f ?
Many thanks. |
You ALWAYS need a makefile.
And you could always hook the functions |
|
| Back to top |
|
 |
|