PSP Hacks - Forums

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2007, 01:00 AM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Lop-sided Testicule Admin
PSP Titan
 

Join Date: Dec 2005
Posts: 9,406
PSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond repute
Default

So you you check out the front page of PSP-Hacks everyday and see a lot of new games and applications created for the PSP... And, you're thinking, "Man! I wish I could do that!" But then you say to yourself, "There is no way I'm going to go through all the hassle of downloading and setting up cygwin and compiling toolchains and all that." Well now you don't need to do all that and you can become a PSP dev in only a few. steps.


Setting up the PSP Dev Environment

First download this: http://www.mediafire.com/?nnwemenmzzd

FYI: It's a precompiled PSPDev environnment for the PC. There is no need for cygwin which emulates Linux on your Windows PC. The PSPSDK and toolchain are already compiled and transfered to your Windows machine with this package.

Once you install it, it will ask you what directory you would like to install into. Just let it install in the default directory of PSPDEV.
Then it will ask how you want to set up your environmental variables. Just click on the all users options and click next. Now it is installed on your computer.

Next goto where the package was installed on your computer which is
C:\pspdev.
This is presuming that your hard drive is the C: drive. If it is not, then change C: to whatever your hard drive letter is.

In that folder you should see a batch file called pspdev.bat
Right click that file and select Edit It should open the file with some commands inside.
Erase everything that is inside the file and copy and paste this into the file.
Quote:
set path=%path%;C:\pspdev\bin
set PSPSDK=C:\pspdev\psp\sdk
cmd
Again, this is presuming that your hard drive is the C: drive. If not, change it to the letter of your drive.

Then click on File then Save at the top of the file and close it.

Now you have the basics of your PSP dev environment set up.



Testing the PSP Dev Environment

Now you can test your setup by trying to compile a couple of samples that are included in your installation.

Your test samples are located in your C:\pspdev\psp\sdk\samples directory. Take a look at them and lets try to compile one of them. Goto your C:\pspdev folder and double click on the pspdev.bat file we edited earlier. Now a command prompt should appear. Type this into your dos screen
Quote:
cd psp\sdk\samples\audio\wavegen
and hit enter. You can now type
Quote:
dir
and hit the enter key to see the files you have listed in that folder. You should see a makefile and a main.c file.

Now type Make and hit the enter key to compile that sample in that directory. When you type Make, it does all the commands that are in the makefile to compile your program. Every PSP program needs to have a makefile. More about that later.
IF you did it correctly, you should see an EBOOT.PBP in your wavegen folder. Now you can transfer that eboot to your PSP and see the program that you just compiled.

Quote:
*NOTE to 1.50 users* (2.71 SE / 3.0x OE not affected)

That EBOOT that you just compiled is for a 1.0 PSP. If you would like to create an EBOOT with the Wavegen and Wavegen% folders for your 1.5 PSP, you have to do another step. Normally, instead of or after typing make in the command line, you would then type make kxploit to create the 2 folders for the 1.5 PSP. However, there is a bug in this release in the build.mak file which prevents it from working correctly. It will create the 2 folders but one folder will be missing an EBOOT. But do not worry however because I corrected the bug and have uploaded a new build.mak file for everyone to install if they want to make 1.5 EBOOTs. You can download it here:
http://www.mediafire.com/?bzgfq2ftnkf (906KB)

Don't worry about the other folders yet that are in there. We are going to compile those programs later.
Just copy the build.mak file and paste it into this folder C:\pspdev\psp\sdk\lib. It will ask if you would like to overwrite the file. Select Yes and you're done.

Now test it out. Double click your pspdev.bat file again in your C:\pspdev folder and type
Quote:
cd psp\sdk\samples\audio\wavegen
and hit enter. Then
type
Quote:
make kxploit
and hit enter. You should now see the 2 folders wavegen and wavegen% for your 1.5 PSP.
Adding Libraries

Now it's time to add libraries to your setup.
So you are asking, what are libraries? Well as of right now you can compile basic PSP samples and programs for your PSP, however, to take full advantage of creating programs, there have been libraries that have been made for the PSP which do added functions for your programs, such as loading and unloading graphics and playing sound as effects or background music.
For example, there is a library for the PSP called libmad. What it does is loads and plays your MP3 clips and songs. All you would have to do to play an MP3 would be to use the function MP3_Play(); Now if you didn't have that library to use, you could still load and play an MP3 in your program, but it would take like an extra 50 lines of code. Why not save yourself the trouble, and just use one line of code, MP3_Play(); to do the work for you?

Now all the libraries made for the PSP need to be compiled under cygwin and then installed into the right directories. However, none of you need to do this. There is an installer already that has already compiled some libraries for you and it installs them directly into the folders that it needs to be. Download that installer here:
http://www.mediafire.com/?doaimyfqytm (2.51MB)

To be honest with you, this installer is not all that good. It says that it installs these libraries into your pspdev folders:
SDL, SDL_Mixer, PSPGL, LibBulletMl, LibTremor, Jpeg, libpsp2d, libpng, libmad, zlib, and libmikmod.
However, SDL, SDL_Mixer and Jpeg libraries are not correctly installed and have many bugs in them.
I am going to create my own installer soon to correct these bugs and add even more libraries to your setup. It does, however, for the meantime, give you enough libraries to work with to create pretty good programs and go through the entire Programming tutorial that I will post in a minute.

Once you install it, it will ask you what directory you would like to install the files. Just install it in the default directory of pspdev.

Now you are ready to go. To test out your new library setup, go to the folder that you downloaded with the build.mak and the invader folder and daedalus folder. You should now be able to compile the space invader game and also be able to compile the latest Daedalus n64 emulator release R8 XD. Simply place the invader folder and the daedalus folders in your pspdev folder at C:\pspdev.
Then dpuble click the pspdev.bat file to open up your command line and type this to compile the space invader game:
Quote:
cd invaders
Then hit enter and type:
Quote:
make OR make kxploit
(use the KXploit line for making EBOOTs 1.50 compliant)
You should then see your EBOOT file in that folder or 2 folders with 2 EBOOTs if you used the make kxploit command.
To compile the daedalus n64 emulator, just type
Quote:
cd daedalus
and hit enter. Then type
Quote:
cd daedalus
again (since the makefile is in the other folder) and hit enter.
cd means change directories for those who do not know.
Then type either make or make kxploit to create your daedalus EBOOTs.




_________________________________________________________________ __________________

Starting to Program

So you want to learn more about libraries? You want to actually see a library and read the files in it? Not a problem.

Download subversion here:
http://subversion.tigris.org/files/d....4.2-setup.exe (3.4MB)

This program will allow you to download PSP libraries and PSPware that are stored off the internet through your command line.
Now just install it.


Take a look at all the psp libraries here:
http://svn.ps2dev.org/listing.php?re...%2F&rev=0&sc=0

You can browse through them by clicking on each one. Now say you want to download the library libmad (which allows you to load MP3s into your program).
Once you already installed subversion, double click your pspdev.bat file to open up your command line.
Then type this:
Quote:
svn checkout svn://svn.ps2dev.org/psp/trunk/libmad
and hit enter. You should now see your library downloading into your pspdev folder.

Open it up, take a look at it, read the documentations, and try to learn what that library does and how it works.
You can do this with all of the libraries. To download a different library, just take out the word libmad and add the library that you wanted to download.
For example, if you wanted to download the library libpng (which allows you to add .png files to your program), type this in your command screen:
Quote:
svn checkout svn://svn.ps2dev.org/psp/trunk/libpng
and hit enter. Now this and the other libraries do not need to be compiled and installed since we already did that earlier with the library installer. But you can read these libraries to see how they work and how to use them.

Quote:
*TIP*
You can open all of the makefiles and all of the c files with Notepad to view/edit them. However I recommend downloading this IDE which allows you to view each PSP file the way it was meant to be viewed in the correct format with the correct spacing:
http://prdownloads.sourceforge.net/d....9.2_setup.exe (8.9MB)

It will also compile all your C++ programs in my C++ tutorial in my sig.
Install it and open your makefiles and C files with this for better viewing.
Alright so now you are ready to try to tackle your own PSP program. Go though this tutorial which explains how to begin creating your own simple PSP programs:

http://www.psp-hacks.com/forums/f141...ost478381.html

(Start off with lesson 1 as I show you how to print HelloWorld on your PSP)


I will also be going over each of these lessons in detail and making my own games and demos for you to understand and develop your PSP programming. Remember that the more advanced we get, the more you will need to understand C and C++. Try to brush up by reading my C++ tutorial listed in my sig.


So now you all can do the banana dance <insert RaiderX"s banana dance gif> because you are all offical PSP devs XD.

__________________
Want to become a PSP Dev the easy way? Check out my tutorial for the PSP here http://www.psp-hacks.com/forums/f141...orial-t152466/
Want to learn how to create your own games on the PSP? Check out my tutorial here http://www.psp-hacks.com/forums/f141...-your-t153653/
Want to learn how to program C++ ? Check out that tutorial here http://www.psp-hacks.com/forums/f124...ram-c-t122337/

Last edited by Oyabun; 10-01-2009 at 03:21 AM. Reason: Links updated
Reply With Quote
  #2  
Old 11-17-2008, 06:12 PM
AsylumUber AsylumUber is offline
PSP Newbie
 

Join Date: Nov 2008
Posts: 3
AsylumUber Has a Beginner Reputation
Default

shank you, good sir.
Reply With Quote
  #3  
Old 11-18-2008, 01:35 AM
slacker1987 slacker1987 is offline
PSP Enthusiast
 

Join Date: Jun 2008
Posts: 341
slacker1987 will become famous soon enoughslacker1987 will become famous soon enough
Default

I read about half of the tutorial... and then I got lost... and didn't understand what the hell half of any of it it meant, or was talking about.

The sad part? I want to make games one day lol.
Reply With Quote
  #4  
Old 11-18-2008, 02:07 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Programmer
PSP Monk
 

Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,741
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

What don't you understand?
__________________

-Rock Station-
PSN: Xsjado7

Reply With Quote
  #5  
Old 11-18-2008, 02:31 AM
slacker1987 slacker1987 is offline
PSP Enthusiast
 

Join Date: Jun 2008
Posts: 341
slacker1987 will become famous soon enoughslacker1987 will become famous soon enough
Default

The question is, what DO I understand lol.

Hmm... the fact that making games seems to be some sort of elaborate task involving a "development evironment" (which... I still don't quite get), and involves many lines of "code" that does something to something to get something to do something. None of these lines do I understand, nor do I understand why they have to be so elaborate.

It's mind boggling. If there was like some baby step, complete retard's guide to coding and developing... then maybe I might actually learn something... but looking at all of this stuff confuses me, and makes me feel tired. lol
Reply With Quote
  #6  
Old 11-18-2008, 02:49 AM
Xitherun's Avatar
Xitherun Xitherun is offline
Senior Member
PSP Titan
 

Join Date: Nov 2006
Location: http://www.tacticalbread.net76.net/
Posts: 4,499
Xitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of light
Default

Quote:
Originally Posted by slackbabbath View Post
The question is, what DO I understand lol.

Hmm... the fact that making games seems to be some sort of elaborate task involving a "development evironment" (which... I still don't quite get), and involves many lines of "code" that does something to something to get something to do something. None of these lines do I understand, nor do I understand why they have to be so elaborate.

It's mind boggling. If there was like some baby step, complete retard's guide to coding and developing... then maybe I might actually learn something... but looking at all of this stuff confuses me, and makes me feel tired. lol
try learning an easier language, like LUA, or Python. C++ is a hard language to start out with.
__________________
Xylophones inspecting tortured hearts equal rambunctious unicorn's nightmares.

Reply With Quote
  #7  
Old 11-18-2008, 04:13 AM
pspjoke's Avatar
pspjoke pspjoke is offline
Programmer
PSP Guru
 

Join Date: Mar 2008
Location: U.S.
Posts: 1,643
pspjoke is on a distinguished road
Default

Quote:
Originally Posted by slackbabbath View Post
The question is, what DO I understand lol.

Hmm... the fact that making games seems to be some sort of elaborate task involving a "development evironment" (which... I still don't quite get), and involves many lines of "code" that does something to something to get something to do something. None of these lines do I understand, nor do I understand why they have to be so elaborate.

It's mind boggling. If there was like some baby step, complete retard's guide to coding and developing... then maybe I might actually learn something... but looking at all of this stuff confuses me, and makes me feel tired. lol
lol i like how you said that.
"that does something to something to get something to do something."

anyway.. you if your not understanding that i guess maybe you should try LUA..(god i hate lua..... at least non-compiled lua, and i just HATE python, period)

Quote:
Originally Posted by Xitherun View Post
try learning an easier language, like LUA, or Python. C++ is a hard language to start out with.

lol C++ isn't hard at all!!!...

since i program in C++ i think i have sturdy ground when i say that the language is not hard, there are many ways to do one task.
however, certain features of C++ ARE hard if you do not understand them.
(lucky me i have an interest in this and when i find out something new, i learn it instantly normally.)


some of those advanced features are just a better and more efficient way to do something you could do with basic code.
hmm...

@ slackbabbath, maybe you shouldn't learn LUA, as
1. i dislike the language lol.
2. more serious of a reason, C++ will get you further in life.

i've only seen LUA used on the psp for homebrew, i looked it up a while ago and i think its a dead language really...

learn C++.

A bad idea but maybe easier way to start, aside from LUA would be to learn C.

buy a book(a C++ book.), they are really good at walking you through with baby steps if you get the right one.

but if your like me, BROKE and have a huge interest in programming..
you can do it the hardway like i did when i first started.
search the internet for bits and peices of information and eventually learn enough to do just about anything you can think of.

then get some money to finally get a book and magically boost your ability by alot just by simply learning the advanced features of C++.

post is getting long so im cutting it here.
but..

sites you should look at are.
C programming.com
and
http://www.cplusplus.com/

they should help. (i started on psp programming and used http://www.psp-programming.com/tutorials/ to help me creat my first ever program.)

EDIT:

OH!!! one more thing...

http://forums.qj.net/showthread.php?t=145883

^^ pre-compiled cygwin && toolchain.
since you seem to be the ultimate noob. this could be an easy-yet-advance dev environment for you.


__________________
http://levoneprojects.net23.net/

++rep me if i helped you please.
Ahh, shit. Stupidity is on the rise again.
went legit Oct. 31, 09'
piracy is wrong, please don't do it.


Last edited by pspjoke; 11-18-2008 at 04:25 AM.
Reply With Quote
  #8  
Old 11-18-2008, 04:28 AM
Xitherun's Avatar
Xitherun Xitherun is offline
Senior Member
PSP Titan
 

Join Date: Nov 2006
Location: http://www.tacticalbread.net76.net/
Posts: 4,499
Xitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of light
Default

Quote:
Originally Posted by pspjoke View Post
lol C++ isn't hard at all!!!...
lol. you saw how far I got with C++.

anything past that confused the shit out of me.
__________________
Xylophones inspecting tortured hearts equal rambunctious unicorn's nightmares.

Reply With Quote
  #9  
Old 11-18-2008, 11:54 AM
slacker1987 slacker1987 is offline
PSP Enthusiast
 

Join Date: Jun 2008
Posts: 341
slacker1987 will become famous soon enoughslacker1987 will become famous soon enough
Default

Any book recommendations? I'll start looking around and see if I can figure stuff out. Someone I know said start with a basic calculator as a first program, so I guess if I can't figure out how to make that I'm screwed lol.
Reply With Quote
  #10  
Old 11-18-2008, 12:37 PM
pspjoke's Avatar
pspjoke pspjoke is offline
Programmer
PSP Guru
 

Join Date: Mar 2008
Location: U.S.
Posts: 1,643
pspjoke is on a distinguished road
Default

Sams Teach Yourself C++ in One Hour a Day, 6th Edition


thats the book i have. its pretty good, and i think it would be a good book for you.
when i got it a lot of the start was review. now im startingto learn stuff that i didn't know.
http://www.informit.com/store/produc...=9780672329418
__________________
http://levoneprojects.net23.net/

++rep me if i helped you please.
Ahh, shit. Stupidity is on the rise again.
went legit Oct. 31, 09'
piracy is wrong, please don't do it.

Reply With Quote
Reply

 



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 10:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©