 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Thu Dec 28, 2006 2:32 am Post subject: PSP 1.50 Kernel |
|
|
I'm interested in the PSP dev scene, and I can make basic programs, but I am wondering how to activate the kernel mode in 1.50 PSP's. In the SDK documents it says some functions are only useable in kernel mode, which is why I am asking. I mainly want to use it to read if the memory stick is in, so data can be saved to it etc.
Thanks! (Hope it doesn't sound too noobish)
-Sleepy |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Thu Dec 28, 2006 5:38 am Post subject: |
|
|
at the top of your main.c/cpp you only have to edit the macro
/* Define the module info section */
PSP_MODULE_INFO("xxo", /*changed: 0 = usermode, 0x1000 = kmode*/0x1000, 1, 1);
then you also have to think about the main thread of your eboot
if you want to use kmode functions inside this main thread you will need
to set main thread as kmode thread ....like so
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(/*changed: 0 = kmode thread*/0);
you can find more info in svn looking at the module info sections
and thread manager sections _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Thu Dec 28, 2006 7:24 am Post subject: |
|
|
So if I wanted to change the function of the volume or screen brightness buttons, what would the source look like for that?
| Code: | PSP_MODULE_INFO("Title", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
int main() {
pspDebugScreenInit();
SetupCallbacks();
SceCtrlData pad;
printf("Press [Note] Button to begin.");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_NOTE) {
break;
}
} |
Is that correct?
And what I was after in the first place - how would I write a program to detect if a memory stick or UMD is present? Could I see a source excerpt like mine?
Thanks a ton dot_blank, and whoever else decides to help me! |
|
| Back to top |
|
 |
|
|
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
|