forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceHprmEnd, sceSysregUartIoEnable documentation

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
bubugian



Joined: 09 Oct 2008
Posts: 18

PostPosted: Wed Aug 12, 2009 3:17 am    Post subject: sceHprmEnd, sceSysregUartIoEnable documentation Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Aug 12, 2009 7:00 am    Post subject: Re: sceHprmEnd, sceSysregUartIoEnable documentation Reply with quote

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
View user's profile Send private message
bubugian



Joined: 09 Oct 2008
Posts: 18

PostPosted: Wed Aug 12, 2009 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message
ab5000



Joined: 06 May 2008
Posts: 74

PostPosted: Wed Aug 12, 2009 6:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
slasher2661996



Joined: 22 Feb 2009
Posts: 91
Location: Melbourne Australia ZOMG

PostPosted: Wed Aug 12, 2009 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group