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 

Code Limits in Eboot??

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



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Mon Jan 22, 2007 12:06 pm    Post subject: Code Limits in Eboot?? Reply with quote

Hey everyone,

i came across something really weird during writing my program, my program would refuse to run when i added two new functions in, i went over and over these functions and there was absolutely nothing wrong with them, i then got a hunch that maybe i had too many function and or code in my main.c file so i commented out some other function i knew worked but didnt really need and then compiled and it worked i was amazed, i then went about changing the functions i commented out to make sure it just wasnt a conflict with the first functions i commented out, and no matter which functions i commented out the program worked again, but i tried uncommenting everything and bang the program refuses to run again,

Is there some sort of limit to the amount of code that can be compiled into an eboot or kept in the one .c file?? im using 3.03oeb to test my program
Back to top
View user's profile Send private message
reefbarman



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Mon Jan 22, 2007 12:16 pm    Post subject: Reply with quote

Just to confirm my suspicions i added more code into one of my functions, and bang it refuses to run again and just crashes the psp, how can i fix this break my code up into multiple files?? or is there just a limit that i can go past?
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Mon Jan 22, 2007 10:08 pm    Post subject: Reply with quote

most probably you have an allignment problem in your code. check if the variables which requires allignment are correctly alligned (like gu lists...)
Back to top
View user's profile Send private message Visit poster's website
reefbarman



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Mon Jan 22, 2007 10:35 pm    Post subject: Reply with quote

mmmmm im not using gu list or anything like that really, i am using OSLib but i havent had any problems with allignment with it before and the code i add isnt anything special just initializing variables and such mmmm i might swap some positions of things around though
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Jan 23, 2007 4:36 am    Post subject: Reply with quote

I've seen PSP programs (without embedded roms or such) that were several megs in size (4.6M one was), so I seriously doubt there's any kind of size restriction beyond all the data fitting into the ~24M of RAM available. Maybe you have a compiler switch you're setting that switches on the MIPS equivalent to smallcode model. I don't know if the MIPS even has one, but it would be the first thing I'd think of on an x86 or 68k.
Back to top
View user's profile Send private message AIM Address
reefbarman



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Tue Jan 23, 2007 7:05 pm    Post subject: Reply with quote

mmm i still cant figure it out, im just using boring old cygwin and make files to compile it with maybe i have something bad in my makefile could that be it???? is there any other reason why when i add more code even just an empty for loop or if statement that it crashes the psp??? everything compiles fine
Back to top
View user's profile Send private message
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Tue Jan 23, 2007 9:09 pm    Post subject: Reply with quote

listen to what weltall said, such behaviour is almost certainly caused by some alignment problem.
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
jockyw2001



Joined: 29 Sep 2005
Posts: 339

PostPosted: Tue Jan 23, 2007 10:07 pm    Post subject: Reply with quote

right and usually easy to debug with PSPLINK
Back to top
View user's profile Send private message
reefbarman



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Wed Jan 24, 2007 12:16 am    Post subject: Reply with quote

okay what exactly is an allignment problem?? and im not using psplink should i be?
Back to top
View user's profile Send private message
jockyw2001



Joined: 29 Sep 2005
Posts: 339

PostPosted: Wed Jan 24, 2007 12:29 am    Post subject: Reply with quote

http://www.devx.com/tips/Tip/13265

Psplink allows you to very comfortably run and debug PSP apps. Read the Psplink thread!
Back to top
View user's profile Send private message
reefbarman



Joined: 08 Jan 2007
Posts: 87
Location: Australia

PostPosted: Thu Jan 25, 2007 12:20 am    Post subject: Reply with quote

okay i dont know what happened but i ran my app through psplink and it worked then compiled it for kxploit eboots and it worked with out psplink too, very weird and i changed nothing in the code, anyways thank for you help and i have to say i LOVE psplink
Back to top
View user's profile Send private message
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