Archive for the Lessons Category

PSP Programming – Lesson 1: Setting up your dev. environment

Posted in Lessons, PSP, Programming on 22, May - 2008 by k0s4

Well, just to more or less announce this. I am going to create a series of guides that shows how to program for the PSP. I know that many of you want to begin, but don’t want to because of bad time or other bad excuses. Everyone can :) So, let’s get started.

P.S.: All of my guides are going to be designed like this one, please post feedback! and maybe a link to your first one, I will post it in the end of the post then =D

Info: This guide is about preparing eveything to get ready for programming, it is a little bit time consuming.

Time: 1 – 6 hours (Please give feedback so this time can be accurate!)

Things you need:

  • Cygwin - Used to emulate linux, as PSP Homebrews are created in Linux.
  • PSP Toolchain – Used to create the homebrews.
  • A couple of good movies

Preparing:

  1. Unpack everything inside the PSP Toolchain Download to your desktop.
  2. Start setup.exe from the Cygwin download

The Guide:

  1. When the setup.exe file has opened press ‘Next’, select ‘Install from Internet’ and press ‘Next’ again.
  2. Choose where to install it (“C:/cygwin” is preferred), set ‘Install for’ to ‘All users’ and set ‘Default Text File Type’ to ‘UNIX/binary’.
  3. Now select a temporary folder for the install files, I would put this on the desktop so that I can easily delete it afterwards. Press ‘Next’.
  4. If you are using a proxy configure it yourself, if you do not know what a proxy is or do not use it. Select ‘Direct Connection’ and press ‘Next’.
  5. Here you may choose from a huge list of download servers, you got to be lucky to get a fast one. Pick one that uses the same ending as your country (e.g. ‘.no’, ‘.se’ or ‘.com’) or a country nearby. Press ‘Next’.
  6. Wait a few seconds and a list pop ups. Scroll down to ‘Devel’ and press the “Circle and Arrow” symbol until it says ‘Install’. Scroll down to ‘Editors’ and do the same; and at last, scroll down to ‘Web’ and press the ‘+’ Symbol. Scroll down even more until you get to ‘wget’ (This stands in the package field!) and press the “Circle and Arrow” symbol until it says ‘1.10.2-2′ or a higher number. Press ‘Next’.
  7. This may take some time so go watch a movie.
  8. So you’re back and it’s finished? Good! Click ‘Finish’.
  9. Run cygwin.bat (Default: “C:/cygwin/cygwin.bat”) and write: “nano .bashrc” and press enter.
  10. Go to the bottom of the file (Yes, it’s scrollable) and at the very last line write, “export PSPDEV=/usr/local/pspdev”, press enter and then write “export PATH=$PATH:$PSPDEV/bin”.
  11. Press Ctrl+O, enter, Ctrl+X and Ctrl+D in order.
  12. Run cygwin.bat again and type “cd C:/Users/ < Insert your username > /Desktop/psptoolchain” on Vista or “cd C:/Documents and Settings/ < Insert your username > /Desktop/psptoolchain” on XP. Press enter.
  13. Now write “./toolchain.sh” you thought one movie was long? Now it’s time for two!
  14. Good movie? Well, we’re nearly at the end now so stay awake! Close cygwin.bat and continue the tutorial
  15. Go to the folder you installed cygwin, “C:/cygwin” as default and right-click on the file cygwin.bat and press edit.
  16. Notepad will pop up and you must paste this into your file:
  17. @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

    Change ‘C:’ to whatever your install path is and save the file.

  18. Well, that’s it. You are now ready to be a programmer, so stay tuned for the next lesson. Go watch a movie when you wait ;)