search for "lastpad"
Printable View
search for "lastpad"
..I know how to use lastpad..You coulda told me that what I was forgeting.Zitat:
Zitat von nataku92
...Well, I guess I figured out my problem then.
Yes their is a way.Zitat:
Zitat von Auraomega
Make sure you're including pspwlan.h too.Code:unsigned char mac[8];
sceWlanGetEtherAddr(mac);
pspDebugScreenPrintf("Mac: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
@MrChoas: You use FrameCounter as the index for the array MenuImages. When it is 5 or more, it goes beyond the range of the array.
Your problem is right here:
Code:if (pad.Buttons & PSP_CTRL_DOWN)
{
FrameCounter ++;
if (FrameCounter > 5) // Wrong condition
FrameCounter = 5; // Wrong value
}
}
Thats ugh... informative... now could someone tell me how to do it, or point me in the direction of some source code or something that does this please?Zitat:
Zitat von Anti-QuickJay
-Aura
Damn your blind.
IWN posted the code above. Duh.
I don't feel like handing people code when they can look at the pspwlan.h file and get the info needed.
Then dont post pointless things. You could have told him to go and look at that specific header
Here's the way I stop key-repeat. It doesn't allow any key-repeat at all, which is a bit limited. Some libraries take care of key-repeat for you and have it automatically repeat after a while.
After doing this, keysPressed will give you the keys which have just been pressed and keysReleased will give you the keys which have just been released. I find it makes your code simpler because instead of:Code:// before the main loop
unsigned long lastKeys = 0L ;
SceCtrlData pad ;
// at the beginning of the main loop
sceCtrlReadBufferPositive(&pad, 1) ;
unsigned long keysPressed = (pad.Buttons ^ lastKeys) & pad.Buttons ;
unsigned long keysReleased = (pad.Buttons ^ lastKeys) & lastKeys ;
// at the end of the main loop
lastKeys = pad.Buttons ;
you just have:Code:if ((pad.Buttons & PSP_CTRL_DOWN) && !(oldPad & PSP_CTRL_DOWN))
(Unless there's an easier way)Code:if (keysPressed & PSP_CTRL_DOWN)
Someone already told me that, so I fixed it.Zitat:
Zitat von yaustar
-= Double Post =-
It still moves way to fast, I'ma just use lastpad.Zitat:
Zitat von coolguy5678
-= Double Post =-
Anyone know the code to execute the UMD?
im using oldpad... its nearly same as in LUA :D
or
for(int loop = 0; loop > 5; loop++) sceDisplayWaitVblankStart ();
if u work with two loops
in cZitat:
Zitat von hallo007
int loop;
for(loop = 0; loop<5; loop++)
sceDisplayWaitVblankStart ();
or as raphael showed use C99 for use in c;)
thats not what i was trying to show. your loop won't be activated, everZitat:
Zitat von hallo007
the for loop is only run if the second expression, the test condition, is true
uh wtf?
for(int loop ....
is c++
(in c it is int loop; for(loop....
but you can use it in c if you do something with c99, never tried anyway
Zitat:
Zitat von hallo007
Code:for(int loop = 0; loop > 5; loop++)
Look at the bolded section again.Code:for(loop = 0; loop < 5; loop++)
I'm not sure if anyone caught my question. I'm looking for a code to execute the UMD in the umd drive. (I looked in pspsdk, but found no examples).
first result on google:
Code:int i;
i = sceUmdCheckMedium(0);
if(i == 0)
{
sceUmdWaitDriveStat(UMD_WAITFORDISC);
}
sceUmdActivate(1, "disc0:/");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
sceKernelLoadExecVSHDisc(PATH, NULL);
Hey guys, i haven't been here in a while, but i have a problem with installing freetype (i had to reinstall cygwin). I have been following this guide: http://forums.qj.net/f-psp-developme...n-c-47934.html.
When i do
everything is fine. But when i tryCode:svn co svn://svn.ps2dev.org/psp/trunk/freetype
I get this error:Code:sh autogen.sh
I would love it if anyone could help. Thanks.Code:[email protected] ~
$ cd freetype
[email protected] ~/freetype
$ sh autogen.sh
running `aclocal -I .'
autogen.sh: line 15: aclocal: command not found
error while running `aclocal -I .'
But what do I need for the includes?Zitat:
Zitat von eldiablov
Anyone?Zitat:
Zitat von Xylem
psploadexec_kernel.hZitat:
Zitat von MrChaos
pspumd.h
Thanks.Zitat:
Zitat von brethren
-= Double Post =-
EDIT:
It comes up with 'PATH' Undeclared...I'm missing something? EDIT again, Actually, it says there all undeclared..There's problably a chunk of code I'm missing, right?
Code:int i;
i = sceUmdCheckMedium(0);
if(i == 0)
{
sceUmdWaitDriveStat(UMD_WAITFORDISC);
}
sceUmdActivate(1, "disc0:/");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
sceKernelLoadExecVSHDisc(PATH, NULL);
you havent declared path as a variable. maybe put char PATH[256] = "disk0:/folder/boot.bin" or w.eZitat:
Zitat von MrChaos
Do you have the autotools installed? (autoconf and automake)Zitat:
Zitat von Xylem
That works, but now these are undefined refrenses:Zitat:
Zitat von JaSo PsP
sceUmdWaitDriveStat(UMD_W AITFORDISC);
sceUmdActivate(1, "disc0:/");
sceUmdWaitDriveStat(UMD_W AITFORINIT);
I had a feeling there was a huge chunk of missing code. :(
looks like you have to #include something else
Yeah, that's what I was thinking...Idk what though.Zitat:
Zitat von myschoo
-lpspumd?
Which makefile line do I put it on?Zitat:
Zitat von _dysfunctional
Libs?
Wow, thanks it worked. (Sorry, I never messed with my makefile before, thats why I didn't know).Zitat:
Zitat von _dysfunctional
suppose:
orCode:char oh_hellow0rld[20][40]= {"39 chars max long","19 SUCH STRINGS" }
Code:char oh_hellow0rld[20][40]= {"19 chars max long","39 SUCH STRINGS" }
Did anyone get what I'm sayin?
dindt really understand him:pZitat:
Zitat von yaustar
it was to fast written;)
That is an array of 20 strings, 40 characters per string.Code:char oh_hellow0rld[20][40];
That will print, "Hello World!".Code:#include <stdio.h>
#include <stdlib.h>
int main()
{
char helloWorld[3][10] = { "Hello", " ", "World!" };
printf("%s%s%s\n", helloWorld[0], helloWorld[1], helloWorld[2]);
return 0;
}
Yes. Just reinstalled it...it's working! Thank you!!Zitat:
Zitat von Archaemic
Neither one. 20 char*s each with 40 chars (but only 39 are usable if you're using them a C strings)Zitat:
Zitat von Mr305
sorry, i was actually playing around with the functions in pspumd.h myself and just forgot to tell you about putting LIBS= -lpspumd in the makefile.Zitat:
Zitat von MrChaos
anyway did the code load a umd for you?
No, It froze the app after I started up.Zitat:
Zitat von brethren