• 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 2 of 3 < 1 2 3 >
 
LinkBack Thread Tools Display Modes
Old 03-10-2009, 11:02 PM   #11 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

Coding is not an easy thing, its something that takes alot of time, patience, and practice. Lesson 02 - Creating Your First Program.

That link will teach you some basics on coding for the psp. But you should learn how to for pc first. C or C++. Find a c++ guide if you are really interested.

you will need a IDE like devc++ (bloodshed) to code on. Google it
xCHRISx is offline   Reply With Quote
Old 03-11-2009, 12:43 AM   #12 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

I did everything look here's my source code

// Hello World - My First App for the PSP
/*
This program was created by Kevin on 03/10/09
it's a simple "hello world" application.
#include <pspkernel.h>
#include >pspdebug.h>
#define printf pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}

/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;

cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);

sceKernelSleepThreadCB();

return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;

thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}

return thid;
}
int myFunction() {
//Display 'B'
return 0;
}
int main() {
//Display 'A'
Hello world ();
//display 'C'
return 0;
}
pspDebugScreenInit();
SetupCallbacks();
printf("Hello World");
sceKernelSleepThread();
return 0;

I got confused at int myFunction() {
//Display 'B'
return 0;
}
int main() {
//Display 'A'
Hello world ();
//display 'C'
return 0; so I put display and now I saved it as main.c and switch it with main in the psp/sdk/samples/basic/controllers folder and now when I make it It never works I type makefile and doesnt work please help me code please
}
psp_kevin17 is offline   Reply With Quote
Old 03-11-2009, 12:58 AM   #13 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

maybe it's because it's a txt file or something or did I code wrong
psp_kevin17 is offline   Reply With Quote
Old 03-11-2009, 03:07 AM   #14 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

you didnt follow the instructions. You must read carefully and be patient

Code:
//Do not put this in your program.
//It is an example.

int myFunction() {
          //Print Out 'A'
          return 0;
}
int main() {
          //Print Out 'B'
          myFunction();
          //Print Out 'C'
          return 0;
}
it clearly says do not put this in your program
xCHRISx is offline   Reply With Quote
Old 03-11-2009, 03:29 AM   #15 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

so I take that out of my source code??
psp_kevin17 is offline   Reply With Quote
Old 03-11-2009, 03:30 AM   #16 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

if I do put it in what do I put and what does it mean??
psp_kevin17 is offline   Reply With Quote
Old 03-31-2009, 02:57 AM   #17 (permalink)
KylBlz
Junior Member
 
Join Date: Nov 2007
Posts: 2
Default

I have a problem too. Im running Windows XP SP2 [cmd ver 5.1.2600] and i get an error that says " 'make' is not recognized as an internal or external command, operable program or batch file " ... why wont it work? I dont want to have to re-install cygwin on my flash drive [so i can compile at school using a series of exploits]

EDIT:: never mind, i fixed the bat file and now it works perfectly
[although a little slower than cygwin]

Last edited by KylBlz; 03-31-2009 at 03:07 AM.
KylBlz is offline   Reply With Quote
Old 04-21-2009, 10:33 PM   #18 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

glad to hear you got it. It may be slightly slower but cygwin is a huge shell and a little confusing. This was best for me.
xCHRISx is offline   Reply With Quote
Old 04-22-2009, 12:19 AM   #19 (permalink)
ricepeas
Member
 
ricepeas's Avatar
 
Join Date: Jan 2009
Location: Neither here nor there
Posts: 71
Default

nice i will try to make my own programs now, i was wondering how to create programs on my own and now i know thnx a lot.
__________________
Quote:
90% of teens today would die if Myspace was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.



Please Click on the above pictures to help my Dragon Level up, Thanks in Advance!!!
ricepeas is offline   Reply With Quote
Old 04-23-2009, 03:02 AM   #20 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

I now how to code c++ so the int manfunction would I have to put that into my fuction that I want like int hello world or do i take it out??
psp_kevin17 is offline   Reply With Quote
Reply
Page 2 of 3 < 1 2 3 >

« 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 01:46 PM.

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