How to port homebrew form 1.5 to run on 3.x
How to port homebrew form 1.5 to run on 3.x
I am trying to port my homebrew from 1.5 to run in 3.x custom firmware. I follow the method of CpuWhiz on this thread (http://forums.ps2dev.org/viewtopic.php? ... 96f9268c1e)
- Add this 2 line into make file before include..
BUILD_PRX = 1
PSP_FW_VERSION = 371
- use only user mode in main
PSP_MODULE_INFO("My Homebrew", 0, 1, 0);
PSP_HEAP_SIZE_KB(20480);
- bring the EBOOT.PBP to run in 3.x
dont use kxploit or % folder
But it doesn't work for me.
After start my homebrew, i got error message
"The game could not be started" 80020148
Is there another thing to do to compile my source to run for 3.x version? or i miss something
- Add this 2 line into make file before include..
BUILD_PRX = 1
PSP_FW_VERSION = 371
- use only user mode in main
PSP_MODULE_INFO("My Homebrew", 0, 1, 0);
PSP_HEAP_SIZE_KB(20480);
- bring the EBOOT.PBP to run in 3.x
dont use kxploit or % folder
But it doesn't work for me.
After start my homebrew, i got error message
"The game could not be started" 80020148
Is there another thing to do to compile my source to run for 3.x version? or i miss something
ok
i am just a stupid one...
So,these are all the kernel thread that cant use in 3.xx isn't it
sceKernelExitGame()
sceKernelCreateCallback
sceKernelRegisterExitCallback
sceKernelSleepThreadCB
sceKernelStartThread
but if it yes,
shouldn't it give me an error number 0x8002013C isn't it?
however i should know that those function is kernel call. T T
i am just a stupid one...
So,these are all the kernel thread that cant use in 3.xx isn't it
sceKernelExitGame()
sceKernelCreateCallback
sceKernelRegisterExitCallback
sceKernelSleepThreadCB
sceKernelStartThread
but if it yes,
shouldn't it give me an error number 0x8002013C isn't it?
however i should know that those function is kernel call. T T
?
even i try to build this simplest hello world program
it still give me the same error code
(copy form ZX)
Does anyone have idea what happen?
i feel like that it should be something wrong...
main.c
==============================================
#include <pspdebug.h>
#include <pspsdk.h>
PSP_MODULE_INFO("MyNameIs", 0x0, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
int
main(int argc, char *argv[])
{
return 0;
}
==============================================
makefile
==============================================
TARGET = MyNameIsFW3x
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX=1
PSP_FW_VERSION=340
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = MyNameIsFW3x
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
==============================================
even i try to build this simplest hello world program
it still give me the same error code
(copy form ZX)
Does anyone have idea what happen?
i feel like that it should be something wrong...
main.c
==============================================
#include <pspdebug.h>
#include <pspsdk.h>
PSP_MODULE_INFO("MyNameIs", 0x0, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
int
main(int argc, char *argv[])
{
return 0;
}
==============================================
makefile
==============================================
TARGET = MyNameIsFW3x
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX=1
PSP_FW_VERSION=340
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = MyNameIsFW3x
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
==============================================
errkk
Finally, i can build hello world to run on 3.xx CFW.
from above code, i just trun off these two lines.
BUILD_PRX=1
PSP_FW_VERSION=340
I know it may sound strange to the way we understand
that we should set BUILD_PRX to be on...
But may be it is my toolchain that has some strange setting. dont know? :(
Finally, i can build hello world to run on 3.xx CFW.
from above code, i just trun off these two lines.
BUILD_PRX=1
PSP_FW_VERSION=340
I know it may sound strange to the way we understand
that we should set BUILD_PRX to be on...
But may be it is my toolchain that has some strange setting. dont know? :(
You really haven't looked at ANY of the sample code, have you? Look at any 3.xx app and you'll see this line in main:
3.xx REQUIRES the app to be user mode.
BUILD_PRX=1 is needed if you plan to load external prx libraries which do kernel mode calls. Otherwise, you don't need that.
Code: Select all
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
BUILD_PRX=1 is needed if you plan to load external prx libraries which do kernel mode calls. Otherwise, you don't need that.
Hi
At first, i accepted that didn't look at any of sample code for 3.xx before.
(because i can't fine anyone at that time)
The only one clue that i found is the link in the first post that CpuWhiz
describe about how to port code from 1.5 to 3.x.
As i can understand it is only use usermode in PSP_MODULE_INFO()
and set BUILD_PRX = 1 in make file.
not thing mention about PSP_MAIN_THREAD_ATTR.
Then after many fail to run, i can found the hello world demo for 3.x
(from zx as i post in the secone post, but i change it a littlebit).
But it doesn't work for me too until i remove the line "BUILD_PRX=1".
I dont know what to say that why just those 3-4 lines of code cannot work?
(It has both PSP_MAIN_THREAD_ATTR = user and BUILD_PRX=1 already)
So if it possible, can anyone please give a link or demo of helloworld with makefile
that can suddenly+instant build and run on 3.x please.
PS. for hornesty, i didn't want to blame anyone.I just want to find out the mystery that i found. :)
At first, i accepted that didn't look at any of sample code for 3.xx before.
(because i can't fine anyone at that time)
The only one clue that i found is the link in the first post that CpuWhiz
describe about how to port code from 1.5 to 3.x.
As i can understand it is only use usermode in PSP_MODULE_INFO()
and set BUILD_PRX = 1 in make file.
not thing mention about PSP_MAIN_THREAD_ATTR.
Then after many fail to run, i can found the hello world demo for 3.x
(from zx as i post in the secone post, but i change it a littlebit).
But it doesn't work for me too until i remove the line "BUILD_PRX=1".
I dont know what to say that why just those 3-4 lines of code cannot work?
(It has both PSP_MAIN_THREAD_ATTR = user and BUILD_PRX=1 already)
So if it possible, can anyone please give a link or demo of helloworld with makefile
that can suddenly+instant build and run on 3.x please.
PS. for hornesty, i didn't want to blame anyone.I just want to find out the mystery that i found. :)
Ah.. i should know that requesting for something too easy is not
proper in the professional board like this.
But what is the point of the replies like...
"didn't you never read any code, have you try to search?"
It seems like just reply without read the previous posts, situation :(
back to the topic
At first the thread that i had found tell me that..
(http://forums.ps2dev.org/viewtopic.php? ... 96f9268c1e)
==============================================
"3.xx firmwares require your homebrew be in prx format. To get your homebrew in this format, you need to follow a few basic steps:...."
==============================================
It clear to me that i must set BUILD_PRX to 1.
But now J.F. said..
==============================================
"BUILD_PRX=1 is needed if you plan to load external prx libraries which do kernel mode calls. Otherwise, you don't need that."
==============================================
Those info seem to be conflict.
However, as the result of my trial and error, it seems the the later info is right.
Should anyone go back to post/edit that info into the above thread.
I think that is the popular one that can found easily when search about this topic.
proper in the professional board like this.
But what is the point of the replies like...
"didn't you never read any code, have you try to search?"
It seems like just reply without read the previous posts, situation :(
back to the topic
At first the thread that i had found tell me that..
(http://forums.ps2dev.org/viewtopic.php? ... 96f9268c1e)
==============================================
"3.xx firmwares require your homebrew be in prx format. To get your homebrew in this format, you need to follow a few basic steps:...."
==============================================
It clear to me that i must set BUILD_PRX to 1.
But now J.F. said..
==============================================
"BUILD_PRX=1 is needed if you plan to load external prx libraries which do kernel mode calls. Otherwise, you don't need that."
==============================================
Those info seem to be conflict.
However, as the result of my trial and error, it seems the the later info is right.
Should anyone go back to post/edit that info into the above thread.
I think that is the popular one that can found easily when search about this topic.
There's no conflict there. While you CAN get away with not using BUILD_PRX=1 by not loading any external kernel mode prxs, the program will still work with it anyway. You were looking at one very general summary in that thread. There are other threads on 3.xx programming that provide sample code and makefiles and such. You seem to have stopped looking after finding a single thread. Please read AS MANY old threads as possible. Some threads have been superseded by others with newer/better info. It's rare that threads get edited - instead, you are expected to find newer posts/threads with the correct info. Other threads will have MORE info, such as examples.cp25stack wrote:Ah.. i should know that requesting for something too easy is not
proper in the professional board like this.
But what is the point of the replies like...
"didn't you never read any code, have you try to search?"
It seems like just reply without read the previous posts, situation :(
back to the topic
At first the thread that i had found tell me that..
(http://forums.ps2dev.org/viewtopic.php? ... 96f9268c1e)
==============================================
"3.xx firmwares require your homebrew be in prx format. To get your homebrew in this format, you need to follow a few basic steps:...."
==============================================
It clear to me that i must set BUILD_PRX to 1.
But now J.F. said..
==============================================
"BUILD_PRX=1 is needed if you plan to load external prx libraries which do kernel mode calls. Otherwise, you don't need that."
==============================================
Those info seem to be conflict.
However, as the result of my trial and error, it seems the the later info is right.
Should anyone go back to post/edit that info into the above thread.
I think that is the popular one that can found easily when search about this topic.