Zeige Ergebnis 6.991 bis 7.020 von 10174
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; Ah, Thanks a bunch......
-
11-28-2007, 07:01 PM #6991lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Ah, Thanks a bunch...
-
11-29-2007, 12:37 AM #6992
I've tried the same as anti a while ago and got the same error.
Zitat von brethren
Can you tell me what the 3 and 6 stand for?
CheersPlaco23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-29-2007, 06:20 AM #6993QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
The numbers of the scripts to execute. Take a look in the psptoolchain/scripts folder, there you'll see a set of scripts that download, compile and install the different parts needed for setting up the toolchain. If you only need the pspsdk, then it's enough if you only do step 6 (step 3 is only important if newlib or gcc is updated too).
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
11-29-2007, 07:55 AM #6994
Zitat von Raphael
Right... got it.. thanks!
I was trying with the -p at the end but with no success.
CheersPlaco23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-29-2007, 09:15 PM #6995Psp Dev

- Registriert seit
- Jun 2005
- Ort
- Nebraska
- Beiträge
- 228
- Points
- 5.664
- Level
- 48
- Downloads
- 0
- Uploads
- 0
I just got done installing the template for VC++ and I get an *.o error when I try to compile.
-
11-29-2007, 09:19 PM #6996It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
...
You can't compile PSP apps using VC++.
(By the way, I solved my problem earlier)pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
11-29-2007, 09:27 PM #6997QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- Homebrewland, CA
- Beiträge
- 191
- Points
- 4.295
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Hey, I've been in need for a working tutorial for installing the psptoolchain on mac osx leopard for a little while now. I've tried a few previous ones, but they seem to give me errors. Is their a foolproof method?
-
11-29-2007, 10:16 PM #6998QJ 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
using this, would i need to put a space inbetween the intigers for the width and height?
Zitat von Waterbottle
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
11-30-2007, 02:17 AM #6999QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Actually, you can. The simplest way is to use a Makefile project.
Zitat von Archaemic
[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]
-
11-30-2007, 04:44 AM #7000QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
No, but you'd have to put them in binary form there.
Zitat von BlackShark
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
11-30-2007, 10:04 AM #7001Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
does anyone know why i get this error while running the ./toolchain.sh script, i have all of the relevant paths set i think - here is my cygwin.bat
and i installed every single possible thing for cygwin so i don't think that is what it isCode:@echo off C: chdir C:\cygwin\bin set PSPDEV=/usr/local/pspdev set PSPSDK=$PSPDEV/psp/sdk set PATH=$PATH/usr/local/pspdev/bin bash --login -i
here is the error
Code:df_to_usi.o libgcc/./_usi_to_df.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde. o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o psp-ar rc ./libgcov.a libgcc/./_gcov.o libgcc/./_gcov_merge_add.o libgcc/./_gco v_merge_single.o libgcc/./_gcov_merge_delta.o libgcc/./_gcov_fork.o libgcc/./_gc ov_execl.o libgcc/./_gcov_execlp.o libgcc/./_gcov_execle.o libgcc/./_gcov_execv. o libgcc/./_gcov_execvp.o libgcc/./_gcov_execve.o libgcc/./_gcov_interval_profil er.o libgcc/./_gcov_pow2_profiler.o libgcc/./_gcov_one_value_profiler.o make[3]: psp-ar: Command not found make[3]: psp-ar: Command not found make[3]: *** [libgcc.a] Error 127 make[3]: *** Waiting for unfinished jobs.... make[3]: *** [libgcov.a] Error 127 make[3]: Leaving directory `/home/[email protected]/trunk/psptoolchain/build/gcc-4.1.0/bu ild-psp/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/home/[email protected]/trunk/psptoolchain/build/gcc-4.1.0/bu ild-psp/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/[email protected]/trunk/psptoolchain/build/gcc-4.1.0/bu ild-psp' make: *** [all] Error 2 ../scripts/002-gcc-4.1.0-stage1.sh: Failed. [email protected]@craigs_computer ~/trunk/psptoolchain $
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
11-30-2007, 11:05 AM #7002QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Type the following two lines in cygwin and restart it. Then run the toolchain again.
If that doesn't help, type "echo $PSPDEV" and "echo $PATH" and show us what it printed.Code:echo "export PSPDEV=/usr/local/pspdev" >> ~/.bashrc echo "export PATH=$PATH:$PSPDEV/bin" >> ~/.bashrc
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
11-30-2007, 11:32 AM #7003Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
i typed both of those restarted but it didnt seem to do anything
i cganged the export to set because that is what cygwin accepts it is export on linux and restarted nothing had changed and here are my echo's for my paths
which seem to be right so why do i get that error ????????????Code:[email protected]@craigs_computer ~ $ echo $PSPDEV /usr/local/pspdev [email protected]@craigs_computer ~ $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH/usr/local/pspdev/bin:/usr/lib/ lapack [email protected]@craigs_computer ~ $
also this is my .bashrc file now
i checked it out using nanoCode:export PSPDEV=/usr/local/pspdev export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH/usr/local/pspdev/$ set PSPDEV=/usr/local/pspdev set PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH/usr/local/pspdev/bin$
i.e. nano ~/.bashrc
- ill try running the toolchain script again now and come back here if i get the same or a new error thanks------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
11-30-2007, 11:56 AM #7004QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Isn't correct. There shouldn't be the literal "$PATH" in there before the /usr/local/pspdev/bin
Zitat von FaT3oYCG
Make that .bashrc file look like this:also this is my .bashrc file now
Code:export PSPDEV=/usr/local/pspdev export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH/usr/local/pspdev/$ set PSPDEV=/usr/local/pspdev set PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH/usr/local/pspdev/bin$
And cygwin should accept export, since it simulates a *NIX environment. If your cygwin bash doesn't accept that, then you haven't set it up correctly.Code:export PSPDEV=/usr/local/pspdev export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/pspdev/ set PSPDEV=/usr/local/pspdev set PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/pspdev/bin
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
11-30-2007, 12:13 PM #7005I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
In Devhook, the system was rebooted and things were loaded from the memorystick instead of the flash right? Would this be possible to do in the flash, for example to load a different vshmain.prx? I'm looking for a way to load PSPLock only on system startup, and not when a game is exited, and this seems to most fesible way currently. Can anyone help me out?
-Aura
-
11-30-2007, 01:03 PM #7006Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
ok bash rc now looks like what you said
cygwin.bat changed and now path looks like what you said
cygwin.bat
.bashrcCode:@echo off C: chdir C:\cygwin\bin set PSPDEV=/usr/local/pspdev set PSPSDK=$PSPDEV/psp/sdk set PATH=/usr/local/pspdev/bin bash --login -i
echo'sCode:export PSPDEV=/usr/local/pspdev export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/pspdev/bin:/$ set PSPDEV=/usr/local/pspdev set PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/pspdev/bin:/usr$
- running ./toolchain.sh nowCode:[email protected]@craigs_computer ~ $ echo $PSPDEV /usr/local/pspdev [email protected]@craigs_computer ~ $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/pspdev/bin:/usr/lib/lapac k [email protected]@craigs_computer ~ $
please tell me if its still wrong------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
12-01-2007, 06:58 AM #7007Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
I made a simple code to load a 24 bit uncompressed BMP into memory, it works perfectly on my computer but on the PSP it crashes for some reason.
width is declared as an unsigned int in the public scope of the class.Code:bool Image::loadBMP( const char *path ) { FILE *fp = fopen( path, "r" ); if( fp == NULL ) return false; char header[54]; fread( header, 54, 1, fp ); // BMP identifier if( *(short*)&header[0] != 19778 ) { fclose( fp ); return false; } width = *(unsigned int*)&header[18]; // It crashes here! height = *(unsigned int*)&header[22]; data = (unsigned char*)malloc( width*height*3 ); fseek( fp, *(unsigned int*)&header[10], SEEK_SET ); fread( data, width, height*3, fp ); fclose( fp ); return true; }
-
12-01-2007, 09:03 AM #7008I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
How would I use sctrlKernelExitVSH? I've attempted using it on 3.52 and it just keeps rebooting with the normal pspbtcnf.bin file, and not the custom one I've made, my code is this:
but this just reboots and restarts it like normal, I've tried switching kn to kd, and the bin file to a txt file (incase it works like the old pspbtcnf files), but its not helped at all. Theres very little source code with this command in use, so I can't compare and see what I'm doing wrong, so if anyone knows could you point out my error please?Code:struct SceKernelLoadExecVSHParam param; memset(¶m, 0, sizeof(param)); param.size = sizeof(param); param.configfile = "/kn/pspbtcnf_P4.bin"; int check = sctrlKernelExitVSH(¶m);
Thanks.
-Aura
-
12-01-2007, 09:15 AM #7009QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
GCC has problems compiling such code into correct assembly instructions for PSP (or MIPS in general?) [well, actually it sometimes just puts the instructions in wrong order]. Also, you're trying to read an int from an offset that is not word aligned (18, 22 and 10), which will result in a bus error.
Zitat von Waterbottle
Avoid such pointer 'magic' and do proper casts. If you need to read ints (or shorts) from unaligned addresses, read it byte for byte and connect the single bytes to the wanted data type. Yes, PSP programming is sometimes a pain.
Alternatively you could just create a packed struct with the header information and read it in one go. In that case the compiler would take care of the unaligned reading.
PS: That's one of the reasons why everyone knowing about PSP programming suggests beginners to NOT start with PSP programming, but start with coding for PC. Just a generic note, not aimed at you.Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
12-01-2007, 09:01 PM #7010Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Is there a code profiler available for the PSP? is not, how would i go about making one? the articles ive read are platform dependent (as they should be, but that leave the PSP with nothing)
--------------------------------------------------------------------------------------
-
12-02-2007, 06:10 AM #7011QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
pspsdk\src\samples\debug\ profiler
and
gprof do it's job
http://www.cs.utah.edu/dept/old/texinfo/as/gprof.htmlRaphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
12-02-2007, 10:27 AM #7012
Hi,Im just trying to learn C++ and as I go on I would like to make a little game for my personal learning and add my knowledge to this game as I progress but It its good to start something out of bad basis.So here is my Code please help me to get it sort out:
Main.c:Spoiler for Main:
Makefile:Spoiler for Makefile:
Here are all my files:
http://zereox.googlepages.com/StarShooter.rar
Thanks again.Free Prizes at Prizerebel Join us!
I already got 11 Gifts. Ask me for details or proof.
-
12-02-2007, 10:35 AM #7013Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
What is there to sort out ? There's barely any code minus the callbacks.
-
12-02-2007, 10:54 AM #7014Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
holy crap. thats easier than i thought..
Zitat von Raphael
--------------------------------------------------------------------------------------
-
12-02-2007, 03:50 PM #7015
eldiablov I know but The think is that it compiles but simply doesn't work.
Free Prizes at Prizerebel Join us!
I already got 11 Gifts. Ask me for details or proof.
-
12-02-2007, 04:16 PM #7016QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
"Doesn't work" is as helpful as an refrigerator on the north pole. Learn to properly articulate the exact problem you have and you will get help much sooner the next time.
Zitat von ZereoX
Your program has two major issues:
1. You are only blitting your images at the exact time a button has been pushed or released, hence you will only see something starting from when the first such event occured.
2. You infinitely loop your main loop, preventing your application from ever exiting (even when home button is pressed). Put a breaking case into your loop.
If you don't know what to do, try the search function as this is a common problem.Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
12-02-2007, 05:15 PM #7017
OK thanks Raphael, I got it fix. Everything works but I don't really understand number 2 I just know that I am able of exiting using the home key.Care to explain a bit more please I'm no so sure to understand the principle behind Infinite loops.
Free Prizes at Prizerebel Join us!
I already got 11 Gifts. Ask me for details or proof.
-
12-02-2007, 05:36 PM #7018OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Ignore Raphael about the infinite loop thing.
Even though your program does have an infinite loop - you've set up the callback thread. No matter what your program is doing, you have the option of exiting thanks to the callback thread.
The callback thread ( SetupCallbacks; ) is essentially the home button exiting.
As for an infinite loop explanation - basically imagine a loop as reading your code from top to bottom, then going back to the top again.
Now imagine this happening without some way of exiting the loop.Code:while(1) { // Code }
Your program will never be able to reach 'some more code' without somehow exiting the loop its currently in. You can break the loop and move on withCode:while(1) { // Code } // Some more codeCode:break;
-
12-02-2007, 06:51 PM #7019
Ok thanks.But as you might see might controls are in a loop if I break and go on i won't be able to move anymore.I either Build everything into that loop or is there a other way?
Free Prizes at Prizerebel Join us!
I already got 11 Gifts. Ask me for details or proof.
-
12-02-2007, 07:08 PM #7020OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
pretty much
Zitat von ZereoX


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