PSP Hacks - Forums

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

Notices

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

Join Date: Dec 2005
Posts: 9,427
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.

__________________
Obey Beaker. That is all.


Spoiler:
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 02:21 AM. Reason: Links updated
Reply With Quote
  #2  
Old 01-13-2007, 01:02 AM
ZiNgABuRgA's Avatar
ZiNgABuRgA ZiNgABuRgA is offline
Has green username Moderator
PSP Titan
 

Join Date: Sep 2006
Location: 4CHIN
Posts: 11,078
ZiNgABuRgA has a spectacular aura aboutZiNgABuRgA has a spectacular aura about
Default

Whoa! No cygwin? w00t!!!

Nice work PSdonkey! Though, again, you're not much of a formatting person... XD A bit typer though :)

If you want, I can apply some formatting for you, do you mind?

Thanks for the great guide - next time I go to the library (or I might sacrifice some of my download quota), I'll get that package. Thanks a bunch :)
Reply With Quote
  #3  
Old 01-13-2007, 01:12 AM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Lop-sided Testicule Admin
PSP Titan
 

Join Date: Dec 2005
Posts: 9,427
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

Yeah, I would appreciate it a lot Zingaburga. I'll send you a pm. Also, a note to everyone, the daedalus n64 emulator won't compile as it is, i forgot to upload my modified makefile for daedalus for this enviornment. I will upload it in a while and create a new mediafire download link for everyone.


EDIT:

I uploaded the new modified daedalus makefile and replaced the mediafire download link with the new download link.
__________________
Obey Beaker. That is all.


Spoiler:
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/
Reply With Quote
  #4  
Old 01-13-2007, 02:10 AM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Lop-sided Testicule Admin
PSP Titan
 

Join Date: Dec 2005
Posts: 9,427
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

Hey thanks for the reformat Zingaburga. I edited my first post to the re-formated version that you gave me. Thanks again.
__________________
Obey Beaker. That is all.


Spoiler:
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/
Reply With Quote
  #5  
Old 01-13-2007, 03:33 AM
ZiNgABuRgA's Avatar
ZiNgABuRgA ZiNgABuRgA is offline
Has green username Moderator
PSP Titan
 

Join Date: Sep 2006
Location: 4CHIN
Posts: 11,078
ZiNgABuRgA has a spectacular aura aboutZiNgABuRgA has a spectacular aura about
Default

^^Thanks :) It's a great guide. Hopefully it'll attract more people to develop programs for the PSP. :P
Reply With Quote
  #6  
Old 01-13-2007, 05:04 AM
p0Wer's Avatar
p0Wer p0Wer is offline
Senior Member
PSP Titan
 

Join Date: Dec 2005
Location: England
Posts: 11,558
p0Wer is on a distinguished road
Default

Wow, thanks a lot to read :lol:
__________________
Reply With Quote
  #7  
Old 01-13-2007, 07:09 AM
Man. Man. is offline
Senior Member
PSP Titan
 

Join Date: Feb 2006
Location: ~~~~~~UK~~~~~~
Posts: 3,651
Man. is on a distinguished road
Default

nice new section
__________________
--------------------мαкανєℓι тнα ∂ση--------------------
Reply With Quote
  #8  
Old 01-13-2007, 12:12 PM
Calo Calo is offline
Senior Member
PSP Titan
 

Join Date: Feb 2006
Location: A Land Downunder< Rank: Player
Posts: 7,426
Calo Has a Beginner Reputation
Default

thanks PSdonkey keep the good work coming.
Reply With Quote
  #9  
Old 01-13-2007, 12:48 PM
fimmy's Avatar
fimmy fimmy is offline
Senior Member
PSP Titan
 

Join Date: Aug 2006
Location: ??
Posts: 8,031
fimmy is on a distinguished road
Default

awesome work dude..

always wanted to know how to programme
__________________
Reply With Quote
  #10  
Old 01-13-2007, 12:50 PM
Tuner's Avatar
Tuner Tuner is offline
Senior Member
PSP Titan
 

Join Date: Aug 2006
Location: Kate's Left Nipple
Posts: 6,731
Tuner is on a distinguished road
Default

nice man i will try this out when ive got spare time on my hands... But this is a great new section to start
__________________


If you like this software.... ....buy a penguin!
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 02:11 AM.


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