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; it also wont install the toolchain. but i do have tolchain under cygwin/home/(me)/psptoolchain but whenever i try to start psptoolchain.sh ...
-
07-17-2007, 05:55 PM #5551QJ Gamer Bronze
- Registriert seit
- Oct 2006
- Ort
- under the big rock
- Beiträge
- 485
- Points
- 5.656
- Level
- 48
- Downloads
- 0
- Uploads
- 0
it also wont install the toolchain. but i do have tolchain under cygwin/home/(me)/psptoolchain but whenever i try to start psptoolchain.sh it gives an error again. i guess ill have to reinstall cygwin
PSN ID= elmataplata
add me...
RIP Colin McRae, We'll never forget you! 555
-
07-17-2007, 05:57 PM #5552
Follow the instruction CLEARLY... It SURE will work.. Tested by many. incl me.
Zitat von wrcsti
Follow Cygwin tutorial at psp-programming.com Then my instructions,
I have Updated. the tutorial check it
-
07-17-2007, 06:03 PM #5553QJ Gamer Bronze
- Registriert seit
- Oct 2006
- Ort
- under the big rock
- Beiträge
- 485
- Points
- 5.656
- Level
- 48
- Downloads
- 0
- Uploads
- 0
thats where i went to get it done. i guess i didnt clik the right things then.
Zitat von Mr305
anyhow heres a screenshot of what its doing (note name edited off so to keep it unknown)
PSN ID= elmataplata
add me...
RIP Colin McRae, We'll never forget you! 555
-
07-17-2007, 06:06 PM #5554It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Okay...install autoconf. It's in the cygwin setup.
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-17-2007, 06:13 PM #5555QJ Gamer Bronze
- Registriert seit
- Oct 2006
- Ort
- under the big rock
- Beiträge
- 485
- Points
- 5.656
- Level
- 48
- Downloads
- 0
- Uploads
- 0
yeah im reinstalling all of this, many thanks to all of you!!!! its the reason i asked here and not at maxconsole or any other forums, id need a radioactive flamesuit in there for asking anything.
EDIT: ok its up and runing now. my hello world works flawlessly, it says in red in center of screen
Hello World. I am conquering you... just like i made it
Geändert von wrcsti (07-17-2007 um 06:28 PM Uhr)
PSN ID= elmataplata
add me...
RIP Colin McRae, We'll never forget you! 555
-
07-17-2007, 09:24 PM #5556QJ Gamer Green
- Registriert seit
- Jul 2007
- Beiträge
- 88
- Points
- 3.606
- Level
- 37
- Downloads
- 0
- Uploads
- 0
@slicer:
upspeed=5.0f
whats the f do?
-
07-17-2007, 09:27 PM #5557QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Tells the compiler that it is a float, rather than a double. As there is no double on the PSP processor, it is faster to use the 'f' to denote the float than to use the emulated doubles.
-
07-18-2007, 01:06 AM #5558Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
oke i splitt my ap in two threads , and in both threads I need Buttons , but when I use them in both threads , it doesnt work anymore (i use different variabels)
sugestions?
-
07-18-2007, 11:05 AM #5559words 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
Just one - wtf are buttons? If you are refering to button input in both threads, that makes sense.

...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-18-2007, 11:08 AM #5560QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
how do i load in prx's for example i find in order to init ad-hoc i need to load the following prxs:
"flash0:/kd/ifhandle.prx"
"flash0:/kd/memab.prx"
"flash0:/kd/pspnet_adhoc_auth.prx"
"flash0:/kd/pspnet.prx"
"flash0:/kd/pspnet_adhoc.prx"
"flash0:/kd/pspnet_adhocctl.prx"
"flash0:/kd/pspnet_adhoc_matching.prx "
however i'm unsure how to load a prx into the program i've been pouring over the sdk documentation for a method and have yet to find anything so any help would be appreciated1. 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-18-2007, 11:10 AM #5561It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
pspSdkLoadStartModule, IIRC.
Also, there's pspSdkLoadInetModules that does just that.pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-18-2007, 11:11 AM #5562QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
iirc...?
anyways thanks archaemic1. 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-18-2007, 11:16 AM #5563QJ Gamer Green
- Registriert seit
- Sep 2006
- Ort
- Cape Town, South Africa
- Beiträge
- 714
- Points
- 5.795
- Level
- 49
- Downloads
- 0
- Uploads
- 0
If I Remember Correctly.
-
07-18-2007, 11:22 AM #5564QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
o.....now i know
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-18-2007, 11:38 AM #5565QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
hey guys i was messing today with prxs... i wanted to test PSP_CTRL_DISC to see how does it work... i changed 1 to 0x1000 to set kernel mode but then when i compiled prx, it didnt worked....
Code:if(pad.Buttons & PSP_CTRL_DISC) { pspDebugScreenSetXY(1,9); printf("UMD : Ano"); } else if(!pad.Buttons & PSP_CTRL_DISC) { pspDebugScreenSetXY(1,9); printf("UMD : Nie"); }[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
07-18-2007, 11:48 AM #5566QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
SceUID pspSdkLoadStartModule ( const char * filename,
int mpid
)
what do i need to place as the second parameter? 1,0,what?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-18-2007, 12:16 PM #5567It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
This is just a guess, but PSP_MEMORY_PARTITION_KERN EL. I don't really know. I've never worked with WiFi.
(and delete that stray space when you put it in the program)pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-18-2007, 12:30 PM #5568QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Remember to use sceCtrlPeakBufferPositive () rather than sceCtrlReadBufferPositive ().
Zitat von myschoo
-
07-18-2007, 12:35 PM #5569QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
thanks arch
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-18-2007, 12:35 PM #5570words 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
What do you mean by load it into the program. You can easily read from the .prx file via basic file i/o beginners know.

...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-18-2007, 12:38 PM #5571QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
yes u can use basic i/o but i need to load it via module's at least from the example i'm working off i believe i have to
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-18-2007, 01:41 PM #5572
- Registriert seit
- May 2007
- Beiträge
- 31
- Points
- 3.340
- Level
- 35
- Downloads
- 0
- Uploads
- 0
damn... cant get it workin to rename a file on flash0.
assigned rdwr to flash0 but didnt work!
anyone can help out?
-
07-18-2007, 10:40 PM #5573Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
how dit you do it , post your code or we wont able to help you
-= Double Post =-
how do you get the size of a pointer , i mean this:
char *hello = "hello";
if i ask the size , it returns 5 , how do you do that?Geändert von hallo007 (07-19-2007 um 12:51 AM Uhr) Grund: Automerged Doublepost
-
07-19-2007, 04:44 AM #5574It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
For a null-terminated string, use strlen. For anything else, you have to keep track of the size yourself.
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-19-2007, 05:21 AM #5575Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
strlen , that was it , forgotten
-
07-19-2007, 08:15 AM #5576
5 is the size the strlen function returns, but it is actually taking up 6 bytes of ram as in c the compiler automatically adds the null terminator to a string literal.
Zitat von hallo007
with this
char *hello="hello/0";
strlen returns 5 even though you can see its 6 bytes long. The null terminator isn't counted by strlen
-
07-19-2007, 08:22 AM #5577Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
it doesnt need to be counted for me , because i need to see the lenght of some filenames;) but thnx for the info
-= Double Post =-
Is it possible to make a log on the psp?Geändert von hallo007 (07-19-2007 um 08:56 AM Uhr) Grund: Automerged Doublepost
-
07-19-2007, 10:25 AM #5578
- Registriert seit
- May 2007
- Beiträge
- 31
- Points
- 3.340
- Level
- 35
- Downloads
- 0
- Uploads
- 0
rename a file on flash
works fine when i to rename on ms0 .
but flash didnt work for some weird reason... hope someone can help?
as example...
sceIoUnassign("flash0:");
sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
if(pad.Buttons & PSP_CTRL_CROSS)
{
sceIoRename("flash0:/xxx.txt", "flash0:/yyy.txt");
}
thanks
-
07-19-2007, 10:23 PM #5579QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
I just need to say it -_-
Zitat von brethren
Its: char *hello="hello\0"; instead of char *hello="hello/0";
Well, that would take up 7 bytes since theres 2 null characters now but the idea would be the same :|
Simple error. Nothing big.
A log? As in a text file...then obviously, yes. For example, since you are talking about files, you could just read each file in a directory and print the list of files into a text file easily using fprintf. Assuming that is what you wanted to do.
Zitat von hallo007
[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]
-
07-19-2007, 10:34 PM #5580words 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
Personally, I made my own Log class I use in all my projects. I simply call
I recommend you create something similar, as debugging is faster (IMO) should you log step by step in your code.Code:Entity.Log("Player got hit by bullet, health now = %i", player.Hleath()); AI.Log("Ghost #%i spotted Player", i);
...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


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