Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
March 21, 2010, 12:12:09 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Welcome to PSP-Programming.com
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: [Tutorial]The Easy + Quick Way To Start Developing in C/C++!  (Read 7574 times)
bronxbomber92
Give miinaturvat Points!
All-Around Dev
Hero Member
*

Karma: +16/-2
Offline Offline

Posts: 664
3697.59 points

View Inventory
Send Money to bronxbomber92

View Profile
« on: July 19, 2006, 07:35:18 AM »

Please note all credit for the tutorials goes to dalejrrocks

P.S. Since this text is automatically formatted, there may be some spaces where they don't need to be. So if you see spacing like "controlle r", understand that i didn't do that on purpose and that it should be "controller".

###INTRODUCTION###

For some months now, I have been wanting to start/try developing for the PSP in C/C++. I read some of the tutorials explaining how to set up and use mingw or cygwin. Most of the tutorials were complex, and required a lot of downloading of huge files. I have dial-up, so I couldn’t really sit there all day and watch these files download. I am sure some others feel this way also. Anyways, I think that this may be one of the easiest and quickest(because of the small download sizes)ways to set up the PSPSDK, and the toolchain/compiler on a windows machine. So here we go:

###INSTALLATION###

1.) Go download the precompiled windows toolchain/compiler + PSPSDK from:
http://xorloser.com/PSPDevWin32.zip

2.) Extract the .zip file somewhere on your hard-drive.

3.) Launch the .exe file and go through the installation. You should install the package to X:\pspdev\ where X is the letter of your hard-drive. This directory is the default setting on the installer anyways.

4.) Find your way to your x:\pspdev\ folder using the Windows Explorer. Create a new .bat file in that folder and name it whatever you want. I named mine start.bat. Next, make sure your .bat file includes the following code:
Code:

set path=%path%;x:\pspdev\bin  
set PSPSDK=x:\pspdev\psp\sdk
cmd

5.) Delete the pspdev.bat file from your x:\pspdev\ folder. The file that we created in step 4 configures the settings for your environment. You don’t need the other pspdev.bat file that came with the package. Or you may keep it if you want. That’s up to you. :icon_wink

6.) Use the Windows search engine to search for a file called cygwin1.dll. Look at the file properties for all of the results and keep the newest one in x:\pspdev\bin\. Delete the other older files. I use the cygwin1.dll file with the build date of 2006-01-20 13:28 and it works great. If you don’t delete the other files the compiler will get an error.

7.) Now, you are done! Congrats, you have a working psptoolchain and PSPSDK along with the compilers installed on your computer.

###COMPILING AN EXAMPLE FILE###

a.) Double-click your .bat file that you created in step 4 of the installation. It should start with the command prompt saying something like this:
Code:
C:\pspdev>set path=C:\Python24\.;C:\WIN  DOWS\SYSTEM32;C:\WINDOWS;  C:\WINDOWS\SYSTEM32\WBEM;  C:\WINDOWS\SYSTEM32\WSG32  \;C:/pspdev/bin;C:/pspdev2/bin;c:\pspdev\bin


C:\pspdev>set PSPSDK=C:\pspdev\psp\sdk

C:\pspdev>cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\pspdev>

Of course, instead of C it will show the letter of your drive.

b.) Type cd psp\sdk\samples\controlle r\basic and hit enter to go to the x:\pspdev\psp\sdk\samples \controller\basic directory.
You should get something like this:
Code:
C:\pspdev\psp\sdk\samples  \controller\basic>

c.) Type make and hit enter.
You should get something like this in the command prompt and and eboot in the x:\pspdev\psp\sdk\samples \controller\basic folder:
Code:

psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -LC:/pspdev/psp/sdk/l
ib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lp
spnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -
o controller_basic.elf
psp-fixup-imports controller_basic.elf
mksfo 'Basic controller sample' PARAM.SFO
psp-strip controller_basic.elf -o controller_basic_strip.el  f
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  controller_basic_strip.el  f NULL
rm -f controller_basic_strip.el  f

C:\pspdev\psp\sdk\samples  \controller\basic>
Logged



scripzero
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4
76.41 points

View Inventory
Send Money to scripzero

View Profile
« Reply #1 on: July 25, 2006, 05:02:07 AM »

Quote from: "bronxbomber92"

c.) Type make and hit enter.
You should get something like this in the command prompt and and eboot in the x:\pspdev\psp\sdk\samples \controller\basic folder:
Code:

psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -LC:/pspdev/psp/sdk/l
ib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lp
spnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -
o controller_basic.elf
psp-fixup-imports controller_basic.elf
mksfo 'Basic controller sample' PARAM.SFO
psp-strip controller_basic.elf -o controller_basic_strip.el  f
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  controller_basic_strip.el  f NULL
rm -f controller_basic_strip.el  f

C:\pspdev\psp\sdk\samples  \controller\basic>


When i typed "make" it did not show  any things.Howw comeee
plz give me some advice thank you
Logged

Hello psp!
whazilla
Sr. Member
****

Karma: +2/-8
Offline Offline

Posts: 377
1793.33 points

View Inventory
Send Money to whazilla


View Profile
« Reply #2 on: July 25, 2006, 12:44:55 PM »

Quote from: bronxbomber92
Please note all credit for the tutorials goes to dalejrrocks

Code:

set path=x:\pspdev\bin;%path%
set PSPSDK=x:\pspdev\psp\sdk
cmd


try to edit bat file again and set paths straight
Logged
scripzero
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4
76.41 points

View Inventory
Send Money to scripzero

View Profile
« Reply #3 on: July 25, 2006, 04:20:06 PM »

Ohh, thank for reply my question
i'll try
Logged

Hello psp!
ivionday
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1
0.00 points

View Inventory
Send Money to ivionday

View Profile
« Reply #4 on: July 27, 2006, 08:14:34 AM »

the sample code included in the SDK looks really good, who wrote it?  haven't compiled and tested on my PSP yet but i don't expect any trouble. thanks you for this guide
Logged
HellsPlumber
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5
0.00 points

View Inventory
Send Money to HellsPlumber

View Profile WWW
« Reply #5 on: August 31, 2006, 02:39:01 PM »

When I type  make,it says "make is not recognized as an internal or external command".
What should I do?
Logged
HellsPlumber
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5
0.00 points

View Inventory
Send Money to HellsPlumber

View Profile WWW
« Reply #6 on: August 31, 2006, 02:46:25 PM »

I got it working!
I changed my bat from:

set path=%path%;x:\pspdev\bin    
set PSPSDK=x:\pspdev\psp\sdk
cmd

to
set path=x:\pspdev\bin;%path%
set PSPSDK=x:\pspdev\psp\sdk
cmd

All thanks to whazilla! and bronxbomber92 ofcourse  Rolling Eyes
Logged
milkman
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10
0.00 points

View Inventory
Send Money to milkman

View Profile
« Reply #7 on: September 01, 2006, 06:36:47 AM »

thanks alot man.  I couldn't install cygqwin because something was really messed up.  This is a pretty good alternative
Logged
Abda92
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1
0.00 points

View Inventory
Send Money to Abda92

View Profile
« Reply #8 on: September 10, 2006, 10:53:13 PM »

it gives me this error when i type make: "The procedure _impure_ptr could not be located in the dynamic link library cygwin1.dll". what file do i have to delete?

EDIT: got it to work, i was using the cygwin1.dll from the windows folder because it was newer. then i deleted it and the one in windows\system32 and just used the one from the installer
Logged
kriogenic
Newbie
*

Karma: +1/-2
Offline Offline

Posts: 35
115.58 points

View Inventory
Send Money to kriogenic

View Profile
« Reply #9 on: October 11, 2006, 12:31:24 PM »

is there away to make thsi compile into a 1.5 eboot like the the kxploit?

cause i know this makes it into a single 1.0 eboot but i need to try get it to be a 1.5 eboot in the 2 folders.

EDIT: mybad i should try things before posting. this is all working now
Logged
Ryalla
Miinaturvat Rules
Global Moderator
Hero Member
*

Karma: +50/-12
Offline Offline

Posts: 813
1707.65 points

View Inventory
Send Money to Ryalla


View Profile
« Reply #10 on: October 11, 2006, 03:58:13 PM »

A better idea for your .bat file would be to code it as:

Code:
@echo off
set Path=x:\pspdev\bin;%Path%
set PSPSDK=x:\pspdev\psp\sdk
cmd


This way you don't see the environment variables being set. Batch file scripting 101. Wink
Logged

"A year spent in artificial intelligence is enough to make one believe in God."
arthur92710
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4
0.00 points

View Inventory
Send Money to arthur92710

View Profile
« Reply #11 on: October 14, 2006, 04:06:53 PM »

thanks bronxbomber92 and dalejroks it works.
yo bronxbomber u relly from the bronx? cus i am. thatz how i roll!!!
(And for all u smart azzhols who think its a bad place it is not a bad place. all u got to do is make sure u got a 9mm, a sub macine gun, a bullit proof vest and some fast legs. LOL jk with tat last part with the guns and vest and all)

edit: is there a way to make the tiff games with this?
Logged
OldSkooL
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1
138.18 points

View Inventory
Send Money to OldSkooL

View Profile
« Reply #12 on: July 22, 2008, 03:30:28 AM »

I have lost track of how much time I have spent trying to get Cygwin working


This worked for me 2nd time round.......using the text Hellsplumber gave


And took about 15 mins from install



Awesome, thanks guys
Logged
Keikura
Full Member
***

Karma: +10/-1
Offline Offline

Posts: 103
7113.06 points

View Inventory
Send Money to Keikura

View Profile
« Reply #13 on: July 22, 2008, 06:41:10 AM »

The only problem with this is that the pre-done PSP SDK is nearly two years out of date according the guy' website.

Just to add to this tutorial anyway (This is more related to if you installed the PSP SDK using the PSP Toolchain rather than using a precompiled PSP SDK download)...

The PSP Toolchain is a set of scripts which downloads, builds and installs all the various components for the PSP SDK. Thus installing the PSP SDK in the process. You don't install the toolchain, you just download it via svn if you want the latest version.

While the toolchain does download stuff like binutils for the PSP SDK it still requires other tools like autoconf, bzip, tar, automake, wget and others for it to actually work and install the PSP SDK correctly.
Logged
Dakaa
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2
293.68 points

View Inventory
Send Money to Dakaa

View Profile
« Reply #14 on: May 13, 2009, 09:45:26 PM »

the link doens't work.
Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.37 seconds with 38 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com