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; here beat bob is a way to make something jump i can't read ur code very well so screw it ...
-
07-15-2007, 11:21 AM #5521QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
here beat bob is a way to make something jump i can't read ur code very well so screw it this well work:
Spoiler for code:
there that should work i'll check it over but i wrote it right here so it's not tested
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
-
07-15-2007, 11:48 AM #5522words 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
IT isn't the best, but you should be able to pick out what's needed...
Zitat von sony psp player
http://dl.qj.net/3D-Game-Development...9418/catid/202
...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
-
07-15-2007, 12:11 PM #5523
Your code doesn't compile:
[email protected] ~/3d
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspde
v/psp/sdk/../include -fsingle-precision-constant -g -Wall -O2 -D_PSP_FW_VERSION
=150 -L. -L/usr/local/pspdev/psp/sdk/lib -DMODULE_NAME="SDalex" psp-setup.c ma
in.o md2.o texture.o mp3player.o glPrint.o -lglut -lGLU -lGL -lm -lc -lpsputilit
y -lpspdebug -lpspge -lmad -lpspaudiolib -lpspaudio -lpspdisplay -lpspctrl -lpsp
sdk -lpspvfpu -lpsplibc -lpspuser -lpspkernel -lpsprtc -lpsppower -lstdc++ -lpsp
debug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspne
t_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o 3DGDS.elf
glPrint.o:/home/Christian/3d/glPrint.cpp:154: undefined reference to `glTranslat
ed'
glPrint.o:/home/Christian/3d/glPrint.cpp:156: undefined reference to `glListBase
'
glPrint.o:/home/Christian/3d/glPrint.cpp:158: undefined reference to `glCallList
s'
glPrint.o:/home/Christian/3d/glPrint.cpp:173: undefined reference to `glTranslat
ed'
glPrint.o:/home/Christian/3d/glPrint.cpp:175: undefined reference to `glListBase
'
glPrint.o:/home/Christian/3d/glPrint.cpp:177: undefined reference to `glCallList
s'
glPrint.o:/home/Christian/3d/glPrint.cpp:130: undefined reference to `glDeleteLi
sts'
glPrint.o:/home/Christian/3d/glPrint.cpp:105: undefined reference to `glGenLists
'
glPrint.o:/home/Christian/3d/glPrint.cpp:112: undefined reference to `glNewList'
glPrint.o:/home/Christian/3d/glPrint.cpp:123: undefined reference to `glTranslat
ed'
glPrint.o:/home/Christian/3d/glPrint.cpp:124: undefined reference to `glEndList'
glPrint.o:/home/Christian/3d/glPrint.cpp:112: undefined reference to `glNewList'
collect2: ld returned 1 exit status
make: *** [3DGDS.elf] Error 1
-
07-15-2007, 12:42 PM #5524QJ Gamer Green
- Registriert seit
- Sep 2006
- Ort
- Cape Town, South Africa
- Beiträge
- 714
- Points
- 5.795
- Level
- 49
- Downloads
- 0
- Uploads
- 0
That's because you haven't got pspgl (is that the name?) installed.
-
07-15-2007, 01:09 PM #5525
Thanks, I totally forgot it.
-= Double Post =-
I've tried it with pspgl and there is the same error.Geändert von sony psp player (07-15-2007 um 01:14 PM Uhr) Grund: Automerged Doublepost
-
07-15-2007, 01:16 PM #5526QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
LIBS= -lpspgu :rtfm: <--- Edited, wasn't supposed to be -lpspgl ^^
Geändert von JaSo PsP (07-16-2007 um 01:05 AM Uhr)
...Just Returned To The Scene...
-
07-15-2007, 11:54 PM #5527
New error:
[email protected] ~/3d
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspde
v/psp/sdk/../include -fsingle-precision-constant -g -Wall -O2 -D_PSP_FW_VERSION
=150 -L. -L/usr/local/pspdev/psp/sdk/lib -DMODULE_NAME="SDalex" psp-setup.c ma
in.o md2.o texture.o mp3player.o glPrint.o -lpspgl -lglut -lGLU -lGL -lm -lc -lp
sputility -lpspdebug -lpspge -lmad -lpspaudiolib -lpspaudio -lpspdisplay -lpspct
rl -lpspsdk -lpspvfpu -lpsplibc -lpspuser -lpspkernel -lpsprtc -lpsppower -lstdc
++ -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet
-lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o 3DGDS.el
f
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -lpspgl
collect2: ld returned 1 exit status
make: *** [3DGDS.elf] Error 1
-
07-16-2007, 12:15 AM #5528words 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
No, you have PSPGL, just not the latest. Download the ported nehe tutorials 11-20 and it'll come with a PSPGL supporting display lists.
Walaa...
...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
-
07-16-2007, 01:03 AM #5529QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
*Voila
Zitat von AdjutantReflex
...Just Returned To The Scene...
-
07-16-2007, 03:31 AM #5530
I didn't manage to get it working. If there is anyone who can give me a small tutorial and a few examples, this would be great.
^^^^Please don't flame me because of this post.^^^^
-
07-16-2007, 06:23 AM #5531Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
oke , now I was testing how to check the free memory in size , i made a function that opens new memory locations untill it fails and then it checks how many and how big they are , but is it safe to do it that way?
-
07-16-2007, 06:59 AM #5532It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
That's a terrible way to do it.
http://psp.jim.sh/pspsdk-doc/pspsysmem__kernel_8h.html
Read up.pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-16-2007, 08:44 AM #5533I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Say I want to replace vshmain.prx in flash, how would I go about not giving myself a semi-brick. When I replace it it gives me the black screen, as expected.
I've tried making my vshmain.prx load vshmain_real.prx, but I always get an error, if I use pspSdkLoadStartModule, and using sceKernelLoadModule and sceKernelStartModule.
I've spent a couple of hours looking around, but found no definative answers, although there was a post on ps2dev.org that seemed helpful, but still didn't solve my problem...
Well anyway, I'm just wondering what needs to be done to get it to load, and if theres any source code, tutorials, etc that I can look at to see where I'm going wrong?
Thanks.
-Aura
-
07-16-2007, 08:56 AM #5534Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
oke i got that , but what partition id do i need to fill in?
Zitat von Archaemic
SceSize sceKernelPartitionTotalFr eeMemSize(int pid);
and what are partition id's?
-
07-16-2007, 09:06 AM #5535It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You want partition 2. That's the user partition.
http://wiki.ps2dev.org/psp:memory_mappəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-16-2007, 09:11 AM #5536Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
never saw that sites before , interesting , big thnx
-= Double Post =-
it just crashes
Code:SceSize faGetFreeMem() { SceSize mem; mem = sceKernelPartitionTotalFreeMemSize( 2 ); return mem; }Geändert von hallo007 (07-16-2007 um 11:08 AM Uhr) Grund: Automerged Doublepost
-
07-16-2007, 11:13 AM #5537
aknkgqtxemkgqt. oops
Geändert von Mr305 (07-16-2007 um 02:14 PM Uhr)
-
07-16-2007, 11:17 AM #5538Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
mayby it has to do with something else , because sceKernelFindModuleByName () works either
Zitat von hallo007
Geändert von hallo007 (07-16-2007 um 11:56 AM Uhr) Grund: Automerged Doublepost
-
07-16-2007, 01:00 PM #5539QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
could some1 give me an example of ad-hoc that works the guide one on this site won't work nor does the ir example in the sdk well work on my 1.5 psp's
-= Double Post =-
nvm i got it to work finallyGeändert von slicer4ever (07-16-2007 um 01:07 PM Uhr) Grund: Automerged Doublepost
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
-
07-16-2007, 01:15 PM #5540It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Wow, um, all that variable does is waste stack space.
Zitat von hallo007
Just call sceKernelPartitionTotalFr eeMemSize(2); when you need to find free RAM.
Also, I just did some digging, so I don't know if this is entirely the right function. Are you sure you're in kernel mode?pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-16-2007, 02:17 PM #5541QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
how do i get the psp's nickname?
-= Double Post =-
also i didn't know that with the ac pluged in you can take out the battery and the psp well keep goingGeändert von slicer4ever (07-16-2007 um 02:40 PM Uhr) Grund: Automerged Doublepost
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
-
07-16-2007, 02:50 PM #5542words 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
That's why during updates it doesn't tell you touch either, as touching one or the other makes just one more flaw for a brick.
To get the PSPs nickname (you should've searched...)
Code:char nameBuffer[50]; sceUtilityGetSystemParamString(PSP_SYSTEMPARAM_ID_STRING_NICKNAME, nameBuffer, 50); printf(nameBuffer);

...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
-
07-16-2007, 02:53 PM #5543QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
thanks sg
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
-
07-16-2007, 10:46 PM #5544Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
yes i am in kernel (0x1000)
Zitat von Archaemic
Geändert von hallo007 (07-17-2007 um 07:05 AM Uhr) Grund: Automerged Doublepost
-
07-17-2007, 03:12 PM #5545QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
when using oslcos/oslsin does it take radians or degrees?
edit: it looks like it takes degrees as it takes an int not a float so nvm i guess unless i'm wrong1. 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
-
07-17-2007, 04:14 PM #5546I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I was just wondering if/how I could get PSPLink to load my PSPLock, becaus every time I try to execute it I get error 0x80020001.
I've tried using me vshmain.prx, and me vshmain.prx @vsh, but neither work correctly (although they both load, they just crash during the running).
I don't really have very good documentation on the commands, so any help/proper documentation would be great.
If you don't understand what I mean, the link to my thread is in my sig.
Thanks in advance for any help, would save lots of flashing tests
-Aura
-
07-17-2007, 04:29 PM #5547Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Use the OE version of psplink (under the 3.xx kernel).
Boot up psplink and run the loadvsh.sh script.
Run your PRX from there.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
07-17-2007, 04:33 PM #5548I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I don't have loadvsh.sh... where can I find this?
-Aura
Heh... ignore that, I've found it...Geändert von Auraomega (07-17-2007 um 05:13 PM Uhr)
-
07-17-2007, 05:39 PM #5549QJ Gamer Bronze
- Registriert seit
- Oct 2006
- Ort
- under the big rock
- Beiträge
- 485
- Points
- 5.656
- Level
- 48
- Downloads
- 0
- Uploads
- 0
hey im just trying to learn C and have been going through a hello world app but my computer (vista) will not compile my makefile and main.c into a eboot when i enter in cygwin comand "make" and if i type in ./makefile it shows 12 lines oftext showing that the command not found. i downloaded the pspdev from that drop i like its hot thread and put it in cygwin/usr/local. i dont know why it wont compile my main.c and makefile. i guess ill just try some difffernet ones and see if it is my computer
PSN ID= elmataplata
add me...
RIP Colin McRae, We'll never forget you! 555
-
07-17-2007, 05:50 PM #5550It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Do you have the toolchain installed?
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ


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