• 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 3 of 3 < 12 3
 
LinkBack Thread Tools Display Modes
Old 04-23-2009, 06:00 AM   #21 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

huh? you mean in the function protoype?
Code:
int helloworld();
is that what you mean?
if so, int is the return type.
Code:
int helloworld()
{
     
    int num = 0;
    //code
   // blah blah blah
    num = 3;

    return(num);
}
xCHRISx is offline   Reply With Quote
Old 04-24-2009, 03:20 AM   #22 (permalink)
psp_kevin17
Member
 
Join Date: Feb 2008
Posts: 33
Default

hey I did everything you said and here's my make file
TARGET = hello
OBJS = main.o

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

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


and here's my source code named main.c
/ Hello World - My First App for the PSP

/*
This program was created by psp_kevin17 on 04/23/09
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("Hello World", 0, 1, 1);
#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 main() {
pspDebugScreenInit();
SetupCallbacks();
printf("Hello World");
sceKernelSleepThread();
return 0;
}

why doesn't it work??? it never compiles
psp_kevin17 is offline   Reply With Quote
Old 04-26-2009, 05:54 PM   #23 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

ill get back to you soon, withing a few days
xCHRISx is offline   Reply With Quote
Old 04-28-2009, 06:33 AM   #24 (permalink)
xCHRISx
PSP Homebrew Poster
 
xCHRISx's Avatar
 
Join Date: Jan 2008
Location: Miami, FL
Posts: 682
Default

Quote:
Originally Posted by psp_kevin17 View Post
hey I did everything you said and here's my make file
TARGET = hello
OBJS = main.o

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

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


and here's my source code named main.c
/ Hello World - My First App for the PSP

/*
This program was created by psp_kevin17 on 04/23/09
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("Hello World", 0, 1, 1);
#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 main() {
pspDebugScreenInit();
SetupCallbacks();
printf("Hello World");
sceKernelSleepThread();
return 0;
}

why doesn't it work??? it never compiles

hmm. I copied your code and makefile and compiled it on my computer and it did so fine.
I attached it so you can compare...
Attached Files
File Type: zip tester.zip (112.4 KB, 7 views)
xCHRISx is offline   Reply With Quote
Old 07-16-2009, 04:47 PM   #25 (permalink)
xTerminate
Banned
 
Join Date: Jul 2009
Posts: 11
Default

nice tut! does anyone know if theres a way to code the psp in vb?
xTerminate is offline   Reply With Quote
Old 08-10-2009, 09:51 PM   #26 (permalink)
alex13809
Member
 
alex13809's Avatar
 
Join Date: Feb 2009
Posts: 48
Default

Anyone know any other tutorials out there?

Last edited by alex13809; 08-17-2009 at 04:00 PM.
alex13809 is offline   Reply With Quote
Old 10-14-2009, 04:28 PM   #27 (permalink)
RNB_PSP
Member
 
RNB_PSP's Avatar
 
Join Date: Sep 2009
Location: Philippines
Posts: 90
Default

Is there a tutorial to code psp in python?
RNB_PSP is offline   Reply With Quote
Old 10-21-2009, 10:32 AM   #28 (permalink)
RNB_PSP
Member
 
RNB_PSP's Avatar
 
Join Date: Sep 2009
Location: Philippines
Posts: 90
Default

Quote:
Originally Posted by alex13809 View Post
Anyone know any other tutorials out there?
Here's a great tutorial i found. It's easy to follow.

Last edited by RNB_PSP; 10-21-2009 at 10:35 AM.
RNB_PSP is offline   Reply With Quote
Reply
Page 3 of 3 < 12 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 12:03 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