PSP Pro GamerZ

For all your PSP Needs
AKA Team Unknown Forum
 
HomeFAQRegisterLog in
---- Welcome to Team Unknown's official Forum, Don't forget to Register on the forum. Be sure to check out all of our projects such as uo DSONPSP and DigiPSP Also Check out our PSP Programming Tutorials Very Happy ----

Share | 
 

 Wanna make your first psp program?

Go down 
AuthorMessage
DeMeTriC

avatar

Posts : 5
Points : 9
Join date : 2011-01-29
Age : 23
Location : ~Over There>>

PostSubject: Wanna make your first psp program?   Wed Feb 02, 2011 4:49 pm

hi im going to explain how to make your first psp program and how to set up your environment. im going to try to make it as short and simple as possible. THIS IS VERY BRIEF

~No i can't teach you C programming. if you want to learn that click[You must be registered and logged in to see this link.] or [You must be registered and logged in to see this link.]
~also click the links for more informative hello world tutorials Very Happy ^ ^

Download these:
CYGWIN : [You must be registered and logged in to see this link.]
Toolchain: [You must be registered and logged in to see this link.]
PSP SDK: [You must be registered and logged in to see this link.]

Go to the start menu and go to C:/cygwin and open the bash shell which will lead you to the command line. Once you see "yourusername@yourcomputername ~" you may close the window, your environment has successfully set up.

when you download toolchain extract the files to C:/cygwin/home/[your use name]

Your cygwin have to find your pspsdk so change "C:/cygwin/cygwin.bat" right click on cygwin.bat. Select "Edit" and a Notepad window should appear with the following (you'll need to replace all instances of "C:" with "D:" or "E:" or "_:" if you installed CYGWIN on a drive other than your "C:" drive):

change
Code:
echo off

C:
chdir C:\cygwin\bin

bash --login -i

to

Code:

@echo off

C:
chdir C:\cygwin\bin

set path=%path%;C:/cygwin/usr/local/pspdev/bin
set PSPSDK=C:/cygwin/usr/local/pspdev
bash --login -i

Now you're done setting up your enviroment! simple?

This is the Hello World code

Hello World
Code:

 //Hello World Program
 /*
  Created by (Name)
  On (Date)
*/
 
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspcallbacks.h>
 
#define printf pspDebugScreenPrintf
 
PSP_MODULE_INFO("Hello World",0,1,1);
 
int main() {
   pspDebugScreenInit();
   pspDebugScreenClear();
   SetupCallbacks();
   printf("Hello World");
   sceKernelSleepThread();
   return 0;
}

Make a Makefile and edit it like below.
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

Now open your Cygwin batch file and hit make and it should make you a EBOOT.PBP file.
i hope you guys like it Razz
Back to top Go down
KaZ
Admin
avatar

Posts : 131
Points : 204
Join date : 2010-09-20
Location : In The Sky

PostSubject: Re: Wanna make your first psp program?   Thu Apr 21, 2011 4:32 am

Nice but noobs will get stuck on cygwin, preferebly better if just using pspsdk Wink

_________________
Experienced in C/OSLIB/C++/C#/HTML/PHP/HTML5/Javascript/Graphics and more...
PSP 1000 x1 Running 5.00M33-6
PSP Go x1 Running HBL Rev 101 V6.20
Team Unknown Leader

My Master Star aka NightStar3 [You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
Back to top Go down
 
Wanna make your first psp program?
Back to top 
Page 1 of 1
 Similar topics
-
» How do you make a mmv ?
» How to make yourself look like a smurf.
» I Just Wanna Say Hi
» Jester java chess program
» How do you make your fantage character, your avatar?

Permissions in this forum:You cannot reply to topics in this forum
PSP Pro GamerZ :: PSP :: C++ Tutorials/OSLIB/MIPS/Programming-
Jump to: