forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSP turns off with my homebrew, any ideas?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
LuaNoob



Joined: 21 Sep 2005
Posts: 4

PostPosted: Thu Sep 29, 2005 2:11 am    Post subject: PSP turns off with my homebrew, any ideas? Reply with quote

Hi, this is my first post, I've read all the instructions to install cygwin and the pspsdk, after 4 days finally I made it 100% and I was able to copy and build the hello world example, my bios is 1.5 and used the kxploit tool to generate the eboot.pbp and the exploit one, copied them into my memory stick, but after I run the hello world, my psp went to the PSP logo screen, then after some seconds it just turns off, and that's all.

Just in case... After I compiled the hello world example I've got this on screen:

Code:

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
-lc -lpspuser -lpspkernel -o hello.elf
psp-fixup-imports hello.elf
psp-strip hello.elf -o hello_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  hello_strip.elf NULL
rm -f hello_strip.elf


And then:
Code:

$ ls
EBOOT.PBP  Makefile  PARAM.SFO  hello.elf  main.c  main.o


So I've got the eboot.pbp, can anyone tell what did I did wrong?

Thanks for any help


I am new to the PSP Homebrew but not to programming


Oh, I forgot, here is also the hello world code I copied:

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("Hello World", 0, 1, 1);
#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("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
          if(thid >= 0) {
                    sceKernelStartThread(thid, 0, 0);
          }

          return thid;
}
int main() {
   pspDebugScreenInit();
   SetupCallbacks();
   
   printf("Hello World Test");
   sceKernelSleepThread();
   return 0;
}


Thanks for any help
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Thu Sep 29, 2005 3:23 am    Post subject: Reply with quote

The PSP turns off because your thread hangs for some reason, which the watchdog notices this and shuts down the system. Look into installing the exceptionhandler which will give you a hint about what went wrong, instead of just crashing.
_________________
GE Dominator
Back to top
View user's profile Send private message
LuaNoob



Joined: 21 Sep 2005
Posts: 4

PostPosted: Thu Sep 29, 2005 10:24 am    Post subject: Reply with quote

this is really weird...
I compiled the Sprites demo in the SDK, again no problems (while compiling), then generated the KXploit files, put everything in my 1.50 PSP and again it shut off :(

I don't know what is exactly wrong, then I run PSPe 0.9b, and I got this error:
Code:

libpng error: Not a PNG file
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

with my hello world homebrew example, then I compiled the sprite demo from the SDK and got the same error, PSP Shuts off and same error in PSPe.

Anyone have an idea?
My install is a fresh install of cygwin , i did finished installing everything yesterday so I can assume that PSP SDK is the latest.

Thanks =(
Back to top
View user's profile Send private message
LuaNoob



Joined: 21 Sep 2005
Posts: 4

PostPosted: Sat Oct 01, 2005 2:48 am    Post subject: Reply with quote

Well, seems that still I am stuck with this problem...
Here is another update, if someone have an idea that can help me, I've downloaded "ghost_in_the_matrix_v_0_1_src" source code, and I tried to compile it, and got this error:

Code:

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D _droponly -D _m
ute -D _god -D _debug   -c -o main.o main.c
In file included from main.c:21:
home_button.c: In function 'CallbackThread':
home_button.c:21: warning: passing argument 2 of 'sceKernelCreateCallback' from
incompatible pointer type
home_button.c: In function 'SetupCallbacks':
home_button.c:33: warning: passing argument 2 of 'sceKernelCreateThread' from in
compatible pointer type
In file included from main.c:23:
menu_home.c: In function 'waitHomeMenu':
menu_home.c:70: error: 'CTRL_DOWN' undeclared (first use in this function)
menu_home.c:70: error: (Each undeclared identifier is reported only once
menu_home.c:70: error: for each function it appears in.)
menu_home.c:76: error: 'CTRL_UP' undeclared (first use in this function)
menu_home.c: In function 'drawHomeMenu':
menu_home.c:140: error: 'CTRL_START' undeclared (first use in this function)
menu_home.c:140: error: 'CTRL_CROSS' undeclared (first use in this function)
menu_home.c:140: error: 'CTRL_SQUARE' undeclared (first use in this function)
menu_home.c:140: error: 'CTRL_TRIANGLE' undeclared (first use in this function)
menu_home.c:140: error: 'CTRL_CIRCLE' undeclared (first use in this function)
In file included from main.c:24:
menu_howtosurvive.c: In function 'waitHowToSurviveMenu':
menu_howtosurvive.c:67: error: 'CTRL_START' undeclared (first use in this functi
on)
menu_howtosurvive.c:67: error: 'CTRL_CROSS' undeclared (first use in this functi
on)
menu_howtosurvive.c:67: error: 'CTRL_SQUARE' undeclared (first use in this funct
ion)
menu_howtosurvive.c:67: error: 'CTRL_TRIANGLE' undeclared (first use in this fun
ction)
menu_howtosurvive.c:67: error: 'CTRL_CIRCLE' undeclared (first use in this funct
ion)
menu_howtosurvive.c: In function 'drawHowToSurviveMenu':
menu_howtosurvive.c:95: error: 'CTRL_START' undeclared (first use in this functi
on)
menu_howtosurvive.c:95: error: 'CTRL_CROSS' undeclared (first use in this functi
on)
menu_howtosurvive.c:95: error: 'CTRL_SQUARE' undeclared (first use in this funct
ion)
menu_howtosurvive.c:95: error: 'CTRL_TRIANGLE' undeclared (first use in this fun
ction)
menu_howtosurvive.c:95: error: 'CTRL_CIRCLE' undeclared (first use in this funct
ion)
In file included from main.c:25:
menu_credits.c: In function 'waitCreditsMenu':
menu_credits.c:47: error: 'CTRL_START' undeclared (first use in this function)
menu_credits.c:47: error: 'CTRL_CROSS' undeclared (first use in this function)
menu_credits.c:47: error: 'CTRL_SQUARE' undeclared (first use in this function)
menu_credits.c:47: error: 'CTRL_TRIANGLE' undeclared (first use in this function
)
menu_credits.c:47: error: 'CTRL_CIRCLE' undeclared (first use in this function)
menu_credits.c: In function 'drawCreditsMenu':
menu_credits.c:75: error: 'CTRL_START' undeclared (first use in this function)
menu_credits.c:75: error: 'CTRL_CROSS' undeclared (first use in this function)
menu_credits.c:75: error: 'CTRL_SQUARE' undeclared (first use in this function)
menu_credits.c:75: error: 'CTRL_TRIANGLE' undeclared (first use in this function
)
menu_credits.c:75: error: 'CTRL_CIRCLE' undeclared (first use in this function)
main.c: In function 'halt':
main.c:53: error: 'CTRL_START' undeclared (first use in this function)
main.c: In function 'main':
main.c:85: error: 'g_elf_name' undeclared (first use in this function)
make: *** [main.o] Error 1


From here, I assume that (1) my sdk is wrong? cause using different names for variables means I am using the wrong sdk?
(2) my set up is wrong?
(3) or the source code I downloaded shouldn't be compiled with this sdk.

Anyone can help me? I am really confused about which SDK to use, I followed the tutorial posted everywhere, how to instal cygwin, the toolchain and the sdk but seems that I did something wrong?

Thanks.
Back to top
View user's profile Send private message
taejung kim



Joined: 02 Jan 2006
Posts: 3

PostPosted: Mon Jan 02, 2006 12:42 pm    Post subject: Re: PSP turns off with my homebrew, any ideas? Reply with quote

LuaNoob wrote:
Hi, this is my first post, I've read all the instructions to install cygwin and the pspsdk, after 4 days finally I made it 100% and I was able to copy and build the hello world example, my bios is 1.5 and used the kxploit tool to generate the eboot.pbp and the exploit one, copied them into my memory stick, but after I run the hello world, my psp went to the PSP logo screen, then after some seconds it just turns off, and that's all.

Just in case... After I compiled the hello world example I've got this on screen:

Code:

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
-lc -lpspuser -lpspkernel -o hello.elf
psp-fixup-imports hello.elf
psp-strip hello.elf -o hello_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  hello_strip.elf NULL
rm -f hello_strip.elf


And then:
Code:

$ ls
EBOOT.PBP  Makefile  PARAM.SFO  hello.elf  main.c  main.o


So I've got the eboot.pbp, can anyone tell what did I did wrong?

Thanks for any help


I am new to the PSP Homebrew but not to programming


Oh, I forgot, here is also the hello world code I copied:

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("Hello World", 0, 1, 1);
#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("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
          if(thid >= 0) {
                    sceKernelStartThread(thid, 0, 0);
          }

          return thid;
}
int main() {
   pspDebugScreenInit();
   SetupCallbacks();
   
   printf("Hello World Test");
   sceKernelSleepThread();
   return 0;
}


Thanks for any help


um..

i met this problem..
i resolve it..
you modify makefile
"CFLAGS = -O2 -G0 -Wall -mlong32"
"-mlong32" option

good luck!!
Back to top
View user's profile Send private message MSN Messenger
Koba



Joined: 29 Sep 2005
Posts: 59

PostPosted: Wed Jan 04, 2006 3:49 pm    Post subject: Reply with quote

i would uninstall Cygwin, and do a complete reinstall of cygwin and your libs... that usually fixes the problem.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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