![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
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; @yaustar I used the code that you posed and it worked. I have got a second counter based on the ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#9961 |
![]() |
@yaustar
I used the code that you posed and it worked. I have got a second counter based on the ticks. However... When i divide res by 1000, to get a millisecond counter, it goes ALOT slower, 1000 milliseconds pass in about 15 seconds, when 1000ms are supposed to be 1 second.
__________________
...Just Returned To The Scene... |
|
|
|
|
|
#9963 |
![]() QJ Gamer Green
|
aaaah you just discovered why you need to understand fps + timestepping..
Fix Your Timestep! Gaffer on Games
__________________
-- Code Monkey : Sarien, Fishguts, Cracks and Crevices -- "Did IQ's just drop sharply while I was away?" (Ripley) |
|
|
|
|
|
#9964 |
|
Join Date: Sep 2009
Real First Name: Mohammed
Location: Nowhere
Just Played: Resistance Retribution
Posts: 5
Trader Feedback: 0
|
Ok, here's the biggest newb question yet, probably.
I have Dev-c++ and just downloaded MinPSPSDK. Can someone tell me how to directly code and compile psp homebrew from the dev-c++ IDE please
|
|
|
|
|
|
#9965 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,650
Trader Feedback: 0
|
add the min psp sdk as an external compiler in the settings that is more of a dev c++ question than a psp programming one.
__________________
------ 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). |
|
|
|
|
|
#9968 | |
![]() QJ Gamer Silver
Join Date: Sep 2006
Real First Name: Davee
Location: Perth, Scotland
Posts: 1,063
Trader Feedback: 0
|
Quote:
It's not something usually given as a tutorial, it's way too straightforward to tutor. You can get mnemonic definitions from a reference set (easily googled). Basically, you need to know how a processor operates to understand assembler language.
__________________
VSH Scramble Patcher || VSH Module Descrambler || Unlimted Character Version Changer (5.00) |
|
|
|
|
|
|
#9969 |
![]() QJ Gamer Green
My Mood:
Join Date: Aug 2009
Real First Name: Edwin
Location: Moon
Just Played: Fifa 10,God of War
Posts: 144
Trader Feedback: 0
|
Why is it so damn difficult to set-up the psp programming environment.I downloaded mini blah blah blah, i have dev C++ and even tried to add SQL as an external compiler in dev c++ for other things and all i get are errors...its so frustrating. :ah)
|
|
|
|
|
|
#9971 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,650
Trader Feedback: 0
|
lol how many times :P mot devs only require MinPSPW and you would only need the toolchain if you needed to add a custom library for some reason XD.
|
|
|
|
|
|
#9972 | |
![]() Developer
My Mood:
Join Date: Jul 2008
Real First Name: Joe
Location: Grand Rapids! MI
Just Played: Halo 3: ODST!
Posts: 82
Trader Feedback: 0
|
Quote:
|
|
|
|
|
|
|
#9973 | |
![]() ![]() QJ Gamer Bronze
Join Date: Nov 2008
Real First Name: Mohamed
Location: CAD
Just Played: X-Men Origins: Wolverine
Posts: 418
Trader Feedback: 0
|
Quote:
new question, if I want to open a file and read it using the PSPSDK, should I do something like this: Code:
SceUID file = sceIoOpen("file.txt", PSP_O_RDONLY, 0777);
void *data;
sceIoRead(file, data, sizeof(data));
EDIT: nvm, I figured it out Last edited by mootjeuh; 11-03-2009 at 03:02 AM.. |
|
|
|
|
|
|
#9974 |
|
Join Date: Oct 2009
Real First Name: N. George
Location: Romania
Just Played: PSP-Fanatik
Posts: 20
Trader Feedback: 0
|
Some questions:
1. How do I get the FW version and motherboard version, and print them. I used sysparam sample and i want to print the FW and motherboard version. 2.I`ve tryed a psp buttons test: Code:
sceCtrlReadBufferPositive(&pad, 1);
printf("Analog X = %d ", pad.Lx);
printf("Analog Y = %d \n", pad.Ly);
if (pad.Buttons != 0){
if (pad.Buttons & PSP_CTRL_SQUARE){
printf("Square pressed \n");
}
if (pad.Buttons & PSP_CTRL_TRIANGLE){
printf("Triangle pressed \n");
}
if (pad.Buttons & PSP_CTRL_CIRCLE){
printf("Cicle pressed \n");
}
if (pad.Buttons & PSP_CTRL_CROSS){
printf("Cross pressed \n");
}
if (pad.Buttons & PSP_CTRL_UP){
printf("Up pressed \n");
}
if (pad.Buttons & PSP_CTRL_DOWN){
printf("Down pressed \n");
}
if (pad.Buttons & PSP_CTRL_LEFT){
printf("Left pressed \n");
}
if (pad.Buttons & PSP_CTRL_RIGHT){
printf("Right pressed \n");
}
if (pad.Buttons & PSP_CTRL_START){
printf("Start pressed \n");
}
if (pad.Buttons & PSP_CTRL_SELECT){
printf("Select pressed \n");
}
if (pad.Buttons & PSP_CTRL_LTRIGGER){
printf("L-trigger pressed \n");
}
if (pad.Buttons & PSP_CTRL_RTRIGGER){
printf("R-trigger pressed \n");
}
}
}
-> Code:
if (pad.Buttons & PSP_CTRL_HOME){
printf("Ati apasat butonul 'HOME' \n");
}
if (pad.Buttons & PSP_CTRL_HOLD){
printf("Ati activat butonul 'HOLD' \n");
}
if (pad.Buttons & PSP_CTRL_NOTE ){
printf("Ati apasat butonul 'NOTE ' \n");
}
if (pad.Buttons & PSP_CTRL_SCREEN ){
printf("Ati apasat butonul 'SCREEN ' \n");
}
if (pad.Buttons & PSP_CTRL_VOLUP ){
printf("Ati apasat butonul 'VOLUME UP' \n");
}
if (pad.Buttons & PSP_CTRL_VOLDOWN ){
printf("Ati apasat butonul 'VOLUME DOWN' \n");
}
if (pad.Buttons & PSP_CTRL_WLAN_UP ){
printf("Ati activat butonul de activare 'WLAN' \n");
}
if (pad.Buttons & PSP_CTRL_REMOTE ){
printf("Unitatea UMD functioneaza. Aveti un UMD inserat.\n");
}
if (pad.Buttons & PSP_CTRL_MS ){
printf("Aveti introdus un card in PSP-ul dvs.\n");
}
|
|
|
|
|
|
#9975 |
![]() ![]() QJ Gamer Bronze
Join Date: Nov 2008
Real First Name: Mohamed
Location: CAD
Just Played: X-Men Origins: Wolverine
Posts: 418
Trader Feedback: 0
|
does anyone know if there's a graphics.c version of Danzeff's OSK ? coz I really don't understand SDL...
help is greatly appreciated |
|
|
|
|
|
#9976 |
|
Join Date: Nov 2009
Real First Name: -
Location: Hamburg, Germany
Just Played: Socom
Posts: 5
Trader Feedback: 0
|
hello, how i can add more fields to an array at runtime
(for example, i've an array (char* Array[3]; Array[1] = "Bla", Array[2] = "Bla2" etc.)) and i want to add more fields (so that Array[3] gets for example 7 extra fields but that it does not overwrite Array[1] and Array[2]). Last edited by fasa123; 11-28-2009 at 03:56 PM.. |
|
|
|
|
|
#9977 | |
![]() ![]() QJ Gamer Gold
|
Quote:
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
|
#9978 |
|
Join Date: Nov 2009
Real First Name: -
Location: Hamburg, Germany
Just Played: Socom
Posts: 5
Trader Feedback: 0
|
i tried it with using new (Array = new int[10]) but when i compile the compiler says that the new statement is undefined oO
And how can i look if i'm using c or c++? |
|
|
|
|
|
#9979 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 38
Trader Feedback: 0
|
You're asking us how to know in what language(s) you are programming ( "How can I look if I'm using Lua or Python ?"... ).
Anyway in C++, you have std::string for this use. |
|
|
|
|
|
#9980 | |
|
Join Date: Nov 2009
Real First Name: -
Location: Hamburg, Germany
Just Played: Socom
Posts: 5
Trader Feedback: 0
|
Quote:
that was not my question.. i mean the new statement, for example a = new int[5] and i found that new & delete is only in c++ PS: How can i create a new thread, that delays itselfs for a certain time and then calls another viod. Last edited by fasa123; 11-29-2009 at 04:09 AM.. |
|
|
|
|
|
|
#9982 | ||
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 38
Trader Feedback: 0
|
Quote:
( and programming in C++ is really not like programming in C ) Quote:
![]() The thread's function should just... call sceKernelDelayThread, and then run another function (or thread) ? |
||
|
|
|
|
|
#9985 |
![]() ![]() QJ Gamer Gold
|
i think, if i understand from what i read is that he wants the core of the game to continue running, than spawn a thread at a certain time, but not interrupt the game, if so he needs to look into creating timers
|
|
|
|
|
|
#9986 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 38
Trader Feedback: 0
|
Oh, that's not that hard
![]() A simple idea (it works, but it's perhaps not the best) is to use the timestamp (time or sceKernelLibcTime, it doesn't matter) and your ellapsed_time = new_time - old_time. Implementing pause is not hard either. |
|
|
|
|
|
#9988 |
![]() ![]() Bush Programmer
|
I'm sure this could be simplified:
Code:
lonwork = limit_left;
latwork = limit_top;
while (lonwork < displon) {lonwork = lonwork + zoom; xxx++;}
while (latwork > displat) {latwork = latwork - zoom; yyy++;}
It's all about incrementing xxx and yyy the correct number of times. Any ideas? |
|
|
|
|
|
#9989 |
![]() ![]() Bush Programmer
|
Got his sorted NVM.
Art 1 QJ 0
__________________
http://www.freewebs.com/defxev/ |
|
|
|
|
|
#9990 |
![]() ![]() Bush Programmer
|
Hi Guys,
Actually, I'm stuck on the second line... The first while loop can be replaced with this: Code:
float temp; temp = displon - limit_left; xxx = temp / zoom; Any help appreciated. Cheers, Art. |
|
|
|
![]() |
| Tags |
| c or c , c++ , c/c++ , code , coding , c_language , programming , psp , psp programming , thread |
| Thread Tools | |
|
|