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 hallo007 is there a documentation of how to use the dual boot with the modchip? I dunno exactly ...
-
05-16-2007, 07:42 AM #4471QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Finland
- Beiträge
- 752
- Points
- 7.385
- Level
- 57
- Downloads
- 0
- Uploads
- 0
I dunno exactly what do you mean, but here's something about accessing PSP NAND when running from U.P flash.: http://forums.maxconsole.net/showpos...14&postcount=8
Zitat von hallo007
wheeee =:D
-
05-16-2007, 07:45 AM #4472Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
that was what I needed;) , Thanx:)
-= Double Post =-
if you call pspDebugScreenClear in a thread , will it clean the screen in another thread too?
if YES
how to you delete the text of one therad without touching the text of another threadGeändert von hallo007 (05-16-2007 um 11:26 AM Uhr) Grund: Automerged Doublepost
-
05-16-2007, 12:49 PM #4473QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
anyone know know where i can learn more on how to use the psp's ir functions
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
-
05-16-2007, 12:53 PM #4474QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
/usr/local/pspdev/psp/sdk/samples/ir/
and
/usr/local/pspdev/psp/sdk/include/pspsircs.h
-
05-16-2007, 01:20 PM #4475QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
i did but they only go so far also not to much of a description of how it is used so i was looking for a better tut on how to use the ir commands
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
-
05-16-2007, 01:24 PM #4476QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
The sdk has great documentation. You should be able to work it out with those two references.
-
05-16-2007, 01:35 PM #4477QJ Gamer Blue
- Registriert seit
- Feb 2007
- Ort
- Florida
- Beiträge
- 214
- Points
- 4.031
- Level
- 40
- Downloads
- 0
- Uploads
- 0
Guys, I got a question that it a little hard for me to word, but I'll try.
If I try to make a program that gives you a list of the images on your memory stick, how would i give it a code so that it will display the .png? (I mean, no matter what the name of the png, it will load. [ I know how to load images to the screen, this is a little different ] ).
Kinda like loading a random image, how would I do that? (If I can at all)
-
05-16-2007, 01:51 PM #4478Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
You worded it fine.
You need to get a list of the file names in a directory, parse these names for files that end in .png and then pick one.
Check out dirent.h, and Google for opendir, readdir, closedir etc. for how to use the functions.
I used this exact same method to get a random song from the PSP/MUSIC directory in 48 Hour Pong.
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
-
05-16-2007, 02:00 PM #4479QJ Gamer Blue
- Registriert seit
- Feb 2007
- Ort
- Florida
- Beiträge
- 214
- Points
- 4.031
- Level
- 40
- Downloads
- 0
- Uploads
- 0
Ok. Thank you.
Zitat von Insert_Witty_Name
-
05-16-2007, 03:57 PM #4480QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
The screen is the screen. If you clear it, it's cleared and stays so until you change it again. The screen doesn't care for threads or multiple processors working with it. If you consult your brain, it will give you the same answer.
Zitat von hallo007
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.
-
05-16-2007, 06:34 PM #4481QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
I don't know why but i get these errors:
I have never had this error before. What could be caused by?Code:main.c:844: warning: type defaults to 'int' in declaration of 'sceKernelSleepThr ead' main.c:844: warning: data definition has no type or storage class main.c:845: error: syntax error before 'return' make: *** [main.o] Error 1
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
05-16-2007, 06:37 PM #4482QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Code, please.
-
05-16-2007, 06:37 PM #4483QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
um...it helps to see the lines
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
-
05-16-2007, 06:42 PM #4484QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Wow.....this is not gonna be pretty....sure? It's pretty much my source for my biography of us presidents app that i will release this weekend (i just have to polish up my code and add mp3 player). Well, here it is:
http://rafb.net/p/wuCsy683.htmlCalypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
05-16-2007, 07:29 PM #4485QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 90
- Points
- 4.912
- Level
- 44
- Downloads
- 0
- Uploads
- 0
Just guessing, but I think you might have an extra closing bracket:
Also, your code is ridiculously redundant. For example, this:Code:} sceKernelSleepThread(); return 0; }
Spoiler for before:
can be shortened to something like this:
There's a lot more things like this that would make you code easier to read and to maintain.Code:clearScreen(0); OnMain = 0; if (mainsetting != 44) { OnPicture = 1; picturesetting = mainsetting; } else { OnMenu = 1; menusetting = 1; }
-
05-16-2007, 07:44 PM #4486QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Thanks for the tips dude! The second code you gave me is much shorter and better, and i should have seen the pattern. Thanks. Also, by taking out the bracket, i get an error that the main function is non-static, i need that. My code compiles, and it doesn't freeze either, you can see everything loading, the home button works, and the sound is working when you move. Basically, the flipScreen is working.
Geändert von SuperBatXS (05-16-2007 um 07:57 PM Uhr)
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
05-16-2007, 07:52 PM #4487QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
edit: nvm
-= Double Post =-
ok heres my question:
how do i return the mac address
-= Double Post =-
nvm i figured it outGeändert von slicer4ever (05-16-2007 um 08:34 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
-
05-16-2007, 10:21 PM #4488Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
I thought so , but how do you let disapere text in thread one , without touching the text in thread 2
Zitat von Raphael
-
05-16-2007, 10:48 PM #4489
I want to recode my game PSPokemon to C but I always get the error "Graphics.h: No such file or directory". It would be great if someone can give me the file.
-
05-16-2007, 11:05 PM #4490
you can get it here
Zitat von sony psp player
http://www.psp-programming.com/tutorials/c/lesson04.zip
-
05-16-2007, 11:28 PM #4491QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Finland
- Beiträge
- 752
- Points
- 7.385
- Level
- 57
- Downloads
- 0
- Uploads
- 0
If I understood right, just paint the text from thread 2 after clearing the screen.
Zitat von hallo007
wheeee =:D
-
05-16-2007, 11:35 PM #4492Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
mm , but how does sony then creat the exit screen?
-
05-16-2007, 11:43 PM #4493QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Finland
- Beiträge
- 752
- Points
- 7.385
- Level
- 57
- Downloads
- 0
- Uploads
- 0
Maybe it draws it's own stuff AFTER the game has drawn its own?
Zitat von hallo007
wheeee =:D
-
05-16-2007, 11:54 PM #4494QJ 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
For a file browser, would the following check to see if a file is an mp3?
And would this load and play that file appropriately?Code:if(strcmp(".mp3", gameEntry[current_selection].name)-4)
Code:MP3_Init(1); MP3_Load(gameEntry[current_selection].name); MP3_Play();
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
05-16-2007, 11:56 PM #4495Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
1)if(strcmp(".mp3", gameEntry[current_selection].name) == 0)
2) dunno how you made your mp3player
-= Double Post =-
error: syntax error before 'RpKeyBoard
error: syntax error before '{' token
error: syntax error before '}' token
the code is 100% correct , do i need to include something for classes on psp?Code:class RpKeyBoard { public: int keyPressed(); int KEY_ENTER; };Geändert von hallo007 (05-17-2007 um 12:04 AM Uhr) Grund: Automerged Doublepost
-
05-17-2007, 12:12 AM #4496Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Well, you need to make sure that the suffix of the file is .cpp for C++.
You'll also need to link lstdc++ in your Makefile.
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
-
05-17-2007, 12:40 AM #4497Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
oke , back to the structs , otherwhise i need to port my code to c++ , thnx anyway
-= Double Post =-
Code:main.c:87: warning: passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
Code:soundThread = sceKernelCreateThread("Menusoundthread", menuSoundThread, 0x20, 0x10000, 0, NULL);what is wrong with argument two?Code:int menuSoundThread(int argc, const char* argv[])
Geändert von hallo007 (05-17-2007 um 12:49 AM Uhr) Grund: Automerged Doublepost
-
05-17-2007, 01:01 AM #4498QJ Gamer Green
- Registriert seit
- Oct 2006
- Ort
- UnkowN
- Beiträge
- 688
- Points
- 6.129
- Level
- 50
- Downloads
- 0
- Uploads
- 0
dudes i was wondering if there was FireFox 2 on PSP i have searched the web and i found a prank and i was wondering if there was anyone who wanted to get into the scene this can a great idea as FireFox can change themes,has plugins(i hope it would work) and lots of updates and ThunderBird can also be a good suggestion
[FONT="Courier New"][COLOR="teal"]MsHarsed[/COLOR][/FONT]
-
05-17-2007, 01:05 AM #4499Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
there is a specualtion forum .......
-= Double Post =-
still not fixed
Zitat von hallo007
-= Double Post =-
fixed , you need to use (SceSize args, void *argp) instead of (int argc, const char* argv[])Geändert von hallo007 (05-17-2007 um 07:13 AM Uhr) Grund: Automerged Doublepost
-
05-17-2007, 03:47 PM #4500QJ 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 mac address i know i gatta use this command:
Spoiler for command:
so i try and call it like:
char mac_address[7] //7 because thats what the function says to have
then i call it like:
sceWlanGetEtherAddr(mac_a ddress);
but it doesn't place anything into the mac_address as i need to get the mac address.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


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