PSP Hacks - Forums

Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2009, 01:50 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default Problem displaying simple image in PSP

Hi, guys im new to psp programming. I was reading those tutorials on http://www.psp-programming.com/tutorials/c/lesson04.htm. I ve done everything well that was on that tut and even run the program on psp. Then i wrote a simple program that only displays an image in the screen of PSP. but psp stays blank and when i press HOME it freezes in"please wait.." Please help me, ...
Here is my source code with the image: http://rapidshare.com/files/22450998...ydeoN.rar.html
Here is the program of psp-programming tutorial http://www.megaupload.com/?d=RVXI0H3C
Reply With Quote
  #2  
Old 04-22-2009, 02:23 PM
over_clox over_clox is offline
PSP Hacks Member
 

Join Date: Mar 2009
Location: Middle of Nowhere, Mississippi
Posts: 297
over_clox is infamous around these partsover_clox is infamous around these partsover_clox is infamous around these parts
Default

You also have to put your main program code in an infinite loop, something like this:
Code:
int main(void) {
	pspDebugScreenInit();
	setupCallbacks();

	while(1) {
		// Do your stuff here
		}
	}
	return 0;
}
The callbacks will handle exiting out of this loop. The end of the main() function should never actually be reached if I'm not mistaken.

I haven't tested this on your source, but I'm sure it should help you get it going.
__________________
2 Phat PSPs: First went through hell, reassembled scrap parts from 2 bad PSPs. Second is practically new except a repaired battery clip, both running 3.52 M33-4, first clean install, second modded. No, not planning to upgrade either.

Last edited by over_clox; 04-22-2009 at 02:26 PM.
Reply With Quote
  #3  
Old 04-22-2009, 02:26 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default

cool, i will try it later on...btw, where do you learned to program in PSP ?
Reply With Quote
  #4  
Old 04-22-2009, 02:43 PM
over_clox over_clox is offline
PSP Hacks Member
 

Join Date: Mar 2009
Location: Middle of Nowhere, Mississippi
Posts: 297
over_clox is infamous around these partsover_clox is infamous around these partsover_clox is infamous around these parts
Default

I'm still new to the language myself, and I'm only a few steps ahead of you right now. My knowledge of C/C++ started off from translating some parts of sources from C to QBasic back in the day, plus a little experimental side work with assembly.

The PSP is a little different, that's for sure, but most of it is straight C/C++ on top of a proprietary SDK. Most of the stuff that applies to the Cygwin environment also applies to the new SDK you're now using, so you might want to check out the link I already gave you because you'll learn a lot no matter which environment you use.

I'll just skip you ahead past the Cygwin installation lesson this time:
http://www.psp-programming.com/tutorials/c/lesson02.htm
__________________
2 Phat PSPs: First went through hell, reassembled scrap parts from 2 bad PSPs. Second is practically new except a repaired battery clip, both running 3.52 M33-4, first clean install, second modded. No, not planning to upgrade either.
Reply With Quote
  #5  
Old 04-22-2009, 03:06 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default

ok, thanks a lot
Reply With Quote
  #6  
Old 04-22-2009, 04:01 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default

do you use PSPLink?
Reply With Quote
  #7  
Old 04-22-2009, 04:24 PM
Furypaw's Avatar
Furypaw Furypaw is offline
Programmer
PSP Veteran
 
Join Date: Jul 2007
Location: Furypaw.rar
Posts: 1,058
Furypaw is on a distinguished road
Default

Like I said, it's much easier to begin with OSLib, and then later move on to the PSP's native libraries if you feel competent enough.
__________________
Reply With Quote
  #8  
Old 04-22-2009, 04:41 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default

ok, and OSlib is another library right? I will install it right now. One more thing:im using the MinPSPW, Dev-C++ to only write the code and MS DOS to compile the source. I tried to install psplink, and i already copied the path psplink to psp. But how can i access PSP with MS DOS? is it possible or should i use Eclipse to do it?
Reply With Quote
  #9  
Old 04-25-2009, 12:36 AM
Furypaw's Avatar
Furypaw Furypaw is offline
Programmer
PSP Veteran
 
Join Date: Jul 2007
Location: Furypaw.rar
Posts: 1,058
Furypaw is on a distinguished road
Default

I would advise you learn how to use DOS before you go anywhere then O.O'
__________________
Reply With Quote
  #10  
Old 05-05-2009, 05:40 PM
zydeon zydeon is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 13
zydeon Has a Beginner Reputation
Default

is there any IDE that simulates the output in PSP? that would be perfect, you wouldnt have to send the eboot all the time to psp. Psp link makes it easier but even so i would prefer that IDE x)
Reply With Quote
Reply

Tags
c++, display, image, programming, psp

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:09 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©