sceHprmEnd, sceSysregUartIoEnable documentation

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

Moderators: cheriff, TyRaNiD

Post Reply
bubugian
Posts: 18
Joined: Thu Oct 09, 2008 7:20 am

sceHprmEnd, sceSysregUartIoEnable documentation

Post by bubugian »

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: Select all

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: Select all

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!
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: sceHprmEnd, sceSysregUartIoEnable documentation

Post by jimparis »

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
Will this lines:

Code: Select all

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.
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
bubugian
Posts: 18
Joined: Thu Oct 09, 2008 7:20 am

Post by bubugian »

Thanks Jim for your help.
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.
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

bubugian wrote:Thanks Jim for your help.
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: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
slasher2661996
Posts: 91
Joined: Sun Feb 22, 2009 8:32 am
Location: Melbourne Australia ZOMG

Post by slasher2661996 »

bubugian wrote:Thanks Jim for your help.
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
Post Reply