QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

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; @yaustar I used the code that you posed and it worked. I have got a second counter based on the ...

Reply
 
LinkBack Thread Tools
Old 10-18-2009, 12:31 PM   #9961
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

@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...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-18-2009, 01:01 PM   #9962
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

ah CRAP! i JUST realised WHY!

It takes longer to loop thru the program than it does to pass one millisecond! And MS can only ever increase by one!

I think i can figure this out...
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-19-2009, 11:12 AM   #9963
 
_df_'s Avatar
 
Join Date: May 2007
Posts: 121
Trader Feedback: 0
Default

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)
_df_ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-24-2009, 07:55 AM   #9964
 
Join Date: Sep 2009
Real First Name: Mohammed
Location: Nowhere
Just Played: Resistance Retribution
Posts: 5
Trader Feedback: 0
Default

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
pspwxp_fan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-24-2009, 08:10 AM   #9965
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

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: is down for a while ... I'll bring a new one back soon.

Currently working on:
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-24-2009, 09:43 AM   #9966
 
Join Date: Sep 2009
Real First Name: Mohammed
Location: Nowhere
Just Played: Resistance Retribution
Posts: 5
Trader Feedback: 0
Default

Can't find any way to do that .
Added directories in Compiler options but it (obviously) didn't work.
pspwxp_fan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 03:01 AM   #9967

 
mootjeuh's Avatar
 
Join Date: Nov 2008
Posts: 322
Trader Feedback: 0
Default

okay, I know this isn't much of a C/C++ question, but can someone point me to some MIPS Assembly tutorials?
mootjeuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 08:58 AM   #9968
Enter Custom Title
 
Davee's Avatar
 
Join Date: Sep 2006
Real First Name: Davee
Location: Perth, Scotland
Posts: 1,041
Trader Feedback: 0
Default

Quote:
Originally Posted by mootjeuh View Post
okay, I know this isn't much of a C/C++ question, but can someone point me to some MIPS Assembly tutorials?
Tutorial? doubts.
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.
Davee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 08:58 AM   #9969
 
atomic_boneman's Avatar
 
My Mood: Cool
Join Date: Aug 2009
Real First Name: Edwin
Location: Moon
Just Played: Battletank 3D
Posts: 139
Trader Feedback: 0
Default

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)
atomic_boneman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 09:12 AM   #9970

 
mootjeuh's Avatar
 
Join Date: Nov 2008
Posts: 322
Trader Feedback: 0
Default

Quote:
Originally Posted by atomic_boneman View Post
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)
dude just use minPSPw
mootjeuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 10:49 AM   #9971
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

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.
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: is down for a while ... I'll bring a new one back soon.

Currently working on:
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 02:23 PM   #9972
Developer
 
My Mood: Sneaky
Join Date: Jul 2008
Real First Name: Joe
Location: Grand Rapids! MI
Just Played: Halo 3
Posts: 51
Trader Feedback: 0
Default

Quote:
Originally Posted by mootjeuh View Post
okay, I know this isn't much of a C/C++ question, but can someone point me to some MIPS Assembly tutorials?
here is a intro from Central Connecticut State University it had a few tuts in it when i was skkimming through it
lilmnm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2009, 02:20 AM   #9973

 
mootjeuh's Avatar
 
Join Date: Nov 2008
Posts: 322
Trader Feedback: 0
Default

Quote:
Originally Posted by lilmnm View Post
here is a intro from Central Connecticut State University it had a few tuts in it when i was skkimming through it
okay thanks
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 04:02 AM..
mootjeuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2009, 09:38 AM   #9974
 
Join Date: Oct 2009
Real First Name: V. Bogdan
Location: Romania
Just Played: PSP-Fanatik
Posts: 4
Trader Feedback: 0
Default

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");
			}      
		}
	}
But i`ve added more from pspctrl.h
->
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");
			}
I`ve know that WLAN_UP, MS and REMOTE don`t work, BUT, how do i make HOME BUTTON,SCREEN and other added work? Becouse they do they standard function (Home->Exit homebrew).
pentagram is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-21-2009, 02:37 PM   #9975

 
mootjeuh's Avatar
 
Join Date: Nov 2008
Posts: 322
Trader Feedback: 0
Default

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
mootjeuh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
c or c , c++ , c/c++ , code , coding , c_language , programming , psp , psp programming , thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 11:53 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us