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
February 08, 2012, 07:06:09 PM *
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] 2
Print
Author Topic: Coding for the PSP with Visual Studio - It's never been easier!  (Read 7755 times)
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« on: September 21, 2009, 11:45:06 AM »

I know many people out there are doing what I've been doing:Opening their code files in text editors(or worse,Visual Studio itself),memorizing function names and arguments,compiling with cygwin\cmd,manually copying their EBOOT.PBP across,and finally managing to run their app.Well,that's THE hardest way to do it,specially if you have Visual Studio on your Windows PC.
What I'm about to show you is the path to true enlightenment Razz.When using this method,you won't need to memorize all function names,as you'll see them as you type them.You also don't have to mess with all sorts of STUPID programs.You'll have everything you need inside the Solution Explorer when you open your project in Visual Studio.
I don't claim to be the first to know this method,but I'm not the last,so don't go complaining if you already knew it.Anyway,here's what you need:

1.Visual Studio 2005/2008.It may work with 2003,but I don't know if it will.
2.MINPSP.Download it from http://minpspw.sourceforge.net/ if you don't have it yet.

Here's what you must do to create a PSP project(We'll assume the project's name is |\/|y PSP @pp):

1.When installing MINPSP,choose to install support for VS.
2.Open VS.
3.From the New Project screen,choose [Other Languages>]Visual C++>General>Makefile Project.
4.Choose a name for your app.Choose a path if you like.Keep the name simple,as in "MyPSPApp".
5.Select Next from the Makefile Project Wizard welcome screen.
6.On the next screen,enter the following values withOUT the single quotation marks:
Build command line:'vsmake && copy EBOOT.PBP "X(PSP Drive Letter):\PSP\GAME\My PSP App(Or the name of you app.Don't use illegal chars.)\" '
Clean commands:'vsmake clean'
Rebuild command line:'vsmake clean && vsmake && copy EBOOT.PBP "X:\PSP\GAME\My PSP App(Or the name of you app.)\" '           (Do NOT use "My\ PSP\ App".Windows is NOT linux,and it's Windows we're typing these commands for.)
Output (for debugging):'EBOOT.PBP'
Include search path:'(MINPSP installation path(eg.C:\pspsdk))\psp\sdk\include'
7.Choose Next.
8.Mark "Same as debug configuration".
9.Click Finish.
10.Now you have an (almost) empty project.Navigate to your project's folder,and open the second folder with your project's name,where the debug/release folders are usually created.There should also be a readme.txt file in the folder.
11.Create a file named "makefile".You can't create this using VS,since any templates will have an extension.
12.Use "(Right click project in Solution Explorer)>Add>Existing item..." and choose your makefile.You now have the makefile in Solution Explorer.Open it to add the usual content,but be careful not to confuse TARGET with PSP_EBOOT_TITLE.Give TARGET a simple name like MyPSPApp,which will be used for file names when compiling you app,but give PSP_EBOOT_TITLE the name of your app(|\/|y PSP @pp in this case).Remember,you still need to specify the files you want to build in the makefile.You won't need to add your files to the VS project if you don't need to edit them,add them to the makefile instead.
13.To add new code files,either create them manually and add them via "Add>Existing item...",or use "Add>New item...".There is no c template,but you can select the cpp template and name your files MyFileName.c to get c files.Code them as usual.
14.When you're coding,you can press Ctrl+Space to open the intelliSense menu which will list all your functions/variables/constants AND all the functions/constants found within the SDK header files you included.If you use this menu,you won't need to type capital letters,sinse VS will fix capitalization for you.You'll also see the arguments for each function you use.
15.When you're done with the code,choose Build>Build MyPSPApp or press Ctrl+Shift+B to build your app and send it to the PSP.If your PSP is not connected,you'll get an error telling you cmd.exe failed.If there were any errors/warnings during compilation,you'll see them in the Error List(Ctrl+E) under their separate topics.
16.Have fun with your newly compiled app!

I hope you have enjoyed discovering this method as much as I did just a few minutes ago. Wink

Thanx for the link,mowglisanu.
« Last Edit: September 21, 2009, 11:50:11 AM by Arshia001 » Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!


Zack
Licking doorknobs is illegal on other planets.
C/C++ Developer
Jr. Member
*

Karma: +3/-0
Offline Offline

Posts: 50
3916.76 points

View Inventory
Send Money to Zack

View Profile WWW
« Reply #1 on: September 21, 2009, 02:51:02 PM »

maybe making it open psplink and run your project when clicking the run/debug icon would be nicer than manually running it on your psp each time for testing Very Happy

Nice guide though Smile
Logged

My Releases :



^-------------------------^

^-------------------------^

Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #2 on: September 23, 2009, 12:24:39 AM »

I don't really know what psplink is...( Sad )
Could you tell me what it is and how it works so we can get it to work?If we manage to do that,and get that other tool which tells which line a runtime error occured on,we'll practically have every coding tool a coder can wish for(except perhaps edit as you debug,which is a very useful one,but it doesn't even work with VC++ as far as I know).
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #3 on: September 23, 2009, 10:18:47 AM »

>I don't really know what psplink is
 Shocked

It allows you to remotely execute apps from your computer, handle exceptions and so much more.

If you have minpsp check your install folder, you should see the psplink folder.
It has the 1.5 binaries, the no corrupt icon binaries and the oe binaries(use oe for 3xx+)

Then you have net/usbhostfs_pc and pspsh in you bin folder, net/usbhostfs_pc connects you psp to your machine and pspsh allows you to execute commands(it comes with a readme I think)
Logged

Check out my:
 Audio lib
 Pmf Viewer
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #4 on: September 23, 2009, 12:16:57 PM »

Mmmm...I'll have to check it out.But hey,not every body is supposed to know about every tool,so there's no need to be so surprised... Sad
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
you
Foar Moar Bukkets!
All-Around Dev
Full Member
*

Karma: +11/-1
Offline Offline

Posts: 138
2588.04 points

View Inventory
Send Money to you

View Profile
« Reply #5 on: September 23, 2009, 01:16:47 PM »

This is nowhere near as good as my method Very Happy

I had a batch file called go.bat that told the compiler to compile and make it into an EBOOT, then delete the EBOOT from my PSP, then copy the new EBOOT to the PSP.

So I'd do my code, CD to the code's directory, then type 'go' Very Happy


Seriously though, this is very cool Very Happy
Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #6 on: September 24, 2009, 03:22:10 AM »

Seeing as copy autoimatically replaces the old file with the new one,there is no need to delete anything,and you won't even need to switch to your code's directory using this method!I knew all inventions were based on laziness,but this is out of control!Say,if we give make a file,say "makefile.mak",will it work?If it does,we won't even need to switch to the project's directory to create a makefile!!!!!!How lazy is THAT? Very Happy
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
pentagram
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 42
2559.21 points

View Inventory
Send Money to pentagram

View Profile
« Reply #7 on: October 31, 2009, 02:24:37 PM »

Code:
------ Build started: Project: pspf, Configuration: Debug Win32 ------
Performing Makefile project actions
C:\pspsdk\bin\make: Nothing to be done for `all'.
The system cannot find the file specified.
Project : error PRJ0002 : Error result 1 returned from 'D:\WINDOWS\system32\cmd.exe'.
Build log was saved at "file://c:\@PSPDEVkizko\pspf\Debug\BuildLog.htm"
pspf - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Yes, the PSP is connected, and the letter was ok. And yes, I copyed thoose commands without '

Quote
Build command line: vsmake && copy EBOOT.PBP "J:\PSP\GAME\pspf\"
Rebuild command line: vsmake clean && vsmake && copy EBOOT.PBP "J:\PSP\GAME\pspf\"
Clean command line: vsmake clean
Output (for debugging): EBOOT.PBP
Include search path: C:\pspsdk\psp\sdk\include
« Last Edit: October 31, 2009, 02:32:33 PM by pentagram » Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #8 on: November 01, 2009, 05:38:25 AM »

There's a problem with your makefile.Does it exist?Is it in proper format?
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
pentagram
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 42
2559.21 points

View Inventory
Send Money to pentagram

View Profile
« Reply #9 on: November 01, 2009, 11:18:34 AM »

There's a problem with your makefile.Does it exist?Is it in proper format?

It's a sample from pspsdk. The power one. Here is it:

Code:
PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
TARGET = powersample
OBJS = main.o
LIBS = -lpsppower


CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

include $(PSPSDK)/lib/build.mak
Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #10 on: November 01, 2009, 11:41:40 AM »

And where is it located?
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
pentagram
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 42
2559.21 points

View Inventory
Send Money to pentagram

View Profile
« Reply #11 on: November 01, 2009, 12:04:05 PM »

In the project folder.


[img=http://img337.imageshack.us/img337/6773/42092127.th.jpg]
Logged
pentagram
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 42
2559.21 points

View Inventory
Send Money to pentagram

View Profile
« Reply #12 on: November 02, 2009, 09:16:29 AM »

Please help me, i really want to start codding, i reinstal my windows and cywin take too long to install it.

I`ve tryed the visual 6 method (with Sony psp appwizard) but no succed. This one really is cool, becouse it copyes the eboot into your PSP directly.
Please, what can be the problem?
Logged
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #13 on: November 02, 2009, 12:27:21 PM »

If you installed minpsp then you can start coding you dont need visual studio, net beans, codeblocks etc.
Just a text editor(notepad Wink) to write your code and makefile, and the command prompt.
Have your source file(s) and makefile in the same directory open the command prompt(cmd.exe) go to that directory and type make and press enter(if there are other makes, then you can change it to psp-make.exe and type psp-make to avoid conflicts).

>This one really is cool, becouse it copyes the eboot into your PSP directly.
Well you can do that with a makefile
What is really cool is running your app without copying it to your psp(via psplink)
Logged

Check out my:
 Audio lib
 Pmf Viewer
pentagram
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 42
2559.21 points

View Inventory
Send Money to pentagram

View Profile
« Reply #14 on: November 02, 2009, 12:50:59 PM »

Anz tutorial using psplink?
Logged
Pages: [1] 2
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.574 seconds with 38 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com