• Steam recently changed the default privacy settings for all users. This may impact tracking. Ensure your profile has the correct settings by following the guide on our forums.

PSP Programming: Setting up the environment

Roe

Well-Known Member
This thread is going to guide you through the process of installing cygwin and the PSP toolchain on Windows to get ready for compiling programs. So with that said, on with the guide!

Step 1: "The Option Screen"

1.Firstly download this file HERE. This is the file that will download all the files needed to run cygwin.

2. Run it and you should get a screen with some info on cygwin on it. Press next and there will be a screen with 3 options. Depending on your situation you can choose any of them:

Option A
: Install from Internet: Use this if you are on the computer you want to install cygwin on.

Option B: Download without Installing: Use this if you are on a different computer to the computer you want to install cygwin. It will download what you want to a folder and you can put it on a removable storage device and install it later.

Option C: Install from Local Directory: Use this option if you have the files from using Option B.

3. I will guide you through "Option A" now and make the adjustments necessary for the other two options below.

4. Select Install from Internet and you will be presented with a screen asking you three things:

a. The Root Directory. This is where you want to install cygwin to. The default is "X:/cygwin" but you can change it to wherever you want as long as the path doesnt have any spaces in it.

b. What users you want to install cygwin for. Select "All Users" if you are an Admin of your computer or selct "Just for me" if you don't want anyone else to be able to use it.

c. Default text type. Just keep it at Unix/binary.:wink:

When you've made your choice on those 3 things press Next.

5. Next you'll be asked where you want to download the packages to. I'd suggest browsing to "My Documents" but you can save it anywhere you want. Press Next when done.

6. Just press Direct Connection and move on.

7. It will now download a list of mirrors that you can get your packages from. Select any of the ones available to you and press next.

8. Now it will download a package list for you. There will be a big list of packages to choose from but these are the ones you need:

Devel: Scroll down to D in the list and you will see Devel. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Keep it that way.

Editors: Scroll down to E and you will see Editors. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Same as you did for Devel.

Web: Now it's different. Scroll down to W and you will see Web. Click on the + icon next to it and a big list should open up. Scroll down till you get to wget and be sure that it has the latest version number which can be found under the "Current" heading under the "New" heading.

Press Next and you are ready to continue.

9. It will now start to download and install all the packages that you chose. This will take a long time depending on how fast your internet connection is.

Option B Instructions

1. All you have to do is skip the steps 3-4. The only difference is that it doesnt install the files as well as downloading them.

Option C Instructions

1. Follow all the steps as usual except instead of a screen asking you where you want the installation files downloaded to, it will ask you where the files you already downloaded are.

Once it is done, you have succesfully installed cygwin on your system and can move onto installing the PSP toolchain.


Step 2: "Installing the PSP Toolchain"

1. Download this file View attachment bashrc.zip and extract it. Place the .bashrc file into X:/cygwin/home/username/

2. We just need to get two more libraries needed to install the toolchain, GMP and MPFR. To do this just open up Cygwin.bat and copy and paste this block of code into it:
Code:
wget ftp://ftp.gmplib.org/pub/gmp-4.2.4.tar.gz
tar xzvf gmp-4.2.4.tar.gz
cd gmp-4.2.4
./configure
make
make check
make install
cp /usr/local/include/gmp.h /usr/include/
cd ..
wget http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.gz
tar xzvf mpfr-2.4.1.tar.gz
cd mpfr-2.4.1
./configure
make
make check
make install
cp /usr/local/include/mpfr.h /usr/include/
cd ..

3. Now type the following and press enter.
Code:
svn checkout svn://svn.ps2dev.org/psp/trunk/psptoolchain
What this does is download the latest toolchain to install.

4. Go into the psptoolchain directory you just downloaded by typing
Code:
cd psptoolchain
and pressing enter.

5. Next type
Code:
./toolchain.sh
to execute the file toolchain.sh. This installs the toolchain. It can take a few hours to install so go do something else or leave it running overnight. Be sure to be connected to the internet throughout the installation as it downloads files as it needs them.

If you don't want the trouble of installing the toolchain just download this precompiled one that I made. Thanks to XTM for uploading to the server. TOOLCHAIN(VERY OLD NOW, NOT RECOMMENDED) Just put it at "X:/cygwin/usr/local/pspdev". It also has many libraries included.

When it's finished you are ready to start compiling code for the PSP. Documentation of the functions in the PSP SDK is available HERE. I will explain in the next tutorial how to create and compile a basic program.

If anyone has any questions or suggestions just post below. Also, if anyone wants screenshots included, just say the word. The only reason I didn't include them now is because of my dial-up.
 

Cheezeball99

But I was committed after that birthday party...
No comments?

Well, to be honest, this isn't something you should probably expect many comments on- it's not like people have questions about anything or anything- these are more of a set of instructions, and the lack of comments showed that the guide is thorough, precise, and easy to follow. Good job.:thumbup1:
 

Darkchild

The Doctor
Well, to be honest, this isn't something you should probably expect many comments on- it's not like people have questions about anything or anything- these are more of a set of instructions, and the lack of comments showed that the guide is thorough, precise, and easy to follow. Good job.:thumbup1:

Underlined =3
 

XTM_Rage

aXr^2 Developer
You've got a willing listener here. :D
 

Cheezeball99

But I was committed after that birthday party...
Yuppers, do it.
 

Roe

Well-Known Member
I have updated the post with the latest toolchain, precompiled. If someone could upload it to exo's server for me it would be great as I uploaded it to mediafire and I don't want to upload it again with my connection
 

XTM_Rage

aXr^2 Developer
I have updated the post with the latest toolchain, precompiled. If someone could upload it to exo's server for me it would be great as I uploaded it to mediafire and I don't want to upload it again with my connection

As per your request, and to return the favor, here it is. I have uploaded it.XD View attachment 3810
 

Gwapingn8

New Member
yeah!!!! me too... i'm going to book mark this.... i'm trying to learn more about psp encoding.. maybe i could give back to the psp community for all the great things it has accomplished with my own psp.

so yes roe-ur-boat... i'd love to learn more
 

angelsniper45

New Member
yes add the DevC++ IDE, that would be nice
 

january39

eXo Staff
Sweeet, only just found this. Nice guide.

I know what i shall be doing over my weeks holiday, just get the other half to agree now :w00t:
 

Roe

Well-Known Member
I had completely forgotten I'd made this guide... I will update it for the new toolchain requirements some time tomorrow as it's almost 2 years old. I may also write up more tutorials but I can't promise anything as I haven't had much time lately ):

Edit: Updated the guide with what's needed for the newest toolchain. I wouldn't recommend the precompiled toolchain as it's old and stuff has been updated since then.
 
J

jx233

Guest
I'm getting cygwin too. Where can I get the toolchain to develop for Version 1.50?
 
Top