PSP 1.50 Kernel

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

Moderators: cheriff, TyRaNiD

Post Reply
Sleepy566
Posts: 23
Joined: Thu Dec 28, 2006 2:30 am

PSP 1.50 Kernel

Post by Sleepy566 »

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
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

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
Sleepy566
Posts: 23
Joined: Thu Dec 28, 2006 2:30 am

Post by Sleepy566 »

So if I wanted to change the function of the volume or screen brightness buttons, what would the source look like for that?

Code: Select all

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!
Post Reply