PSP_FW_VERSION=271 & 0x1000 (Kernel Mode)
PSP_FW_VERSION=271 & 0x1000 (Kernel Mode)
original post restoration to best of ability:
Trying to create a homebrew compiled with PSP_FW_VERSION=271, was changing
PSP_MODULE_INFO("Test", 0, 1, 1) to PSP_MODULE_INFO("Test", 0x1000, 1, 1)
Everytime I tried to start it would fail with error code 80020148.
Tried adding
BUILD_PRX = 1
USE_KERNEL_LIBS
USE_KERNEL_LIBC
adding -lpspkernel
Nothing worked. Ended up not needing kernel mode after all (thanks Tyranid (: )
the rest was just the basic "Hello World" source code.
Trying to create a homebrew compiled with PSP_FW_VERSION=271, was changing
PSP_MODULE_INFO("Test", 0, 1, 1) to PSP_MODULE_INFO("Test", 0x1000, 1, 1)
Everytime I tried to start it would fail with error code 80020148.
Tried adding
BUILD_PRX = 1
USE_KERNEL_LIBS
USE_KERNEL_LIBC
adding -lpspkernel
Nothing worked. Ended up not needing kernel mode after all (thanks Tyranid (: )
the rest was just the basic "Hello World" source code.
Last edited by califrag on Fri Sep 21, 2007 5:27 pm, edited 2 times in total.
You cannot run in kernel mode in the newer firmwares. So just quit trying to go that direction. Your program MUST run in user mode. Then if you need to call something from kernel mode, you need to put that code into an external PRX that loads and runs in kernel mode. Look at the nanddumper example in the 3xxHEN archive to see what I'm talking about. If you look at the newest version of PPA, you'll see that he had ONE SINGLE function that needed kernel mode - a call to change the audio sample rate, so PPA has everything in user mode with a PRX that has one single function - that audio call.
J.F. Thanks for the response - that clears a lot up - and thanks for stopping me before I invested even more time unsucessfully trying to load kernel mode ;B I've already wasted almost a week lol. I will look into PPA and try the prx route once I'm home from work then will post any results. Thanks again.
Easy mistakes are easy to overlook. Often just talking about them to others allows you to finally see them. That's one reason we ask people to post code when they ask about something. Here's some code on checking for a directory, and making it if it doesn't exist.califrag wrote:Okay I feel like a complete moron now. Thanks for your help JF seems like my problem was the fact that I was trying to load files from a directory that did not exist. BLAH as soon as I created the directory everything went A OK.
Code: Select all
int d;
d = sceIoDopen(dir_name);
if (d >= 0)
/* directory already exists */
sceIoDclose(d);
else
sceIoMkdir(dir_name, 0777);
califrag: Would it be possible for you to restore youe original post? Or at least something similar please?
One of the great thing about forums (as opposed to say, IRC) is that the topics stay up and someone searching along at a later date may have similar issues - keeping these things up will help them too.
One of the great thing about forums (as opposed to say, IRC) is that the topics stay up and someone searching along at a later date may have similar issues - keeping these things up will help them too.
Damn, I need a decent signature!
J.F. wrote:sorry but don't you think that sceiomkdir is enough? that's what i use to make the capture folder in my prx. i call it anyway and it's more optimized (space point of view); after all it won't make another dir, the maximum it could do is return an error.califrag wrote:Doing something like that, you can avoid the hassle of people not copying over required (but empty) directories when installing the app. I learned that the hard way on one of my apps. :)Code: Select all
int d; d = sceIoDopen(dir_name); if (d >= 0) /* directory already exists */ sceIoDclose(d); else sceIoMkdir(dir_name, 0777);
don't you think so?
If I remember correctly, it "kills" the old directory. So if the directory exists, you don't get an error, you just get a "clean" directory and all your stuff in it is gone. It's been a while since I worked on that, so I might be remembering that incorrectly. Anywho, looking for the directory before making it also allows you to do something if it does exist compared to when it doesn't. For example, maybe in the does exist branch, you look for some files. It would be silly to look for files right after making the directory - it's empty. So the code I gave could be expanded for other purposes.weltall wrote:sorry but don't you think that sceiomkdir is enough? that's what i use to make the capture folder in my prx. i call it anyway and it's more optimized (space point of view); after all it won't make another dir, the maximum it could do is return an error.J.F. wrote:Doing something like that, you can avoid the hassle of people not copying over required (but empty) directories when installing the app. I learned that the hard way on one of my apps. :)Code: Select all
int d; d = sceIoDopen(dir_name); if (d >= 0) /* directory already exists */ sceIoDclose(d); else sceIoMkdir(dir_name, 0777);
don't you think so?