| View previous topic :: View next topic |
| Author |
Message |
surfchen
Joined: 10 Dec 2006 Posts: 5
|
Posted: Sun Dec 10, 2006 6:01 am Post subject: Hello World does not work |
|
|
Last month I picked up a PSP with fw2.71.
This weekend I decided to write a homebrew.After reading some articles,I built the PSP Dev Environment ,compiled the HelloWorld sample,copy them to PSP(ms:/PSP/GAME/).But it does not work...
when running this HelloWorld(tow different results with different make options):
if using "make":a error "80020148" occur
elesif using "make kxploit": program stops,and shut down in seconds
My PSP Environment:
FW2.7, HENB AND devhook0.45(it might not related)
My Dev Environment:
Linux,psp sdk built with toolchain.sh,automake 1.9
Code and Make file(it's a sample from Internet):
| Code: |
/// Hello World - My First App for the PSP
/*
This program was created by (Your Name Here) on (Date Here)
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("HelloW", 0x0000, 1, 4);
#define printf pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common)
{
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void)
{
int thid = 0;
thid = sceKernelCreateThread("Callback Thread",CallbackThread,0x11, 0xFA0, PSP_THREAD_ATTR_USER, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main()
{
pspDebugScreenInit();
SetupCallbacks();
printf("Hello World");
sceKernelSleepThread();
return 0;
}
|
| Code: |
TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
Any suggestion and help are welcome...thanks... |
|
| Back to top |
|
 |
TUniqueW

Joined: 09 Dec 2006 Posts: 12
|
Posted: Sun Dec 10, 2006 7:25 am Post subject: |
|
|
HEN B only loads .elf's .... update to HEN-D then you can load 2.71 kerlen eboots ..... OR else use your devhook and emulate 2.71 then load it from there.
Best,
TUW _________________ Developer: C/C++ knows nothing about assembly! |
|
| Back to top |
|
 |
surfchen
Joined: 10 Dec 2006 Posts: 5
|
Posted: Sun Dec 10, 2006 4:46 pm Post subject: |
|
|
thanks..
But I found that many homebrews can run under henb and without devhook..
How can they do that? |
|
| Back to top |
|
 |
TUniqueW

Joined: 09 Dec 2006 Posts: 12
|
Posted: Sun Dec 10, 2006 5:41 pm Post subject: |
|
|
| surfchen wrote: | thanks..
But I found that many homebrews can run under henb and without devhook..
How can they do that? |
I think you may can find how to make them for HEN in HEN SDK (but thats for HEN-D but it may help).....
HEN uses 2.71's kernel so your limited in making hombrew for it.
and finally,
your welcome :D _________________ Developer: C/C++ knows nothing about assembly! |
|
| Back to top |
|
 |
surfchen
Joined: 10 Dec 2006 Posts: 5
|
Posted: Sun Dec 10, 2006 8:07 pm Post subject: |
|
|
Hi, TUniqueW, I have updated to hend.But my helloworld still not works. :(
Could anyone code a sample homebrew which can compiled and runs on 2.71 for me? |
|
| Back to top |
|
 |
Ramon
Joined: 29 Jun 2006 Posts: 17
|
Posted: Mon Dec 11, 2006 9:32 pm Post subject: |
|
|
| In your makefile, there are spaces at the end of some lines. Try removing it. (I think I had the same problem...) |
|
| Back to top |
|
 |
|