• Search
  • Today's Posts
  • Mark Forums Read
  • Remove Ads
HomeForumsPSPPS3DSWiiXbox 360PSP XMB

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Log in:

  Console Spot Forums - PSP DS PS3 Xbox 360 Wii XMB > Sony PSP Forums > PSP Help & Tutorials
PSP Programming Tutorial for Windows + SDL (Without Cygwin)

   

Reply
Page 1 of 3 1 23 >
 
LinkBack Thread Tools Display Modes
Old 03-10-2009, 01:27 AM   #1 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default PSP Programming Tutorial for Windows + SDL (Without Cygwin)

PSP Programming Tutorial for Windows (C/C++)
Plus SDL and all with out Cygwin


This tutorial that i have written will teach you step by step how to set up you psp development environment for windows in less than 15 minutes and without the need to install any large files or Shells (Cygwin).

Before i begin i would like to thank heimdall for the excellent Win32 toolchain and pspsdk installer. (Minimalist PSPSDK for Windows)
Also i would like to add, If you are new to C/C++ I would highly recommend you begin your programming adventure on a computer, not the psp. For serious "want to be" programmers, i would highly recommend taking courses at your local community college.

------

-INSTALLATION-

1. Click the following link to download the Win32 native toolchain and pspsdk installer (Created by Heimdall).

2. Download the file: "pspsdk-setup-0.9.2.exe" from sourceforge.

3. Run the file that was just downloaded and when it asks where to install change "C:/pspsdk" to "C:/pspdev". The rest just press next til finished.

4. Congratulations, You have just installed the pspsdk, toolchain, and libraries needed to program on the psp.

5. You should now have a folder inside your harddrive named pspdev. (C:/pspdev/)

------

-SETUP-

6. Open up Notepad and paste the following code:

Code:
set path=%path%;c:\pspdev\bin
set PSPSDK=C:\pspdev\psp\sdk
cmd
7. Save the file as: "start.bat", Save as type: "all files", and place it inside C:/pspdev/

8. Open "start.bat". The following information should be displayed

Code:
C:\pspdev>set path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Py
thon22;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Subversion\bin;C:/p
spdev/bin;C:/pspdev/bin;;;;;C:\pspdev\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>
9. Congratulations, You have just setup your handy dandy compiler.

--------

-COMPILING/CREATING PROGRAMS-

10. You are now ready to create your first eboot. How?

11. When using the command prompt, it is important to know how to move from folder to folder.
The simple yet effective way to do so is by the following:

12. Open "start.bat" once again.

13. Type: "cd psp", now press enter. You are now inside the folder "psp" which is inside of "pspdev" (C:/pspdev/psp/)

14. To go back to the pspdev folder (C:/pspdev/), Type "cd..", now press enter.

15. To move into a folder that is inside another folder, such as (C:/pspdev/psp/sdk/), Type: "cd psp/sdk", now press enter.
The same can also be achieved by typing "cd psp", press enter, "cd sdk", press enter. Both will take you to (C:/pspdev/psp/sdk/)

16. We are currently in (C:/pspdev/psp/sdk/). We need to go back to (C:/pspdev/). Type "cd..", press enter, "cd..", press enter

17. Now that we are back in (C:/pspdev/) and you now understand how to move from folder to folder, it is time to compile a working eboot for your psp.

18. Type: "cd psp/sdk/samples/controller/basic", press enter. We are now in (C:/pspdev/psp/sdk/samples/controller/basic/).

19. Inside this file is C source code and a makefile. You can not compile a program for the psp without a makefile.

20. Now type: "make", press enter. The following should display:

Code:
C:\pspdev\psp\sdk\samples\controller\basic>make
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c
 -o main.o main.c
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L.
 -LC:/pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lp
spsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -
lpspuser -lpspkernel -o controller_basic.elf
psp-fixup-imports controller_basic.elf
psp-strip controller_basic.elf -o controller_basic_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  controller_basic_strip.elf NULL
[0]        408 bytes | PARAM.SFO
[1]          0 bytes | NULL
[2]          0 bytes | NULL
[3]          0 bytes | NULL
[4]          0 bytes | NULL
[5]          0 bytes | NULL
[6]      58508 bytes | controller_basic_strip.elf
[7]          0 bytes | NULL
C:/pspdev/bin/rm -f controller_basic_strip.elf

C:\pspdev\psp\sdk\samples\controller\basic>
21. Congratulations, You just compiled your first program for the psp.

22. Go to (C:/pspdev/psp/sdk/samples/controller/basic/) and copy the EBOOT you just compiled and place it in a new folder inside of your psp, in the (PSP/GAME) folder.

23. Now go try it out!

24. Its time to code =].

---------------

-CODING-

1. The next step is writing your own code. Now you can certainly go ahead and code in notepad, but it is not a good idea. Downloading a program to code on is certainly a good idea.

2. I recommend usind devcpp (bloodshed). Devcpp can be used to code C and CPP on just about anything (Google it). The way i have my setup is i create a new project and save it in a folder inside of (C:/pspdev/).

3. Then begin to code or add code to the project and save the code and makefile using devcpp.

4. I then use the compiler we made "start.bat" and go to the folder where my project is and type make.

5. Thats it. It works great this way for me.

6. If you need help with coding for the psp or are new, Go to PSP-Programming.com for a great tutorial for the psp. Just start on lesson 2.

------

Further Links:
Heimdall - MinPSPW
forums.ps2dev.org :: View topic - Win32 native Toolchain for PSPSDK
jetCube


------

Continue to next post for SDL...

Last edited by xCHRISx; 04-28-2009 at 01:10 AM.
xCHRISx is offline   Reply With Quote
Old 03-10-2009, 01:40 AM   #2 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

-SDL for PSP-

1. After hours of forum jumping and testing i was finally able to put together a makefile that would work with SDK and compiler we created without cygwin.

2. All of the libraries needed for SDL to run correctly, including SDL Mixer, TTF, and Image, have been installed already (and correctly) thanks to Heimdalls installer.

3. Here is the Makefile I have been using for a game i am making:

Code:
TARGET = Ohaspii
OBJS = main.o Title.o sdlFunction.o mp3player.o

PSPSDK = $(shell psp-config --pspsdk-path)
PSPDEV = $(shell psp-config -d)
PSPBIN = $(PSPDEV)/bin
SDL_CONFIG = $(PSPBIN)/sdl-config

CFLAGS = -O2 -G0 -Wall -D PSP
CFLAGS += $(shell $(SDL_CONFIG) --cflags)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBS = -lstdc++ -lSDL_ttf -lfreetype -lSDL_image -ljpeg -lpng -lz -lm -lSDL_mixer -lvorbisidec -lmikmod -lmad $(shell $(SDL_CONFIG) --libs)
LIBS += -lpspaudiolib -lpspaudio -lpsppower

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Ohaspii

include $(PSPSDK)/lib/build.mak
With this makefile you should have no problem using sdl for the psp. Obviously you will need to change the TARGET, OBJ, and TITLE values.
Duh!

Last edited by xCHRISx; 04-28-2009 at 01:09 AM.
xCHRISx is offline   Reply With Quote
Old 03-10-2009, 02:20 AM   #3 (permalink)
Dmise
 
Dmise's Avatar
 
Join Date: May 2008
Location: Texas, USA
Posts: 866
Default

Nice tut, glad to hear you figured it out.
__________________
__________

Quote:
Originally Posted by SchmilK View Post
dont let the door knob hit you in the butt hole on the way out
Dmise is offline   Reply With Quote
Old 03-10-2009, 03:50 AM   #4 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

Nice tut but when I get to going back I type cd and it doesnt go and when I type cd psp sdk or whatever it is it never goes it just says invaild comman d or something please help im on windows vista 64 bit
psp_kevin17 is offline   Reply With Quote
Old 03-10-2009, 04:32 AM   #5 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

Try: "cd C:\pspdev\psp"
or
cd \pspdev\psp

This tutorial was done on XP so im not sure how exactly command prompt works with vista, however, i believe this pspsdk and toolchain are compatible with vista

also its "cd.." to go back and "cd psp/sdk" to go forward.. idk if that how you typed it or not

If all of the above fail, then copy "start.bat" and paste it inside of the folder you are trying to compile, such as "C:/pspdev/psp/sdk/samples/controller/basic/" like in the tutorial.
And then type make.
That will certainly work.

Last edited by xCHRISx; 03-10-2009 at 04:43 AM.
xCHRISx is offline   Reply With Quote
Old 03-10-2009, 04:39 AM   #6 (permalink)
Modified
Smile.
 
Modified's Avatar
 
Join Date: Feb 2008
Location: California
Posts: 1,451
Default

Very nice. When I get a chance I'll take a better look at this, Thanks.
__________________



Modified is offline   Reply With Quote
Old 03-10-2009, 08:36 AM   #7 (permalink)
Psyko
Flying pig stole my title
 
Psyko's Avatar
 
Join Date: Jul 2008
Posts: 4,217
Default

uh... uhmmm.... ehh... eh.... ehh
Well it's a new sticky. It deserves it.

But I'm not going to make homebrew. I'm just going to download homebrew from others and then complain about it..
__________________






^No, not for another billion years!^

Quote:
Originally Posted by Sbarkeri
questions regarding P2P software which as long as there are no links to illegal sites or torrents which contain illegal files it is perfectly fine, even talking about piracy is fine as long as you do not link to any of it.
Rhinos own tribute spoiler!

Quote:
Originally Posted by Count to 10,000 thread
9999! Bitch... Make your move!
Quote:
Originally Posted by Rhinos
Mac's are as bad as... Animé!!! EW EW EW EW!!!
Quote:
Originally Posted by Rhinos
I found half a dead moose in the road... YEYYYYYYYYYYYYYYY!
Quote:
Originally Posted by Rhinos
Last edited by Rhinos; Today at 04:16 AM. Reason: I Put "Conputers" And "Readong", WTF! There May Also Have Been A Slight Hint Of Pornography Involved In The Situation! :-)
Quote:
Originally Posted by Count to 10,000 thread
Lil Wayne is a Homosexual... JABA JABA JABA JABA JABA!

He got CRUNK bitch. LET ME SLAP DAT AYASSS... Mah name Lil Wayne Lil Wayne Lil Wayne I got a 45, an mah bitch called Jane. WUT WUT? Go shordy, Go shordy...
Quotes:

Quote:
Originally Posted by Naka
So far, a person has asked for an illegal activation method, and he received it by the ban dodging psyko.
Quote:
Originally Posted by magicalfairy90 aka pspblack92 aka PspGo92
how should we use it?what do we do? i can crack eggs with my eye shut.
Quote:
Originally Posted by Peza
my rofl-coptor goes?
Quote:
Originally Posted by Evolve
Did you accidentally eat something you weren't supposed to?
Quote:
Originally Posted by Gman17
ah well Good things don't last forever
Quote:
Originally Posted by Otsdarva
For the love of whatever you hold dear learn to edit your freaking posts. Double posts are bad enough so we don't need people pulling septua-posts.
Quote:
Originally Posted by miri
Thank you for your contribution to the death of the PSP scene by pirating. You are a fool to announce it in public.
Quote:
Originally Posted by Joomla12
I love going to the bathroom to masturbate.
Quote:
Originally Posted by Evolve
Quote:
Originally Posted by Psyko
How am I supposed to know who to diss and who to be nice to now?
You can always diss Naka.
Quote:
Originally Posted by Ascer
I have dropped my PSP in the toilet.Can you help me find replacement parts online?
Quote:
Originally Posted by Dmise
Quote:
Originally Posted by tjones436
im not goin to talk about piracy but i downloaded gi joe (i will not tell you the site because its piracy)
LMAO, FAIL you said you weren't going to talk about piracy but yet you said you downloaded the game that's piracy right there, no need for you to give us the site you got it from it doesn't matter since you admitted on doing it, you totally contradicted yourself there.
Quote:
Originally Posted by (+/blazedpsp/+) View Post
it dosent boot after i lunch it
Quote:
Originally Posted by PspGo92
my mom is cheap
Quote:
Originally Posted by Dmise
Quote:
Originally Posted by Konkor
I usually download them first and if they are good or I play for more then an hour I will go and buy it.
Yar Har yippidy har tar hello matey, pirate much?
Quote:
Originally Posted by leo9891
Phail-yur tu sossiedy
Quote:
Originally Posted by dripz167 View Post
The only reason mac doesn't get viruses is simply because hackers don't waste their time developing a virus for an os nobody has.
Quote:
Originally Posted by Stang View Post
Quote:
Originally Posted by magicalfairy
i don't want 2 waste money on games
I don't want to waste my time helping somebody with so little class who has the sole intention of pirating games.
Quote:
Originally Posted by Joomla12
What I have to say to 100% paid programs, pbbbt. I'll die a pirate. You can kiss my ass if you think I'm paying for some of the things I pirate when they're not even worth the dough.
Quote:
Originally Posted by Sketchy
Every human being is the result of someone getting laid
Quote:
Originally Posted by psYko
haven't assigned a credit card
Quote:
Originally Posted by SchmilK View Post
evolve sucks when you compare prices of today and yesteryear
i paid $380 for 4m sx around 1991!
Note: Read original post before judging Schmilk
Quote:
Originally Posted by tjones436 View Post
You mothafoocka,imma get you back one 1 day,ima dawg u so hard,your moms dead grandmas son hitler will cry
Quote:
Originally Posted by Dmise
Tjones i'm so horny for you right now, wanna get it on on my flying t-rex.
Quote:
Originally Posted by Sketchy @ Shoutbox
[01-11 04:28] Sketchy: Taz, you're peza's ass waxer.
Quote:
Originally Posted by tjones436 View Post
You mothafoocka,imma get you back one 1 day,ima dawg u so hard,your moms dead grandmas son hitler will cry

Psyko is online now   Reply With Quote
Old 03-10-2009, 09:38 AM   #8 (permalink)
Akira
Team Mudkip
 
Akira's Avatar
 
Join Date: Jan 2009
Location: On a journey through the Nine Circles of Hell.
Posts: 1,503
Default

Coding is where it's at.

__________________
Past Usernames: Starfox444, Starfox, Slayer


Click here to check out my gameboot/cintro/coldboot/soundboot guide

Click here to check out my PSP plugin install guide for newbies
Click here for a collection of eboots and CFW updaters uploaded by myself and NightCalyster
Akira is offline   Reply With Quote
Old 03-10-2009, 09:54 PM   #9 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

nice man tryed it and it worksm woo
psp_kevin17 is offline   Reply With Quote
Old 03-10-2009, 09:59 PM   #10 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

how to I code I know using programs but what code do I have to put in is there special kind or something please help
psp_kevin17 is offline   Reply With Quote
Reply
Page 1 of 3 1 23 >

« Previous Thread | Next Thread »
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode
Hybrid Mode Switch to Hybrid Mode
Threaded Mode Switch to Threaded Mode

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
Trackbacks are On
Pingbacks are On
Refbacks are On



   


counter

All times are GMT +1. The time now is 02:39 AM.

Contact Us - ConsoleSpot - Archive - Top

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

LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks