C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; ^ No because I want to edit luaplayer becuase of a problem I have with netlib. And lua player is ...
-
02-25-2007, 10:23 AM #2941
- Registriert seit
- Sep 2006
- Beiträge
- 484
- Points
- 8.718
- Level
- 62
- Downloads
- 0
- Uploads
- 0
^ No because I want to edit luaplayer becuase of a problem I have with netlib. And lua player is C. ( I want to use the powerswitch in lua)
-
02-25-2007, 10:29 AM #2942Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
but you dont know c .... and how long you been working on Halo-EBOOT ? is progress good ?
-
02-25-2007, 10:38 AM #2943
- Registriert seit
- Sep 2006
- Beiträge
- 484
- Points
- 8.718
- Level
- 62
- Downloads
- 0
- Uploads
- 0
I quit that.. Thats a old sig I dont no how that happened I had a new onee... Besides it was just gonna be one of those 2D ones.
Im working on stick Arena ( the flash game currently) That, has gone pretty far if someone can help me with my C problem Ill probobaly be done with the Alpha next week.
-= Double Post =-
And yes I do know C, but I went over to Lua because of Netlib.Geändert von pspfreak9 (02-25-2007 um 10:40 AM Uhr) Grund: Automerged Doublepost
-
02-25-2007, 10:46 AM #2944Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
stick arena was one of the first games i started work on in lua. It went really well but alas i didn't finish it.
-
02-25-2007, 11:03 AM #2945
Uh. Just test if the wlan went out, not the power switch. I have already added the powerswitch in lua, but trust me, you dont need it.
Ever though about a random disconnect? Or maybe they push the wlan switch down?牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
02-25-2007, 11:15 AM #2946is not posting very often

- Registriert seit
- Feb 2006
- Ort
- omnipresent
- Beiträge
- 5.162
- Points
- 33.152
- Level
- 100
- Downloads
- 0
- Uploads
- 0
yeah but if they disconnect the WLAN how can their psp send out a message to the other people
What did we think the world would look like in 2015?
http://forums.qj.net/501501-post26.html
Zitat von Abe
-
02-25-2007, 11:47 AM #2947
- Registriert seit
- Sep 2006
- Beiträge
- 484
- Points
- 8.718
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Exactly if they pull down their WLan Switch then it cant send empty to the gameroom. And if they turn off the PSP that automatically terminates WLAN. But the 1/2 second before shutting of their PSP I can let it send empty.
Zitat von Glynnder
-= Double Post =-
If you have added it can I download it?
Zitat von youresam
Geändert von pspfreak9 (02-25-2007 um 11:48 AM Uhr) Grund: Automerged Doublepost
-
02-25-2007, 12:28 PM #2948
How do I swizzle PNG's?, without using any extra libraries...
All I use is libpng/zlib & graphics.h/c
from ps2dev
Can anyone explain those parameters that need to be passed?Code:void swizzle_fast(u8* out, const u8* in, unsigned int width, unsigned int height)
-
02-25-2007, 12:48 PM #2949
The chance of someone pressing power while waiting for an online game is very slim.
Zitat von pspfreak9
No, its part of the ipodmock luaplayer.
Zitat von pspfreak9
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
02-25-2007, 12:51 PM #2950
- Registriert seit
- Sep 2006
- Beiträge
- 484
- Points
- 8.718
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Actually SBA doesn't work anymore because of that. I could fix it though by looking at the source. And if it is part of ipodmock can you just tell me which lua file to put it in and what the code is.
-= Double Post =-
And the chances that someone turning off their PSP isnt slim. I your waiting for someone to join, and noone does, most people just power off their PSP.Geändert von pspfreak9 (02-25-2007 um 01:09 PM Uhr) Grund: Automerged Doublepost
-
02-25-2007, 07:50 PM #2951QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
uh... no. Most people would leave the game -_- .
Zitat von pspfreak9
O noes!! No one is joining!! Ill cut off my PSP because no one is joining 1 game.
wouldnt they just timeout or something similar -_- ...[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
02-26-2007, 01:07 AM #2952QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Does any body know were I can find a good GU tutorial?
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-26-2007, 02:53 AM #2953QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
um jw how do i search a folder for files? and how do i access flash0
Spoiler for in case your wondering y:1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
02-26-2007, 07:16 AM #2954words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
slice - Check the SDK samples for flash. As for scanning a directory, read up via googling the 'dirent' library.
-= Double Post =-
BlackShark - Somewhere at psp-programming, there's a thread where someone ported the Nehe OGL tutorials to the GU.Geändert von SG57 (02-26-2007 um 07:17 AM Uhr) Grund: Automerged Doublepost

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-26-2007, 10:16 AM #2955
how do i shut the psp off with C and which librarys do i need to include to do it ?
-
02-26-2007, 10:36 AM #2956Developer

- Registriert seit
- Oct 2005
- Ort
- Dubuque
- Beiträge
- 423
- Points
- 12.154
- Level
- 72
- My Mood
-
- Downloads
- 1
- Uploads
- 0
http://psp.jim.sh/pspsdk-doc/psppowe...cede122cab568a
Zitat von SWE_PsYcHo
#include <psppower.h> and link -lpsppower
-
02-26-2007, 10:37 AM #2957
Thx :d
-= Double Post =-
so is it int scePowerRequestStandby ( void ) that i need ?Geändert von SWE_PsYcHo (02-26-2007 um 10:39 AM Uhr) Grund: Automerged Doublepost
-
02-26-2007, 10:45 AM #2958Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
thats not completly off , thats standby
-
02-26-2007, 10:47 AM #2959
well i tried with scePowerRequestStandby(); and i included <psppower.h> and i added -lpsppower to LIBS in the makefile but when i try to compile it it says: main.c : In function 'check':
main.c(183) : warning: implicit declaration of function 'scePowerRequestStandby'
-= Double Post =-
and how do i completly shut it off then?Geändert von SWE_PsYcHo (02-26-2007 um 10:55 AM Uhr) Grund: Automerged Doublepost
-
02-26-2007, 11:03 AM #2960Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
dunno search some libaris or check the hense sdk
-
02-26-2007, 11:05 AM #2961QJ Gamer Silver
- Registriert seit
- Oct 2005
- Ort
- Sheffield, UK
- Beiträge
- 844
- Points
- 8.201
- Level
- 61
- Downloads
- 0
- Uploads
- 0
SWE_Psycho update your SDK to fix the implicit declaration. Download the toolchain and do ./toolchain.sh -p
-
02-26-2007, 11:21 AM #2962
but i dont got cygwin i got psp sdk
-
02-26-2007, 12:27 PM #2963
Good...
Geändert von Mr305 (02-26-2007 um 01:04 PM Uhr)
-
02-26-2007, 12:28 PM #2964QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
LOL you kinda need cygwin to use the psp sdk :P
Zitat von SWE_PsYcHo
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-26-2007, 01:03 PM #2965
Accidental reply, instead of edit...
-
02-26-2007, 02:56 PM #2966
- Registriert seit
- Dec 2006
- Beiträge
- 14
- Points
- 3.536
- Level
- 37
- Downloads
- 0
- Uploads
- 0
hey i was wondering if anyone could help me out with this problem. I followed psp programming.com tuturials to play MP3's in my program but when i compile i get this error
------------------------------------------------------------------------
[email protected] /cygdrive/c/cabs/psp/c/mp3
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150 -c -o mp3player.o mp3player.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150 -c -o main.o main.c
main.c: In function 'main':
main.c:62: warning: implicit declaration of function 'sceDisplayWaitVblankStar t'
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150 -L. -L/usr/local/pspdev/psp/sdk/lib mp3player.o main.o -lmad -lpspaudioli
b -lpspaudio -lpsppower -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -
lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -l
pspkernel -o mp3
psp-fixup-imports mp3
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150 -L. -L/usr/local/pspdev/psp/sdk/lib mp3player.o main.o -lmad -lpspaudioli
b -lpspaudio -lpsppower -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -
lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -l
pspkernel -o .elf
psp-fixup-imports .elf
mksfo 'MP3 Player Example' PARAM.SFO
psp-strip mp3 .elf -o mp3 _strip.elf
Usage: psp-strip <option(s)> in-file(s)
Removes symbols and sections from files
The options are:
-I --input-target=<bfdname> Assume input file is in format <bfdname>
-O --output-target=<bfdname> Create an output file in format <bfdname>
-F --target=<bfdname> Set both input and output format to <bfdname>
$
-R --remove-section=<name> Remove section <name> from the output
-s --strip-all Remove all symbol and relocation information
-g -S -d --strip-debug Remove all debugging symbols & sections
--strip-unneeded Remove all symbols not needed by relocations
--only-keep-debug Strip everything but the debug information
-N --strip-symbol=<name> Do not copy symbol <name>
-K --keep-symbol=<name> Only copy symbol <name>
-w --wildcard Permit wildcard in symbol comparison
-x --discard-all Remove all non-global symbols
-X --discard-locals Remove any compiler-generated symbols
-v --verbose List all object files modified
-V --version Display this program's version number
-h --help Display this output
--info List object formats & architectures supported
-o <file> Place stripped output into <file>
psp-strip: supported targets: elf32-littlemips elf32-bigmips elf64-bigmips elf64
-littlemips elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex
binary ihex
make: *** [EBOOT.PBP] Error 1
[email protected] /cygdrive/c/cabs/psp/c/mp3
$
--------------------------------------------------------------------------
I followed the tuturial very carefully and double checked everything, makeing sure i have all the libs installed but i keep getting this weird error. Here is my source code
---------------------------------------------
#include <pspkernel.h>
#include <pspctrl.h>
#include <pspdebug.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <psppower.h>
#include "mp3player.h"
PSP_MODULE_INFO("Mp3 Player Example", 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);
sceKernelRegisterExitCall back(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("up date_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid , 0, 0);
}
return thid;
}
int main() {
scePowerSetClockFrequency (333, 333, 166);
pspDebugScreenInit();
SetupCallbacks();
pspAudioInit();
SceCtrlData pad;
int i;
MP3_Init(1);
MP3_Load("test.mp3");
MP3_Play();
while(1) {
sceCtrlReadBufferPositive (&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
} else if(pad.Buttons & PSP_CTRL_CIRCLE) {
MP3_Pause();
for(i=0; i<10; i++) {
sceDisplayWaitVblankStart ();
}
}
if (MP3_EndOfStream() == 1) {
MP3_Stop();
}
}
MP3_Stop();
MP3_FreeTune();
sceKernelSleepThread();
return 0;
}
---------------------
Heres my makefile
TARGET = mp3
OBJS = mp3player.o main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lmad -lpspaudiolib -lpspaudio -lpsppower
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = MP3 Player Example
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
-----------------------------------------
Thanks
-
02-26-2007, 03:40 PM #2967QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You have spaces in your PSP_EBOOT_TITLE
Should be:Code:PSP_EBOOT_TITLE = MP3 Player Example
Or similar.Code:PSP_EBOOT_TITLE = MP3PlayerExample
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-26-2007, 03:56 PM #2968QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
O_o
Zitat von yaustar
Never knew that :P
Maybe your talking about
Target = *
meh, spaces work fine for me :P
Mind Explaining why you should not have spaces in the eboot Title :)[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
02-26-2007, 04:23 PM #2969QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Oops, I misread the output. You are right, you can have spaces in the title.
Correction: You have a trailing space in TARGET
should beCode:TARGET = mp3
(Yes there is a difference, highlight the line to see the trailing space).Code:TARGET = mp3
You can see the screw up in the command output:
Code:psp-strip mp3 .elf -o mp3 _strip.elf
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-26-2007, 04:38 PM #2970QJ Gamer Blue
- Registriert seit
- Jan 2007
- Ort
- U.S.
- Beiträge
- 405
- Points
- 7.014
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Hey everyone. I've just installed cygwin and downloaded the psptoolchain from ps2dev.org. When I go to run it (./toolchain.sh), I get the error: Error: Please make sure you have 'automake' installed. I installed all of web and devel with cygwin. Any ideas for how to fix this? Thanks.


LinkBack URL
About LinkBacks
Mit Zitat antworten


Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum