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 

[SOLVED]My SDL app doesn't work on fw 5.xx anymore

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



Joined: 30 Oct 2007
Posts: 35

PostPosted: Wed Feb 11, 2009 1:05 am    Post subject: [SOLVED]My SDL app doesn't work on fw 5.xx anymore Reply with quote

Hello everyone,

I've been searching on the forums and on google, but I just can't seem to find the answer. I've been working on a simple 2D engine with SDL and a while back when I was on fw 3.90 it worked like a charm, but now on fw 5.0 M33-3 it doesn't do anything anymore. When I'm debugging in Eclipse and running the prx with psplink everything works fine, but the EBOOT doesn't work. I'm sure I've missed something important but sadly I haven't had much time to use my PSP and now that I have more time, it seems there's another setback.

I'm also working on a 3DS model viewer and that works (somewhat, it doesn't render all the triangles for some reason, displaying a 'shredded' teapotl). Is it SDL related?

Can someone shed some light on this?
_________________
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl


Last edited by Oguz286 on Wed Feb 11, 2009 11:05 am; edited 1 time in total
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Wed Feb 11, 2009 8:32 am    Post subject: Re: My SDL app doesn't work on fw 5.xx anymore Reply with quote

Oguz286 wrote:
Hello everyone,

I've been searching on the forums and on google, but I just can't seem to find the answer. I've been working on a simple 2D engine with SDL and a while back when I was on fw 3.90 it worked like a charm, but now on fw 5.0 M33-3 it doesn't do anything anymore. When I'm debugging in Eclipse and running the prx with psplink everything works fine, but the EBOOT doesn't work. I'm sure I've missed something important but sadly I haven't had much time to use my PSP and now that I have more time, it seems there's another setback.

I'm also working on a 3DS model viewer and that works (somewhat, it doesn't render all the triangles for some reason, displaying a 'shredded' teapotl). Is it SDL related?

Can someone shed some light on this?


Try updating to 5.00 M33-6 see if that helps!
Back to top
View user's profile Send private message AIM Address
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Wed Feb 11, 2009 10:34 am    Post subject: Re: My SDL app doesn't work on fw 5.xx anymore Reply with quote

Wally4000 wrote:

Try updating to 5.00 M33-6 see if that helps!


I just tried it now but unfortunately it still doesn't work. Normally I'd see the memory stick led flash since my engine is loading some sprites and sounds and I'd see a mouse pointer on the screen when loading the data but now it just doesn't do anything.

Btw, I had the PSP_FW_VERSION = 390 in my Makefile but I commented it out and still no go. I'll try 500 and see if it works.

EDIT: I just changed the code a bit and it returned back to the XMB. What it normally would do is to initialize SDL and when that would fail it would just return 1. Since it's a PSP I added sceKernelExitGame() so it seems that the initialization fails.
It also means that if you don't issue the sceKernelExitGame() command the game won't exit to the XMB even if the end of main() is reached, which makes sense since there are a couple of callbacks running as a thread.
So SDL fails to initialize in fw 5.00 but works in 3.90. Now I've just got to figure out why. Anyone experienced the same?
_________________
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl


Last edited by Oguz286 on Wed Feb 11, 2009 10:43 am; edited 1 time in total
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Wed Feb 11, 2009 10:36 am    Post subject: Reply with quote

were you using the 1.5 kernel in 3.90 M33?

Perhaps your program hasn't been ported correctly to the 5XX kernel.

Set the heapsize? (-256 or -1024)
Building as a PRX?

etc etc.
Back to top
View user's profile Send private message AIM Address
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Wed Feb 11, 2009 10:46 am    Post subject: Reply with quote

No because I have the Slim version, so I can't use the 1.5 kernel (although if I compile my other apps for 1.5 they work on my slim for some reason).

My heapsize is set to MAX and yes I'm also building it as a prx for debugging purposes which works just fine. It's just the EBOOT on the memory card that is giving me trouble.

Btw if it's not ported to the 5.00 kernel correctly (I didn't port anything, I just recompiled it), how come the prx works with psplink? I'm not too experienced with the differences between the old and new kernels so it could be the lack of knowledge.
_________________
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Feb 11, 2009 10:53 am    Post subject: Reply with quote

Oguz286 wrote:
My heapsize is set to MAX and yes I'm also building it as a prx for debugging purposes which works just fine. It's just the EBOOT on the memory card that is giving me trouble.


A heapsize of MAX will make most programs fail to run as not enough memory is left for things like creating threads.
Back to top
View user's profile Send private message AIM Address
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Wed Feb 11, 2009 11:04 am    Post subject: Reply with quote

J.F. wrote:

A heapsize of MAX will make most programs fail to run as not enough memory is left for things like creating threads.


Yes! It works now. I guess you really have to think about heap memory allocation now than you had to before (or I just never noticed it until now). I guess the prx version reserves some memory so that it runs fine but the EBOOT just allocated everything it can find. I'd better be carefull next time. Thank the help guys, I really appreciate it!
_________________
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Feb 11, 2009 6:42 pm    Post subject: Reply with quote

Oguz286 wrote:
J.F. wrote:

A heapsize of MAX will make most programs fail to run as not enough memory is left for things like creating threads.


Yes! It works now. I guess you really have to think about heap memory allocation now than you had to before (or I just never noticed it until now). I guess the prx version reserves some memory so that it runs fine but the EBOOT just allocated everything it can find. I'd better be carefull next time. Thank the help guys, I really appreciate it!


Running in psplink uses the value set by psplink, not yours. Because MAX can cause trouble (especially if you're trying to make one eboot for both phat and slim), a facility was added to the heap sizing to allow you to specify how much to leave free instead of how much to allocate. Just use PSP_HEAP_SIZE_KB, but give a negative value to tell the loader how much ram to leave free. For example, PSP_HEAP_SIZE_KB(-256) tells it to leave 256 KB free and devote the rest to the application heap.
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