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; Zitat von Moca Spoiler for Copy a file to flash1 : u8 dataOut[2000000] __attribute__((aligned(64 ))); int copy_file(char *src, char *dst) ...
-
01-10-2007, 07:35 AM #2491Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
it flashes backup.mp3 as an folder:|
Zitat von Moca
-
01-10-2007, 07:40 AM #2492AKA Homer

- Registriert seit
- Jan 2006
- Ort
- Sweden
- Beiträge
- 1.779
- Points
- 12.596
- Level
- 73
- Downloads
- 0
- Uploads
- 0
Add a
Zitat von HYde
right before you return the main function.Code:system("PAUSE");
-
01-10-2007, 11:19 AM #2493
hey, im a new programmer, and i just wondered if there was an equivalent to "scanf()" for the psp...if not is there a way i can easily replace this function?
thanks in advance
-
01-10-2007, 12:14 PM #2494QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Huh? WTF!??!?? :)
Zitat von hallo007
It does not :P
[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]
-
01-10-2007, 01:55 PM #2495QJ Gamer Blue
- Registriert seit
- Jan 2006
- Ort
- CO
- Beiträge
- 150
- Points
- 8.686
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
It's really not a problem now! Just thought it was weird how one program would stay open and the other wouldn't. I can't figure it out and I hate that.
Do you have code::blocks working with cygwin by chance?
Zitat von yaustar
@Moonchil, yeah I know about system("pause"); personally I think its overkill.
Just throwing this out there, what IDE's are people useing that work good with cygwin?
-
01-10-2007, 01:57 PM #2496
Tried using functions in PSPUMD.h & I get these errors! How do i solve it?Code:$ make psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/ pspdev/psp/sdk/lib main.o -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspus er -lpspkernel -o Saywhat.elf main.o: In function `checkumd': main.c:(.text+0x8): undefined reference to `sceUmdCheckMedium' collect2: ld returned 1 exit status make: *** [Saywhat.elf] Error 1
I even added these
LIBDIR =
LIBS = -lpspumd
LDFLAGS =
How do I solve it. Please help. PLease!Geändert von Mr305 (01-10-2007 um 02:08 PM Uhr)
-
01-10-2007, 02:25 PM #2497QJ Gamer Blue
- Registriert seit
- Jan 2006
- Ort
- CO
- Beiträge
- 150
- Points
- 8.686
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Crazy I was at this site yesterday I don't know how I didnt see this yesterday but this is a good FAQ about implementing a pause. Different examples some not portable and thats what im watching out for.
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
-
01-10-2007, 03:00 PM #2498QJ Gamer Platinum
- Registriert seit
- Dec 2005
- Ort
- h0000000rj
- Beiträge
- 12.867
- Points
- 57.528
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Please post your source code. Please!
Zitat von Mr305
[I fail @ life]
-
01-10-2007, 06:28 PM #2499Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Use it exactly as you would in non-PSP specific programming.
Zitat von willolner
include stdio.h and just call scanf as you would normally.
-= Double Post =-
Make sure you have included pspumd.h in your code, and that your LIBS has -lpspumd.
Zitat von Mr305
The output you gave did not have -lpspumd in the LIBS.Geändert von Insert_Witty_Name (01-10-2007 um 06:28 PM Uhr) Grund: Automerged Doublepost

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
-
01-10-2007, 09:22 PM #2500Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
It's because after pressing enter to submit the last value the script will quickly move on and get to the getchar(), then seeing as you still are pressing enter it will move on.
Zitat von HYde
If you added another getchar() right after the last scanf() then it would wait until you release the enter button and then press it again before continuing on the last getchar().
-
01-10-2007, 09:54 PM #2501QJ Gamer Platinum
- Registriert seit
- Dec 2005
- Ort
- h0000000rj
- Beiträge
- 12.867
- Points
- 57.528
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Heh, good call. I took the lazy road ;)
Zitat von Insert_Witty_Name
[I fail @ life]
-
01-11-2007, 10:46 AM #2502QJ Gamer Blue
- Registriert seit
- Jan 2006
- Ort
- CO
- Beiträge
- 150
- Points
- 8.686
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Nice! I Knew it was going to be something as simple as that.
Zitat von Waterbottle
-
01-12-2007, 10:39 AM #2503Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
wich icons are for wat (PIC0.png,...)
and how do you convert your mp3 to at3??
-
01-12-2007, 10:56 AM #2504Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Use Goldwave or similar to change your MP3 to AT3.
PIC1.PNG is the large backround image of your eboot.
ICON0.PNG is the 144x80 image you see in the menu.
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
-
01-13-2007, 05:51 AM #2505Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
thnx i did it:)
but how do you let repeat the at3 song?
-
01-13-2007, 06:55 AM #2506Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
At the present time, you can't.

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
-
01-13-2007, 09:52 AM #2507Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
didn't art did it?
-
01-13-2007, 01:01 PM #2508words 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
Please speak propper english or don't speak it at all...
Insomniac - The EBOOT AT3 music can be looped. I don't know how, I just know I've seen it. I liked the bg music of an app and let it play for 5 minutes or so...
...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
-
01-13-2007, 01:18 PM #2509Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
i dont see what's wrong with that:
art = developerdidn't art did it
it= looping at3's
dind't= i am not sure , but i thnik
;)
-
01-13-2007, 01:31 PM #2510QJ Gamer Blue
- Registriert seit
- Jan 2006
- Ort
- CO
- Beiträge
- 150
- Points
- 8.686
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
I don't believe Art did his icon.
Zitat von ganon
-= Double Post =-
Zitat von Art
Hallo007, are you from the states? It's like when im talking to my cousin from the phillipines. I got ya?Geändert von HYde (01-13-2007 um 01:31 PM Uhr) Grund: Automerged Doublepost
-
01-14-2007, 02:13 AM #2511
- Registriert seit
- Dec 2006
- Beiträge
- 37
- Points
- 3.797
- Level
- 38
- Downloads
- 0
- Uploads
- 0
its ok, just a simple grammar error (i hate being a teacher), it would be
Zitat von hallo007
"didn't art do it?"
-
01-14-2007, 08:44 AM #2512Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
What does LL after a number mean?
example,
key * 6364136223846793005LL + 1;
-
01-14-2007, 09:00 AM #2513QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
At a wild guess, it means use this constant as a long long datatype.
http://publib.boulder.ibm.com/infoce...as400clr36.htm[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]
-
01-14-2007, 10:58 AM #2514Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
That's pretty much it.
Same as you can put an 'f' at the end of a float to signify float (rather than double), as in '3.85f'.
It's useful if you want to use a value but not declare it as a variable and you want it to be a certain data type.
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
-
01-14-2007, 03:09 PM #2515words 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
Cant you just do:
float(#)
(float)#
Or is that just for a variable?
...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
-
01-14-2007, 10:27 PM #2516QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
hey can anyone point me to a tut on doing 3d games and also how to install/where to find the gui libary's(believe there the 3d ones) as i'm trying to re create my game i'm working on into 3d thanks in advance
edit: also i've searched this forum and ps2dev forums like: 3d, three,etc but now that i think of it i well try gui1. 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
-
01-14-2007, 10:32 PM #2517words 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
For one, its called GU for one reason - Graphics Utility abbreviation. Not GUI.
Just thought Id say that...
And your best bet would be to go to psp-programming.com and find that 12 tutorial lesson for the GU in the forums.
...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
-
01-14-2007, 10:36 PM #2518QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
o ok i wasn't sure between gu and gui anyways thanks i'll check them=-)(didn't think of psp-programming)
-= Double Post =-
ok sweet found them thanks a bunch this well really helpGeändert von slicer4ever (01-14-2007 um 10:36 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
-
01-15-2007, 11:17 AM #2519QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Hey all,
I need to know how to define a function for something I'm making.
Oh and more than or equal to and less than and equal to.
Thanks.
EDIT - is it just
?Code:void lol() { printf("lololoolooooolllll"); } //and then to call it lol();
Is it supposed to be inside or outside the main loop?
I just want to make my code cleaner and more organized.Geändert von PSPduh (01-15-2007 um 11:37 AM Uhr)
-
01-15-2007, 12:00 PM #2520Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
outisde of the mainfuction, yes.
> more than
< less than
>= more than or equal
<= less than or equal


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