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; hello, i am having problems getting the cygwin thing set up. i type in "make" in the shell and it ...
-
06-30-2008, 07:13 AM #8731
nothing to be done for all means that you have already compiled on eboot.pbp,in the current folder, or you've forgotten to add a makefile.hello, i am having problems getting the cygwin thing set up. i type in "make" in the shell and it says "nothing can be done for all."
-
06-30-2008, 02:31 PM #8732
well the makefile is definitely there, so I have to delete the eboot every time I have a new build?
-
06-30-2008, 03:32 PM #8733
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Uh... I can make when there's an EBOOT present.
Anyway, I noticed that time(NULL) is returning seconds since midnight GMT. Shouldn't it be returning seconds since epoch? Is there another func I can call or should I write one?
-
06-30-2008, 04:19 PM #8734It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
06-30-2008, 04:20 PM #8735
yeah i figured out the problem. It was in the target of the makefile. I was pointing it to the wrong file i guess.
-
06-30-2008, 04:29 PM #8736
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Am I looking at 'sceRtcGetCurrentTick'? It doesn't say what the tick is in reference to.
Thanks for the link, btw. That documentation kicks a** and will likely help me figure some things out more easily. Up till now I've been using the comments in the lib itself.
-
06-30-2008, 04:55 PM #8737It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Ticks are the fundamental unit of time on most system. They have a different resolution per system, but can usually be converted easily.
http://psp.jim.sh/pspsdk-doc/psprtc_...f205e1b78cf221
http://psp.jim.sh/pspsdk-doc/psprtc_...948f13da395e13
One of these functions should should be what you're looking for.pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-01-2008, 12:52 AM #8738
i want to use oslib mod but have no clue where to put the files. it comes with the include and header files. i have cygwin set up and have compiled several eboots using oslib already.
-
07-01-2008, 03:09 AM #8739QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
navigate to:
cygwin/usr/local/pspdev/psp/sdk/include/oslib/files go here
if you don't have the oslib folder in their...than make it the files you have all go their except the file with .a as an extension that one goes here:
cygwin/usr/local/pspdev/psp/sdk/libs/.a file goes here
after that it's set up ro0kie42=-)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-01-2008, 04:21 PM #8740
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Thanks again, Archaemic. Unfortunately sceRtcGetCurrentClockLoca lTime provides a struct pointer (I'm already using that function for my displayed clock). The tick resolution one ought to be a constant if the resolution can't be changed, shouldn't it? At any rate, what I was looking for was something to use for a sort of complex time-out mechanism. I have a function "np_freeTimedOutNetPlayer s(int oldest_allowed)" that checks the last_update property of all existing netplayer structs and if their last_update is less than oldest_allowed then it calls another function that removes them from the struct and frees their malloc'd memory. Currently I'm using the Vcount as a timing mechanism, but since it starts at 0... Wait... There's no reason oldest_allowed couldn't be negative, is there....
Never mind. I got it covered. Thanks again. XD
By the way, sceRtcGetCurrentTick points to a definite date of origin, but it sure as hell ain't epoch. It's some random date in 1906! What's that all about? (Right now my test app is telling me "102 years, 50 days, 6 hours, 50 minutes and 5 seconds ago...")
-
07-05-2008, 05:03 PM #8741
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Is the socket stream buffer really only 1024 bytes? I get read errors if I try to go any larger.
Secondly, (sorry) I'm using the return from sceNetApctlGetInfo(8, NULL) to determine whether or not the wifi is connected. Is there a better way to detect AP connection loss?Geändert von Khatharr (07-05-2008 um 08:26 PM Uhr)
-
07-09-2008, 09:11 AM #8742
how to post online higscores?
hi there i have been searching for a while how to post online hiscores but i have no luck, so i deside to ask..
can some body help me or give hints on how to manage this i need to have online higscores for my hombrew POLYGUNWARS.
thanks..
-
07-09-2008, 05:26 PM #8743
hey can anyone help me on this thread?
import fixup problemsCurrent releases:
Icon Action Replacer v1.5- latest release
Current projects:
PSP C++ IDE - Currently v1.6
RPG Paradise - Latest version at my website
-
07-09-2008, 06:58 PM #8744
I need help with the Virtual File system of OSlib. I have
But I get an error:Code:VIRTUAL_FILE *test; test = VirtualFileOpen("test.txt", 0, VF_MEMORY, VF_O_READWRITE);
[QUOTE]
main.cpp:38 error: expected constructor, destructor, or type conversion before '=' token.
[QUOTE]
Line 38 is the second line you see there. If I just have the first line, it compiles fine.
-
07-10-2008, 02:13 AM #8745QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Sometimes that error happens if it find the definitions of the datatype, function name or variable name. Have you got the right headers included?
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
07-10-2008, 12:35 PM #8746
All I need is OSlib right? I'm not sure what else I'd need.
-
07-16-2008, 07:20 PM #8747
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Ahrimanes - You'll need to be a little more specific about what you're stuck on. Know in advance that you'll need some sort of online service to store the information. Are you wanting to make a web page that will show high scores or just have something that will store the information for use by the game itself? It's not too complicated to do either. I can walk you through it.
-
07-21-2008, 02:42 AM #8748
is there any way to bring up the psp password dialogue. the one that comes up if the parental settings are enabled
-
07-21-2008, 04:00 AM #8749Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
It's a custom dialog with no interface to it, so basically, no.

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
-
07-22-2008, 05:47 PM #8750QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
@ahrimanes:
u may want to check this out:
http://juliusparishy.com/jpblog/?p=11
hopefully your still looking for the info1. 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-22-2008, 10:54 PM #8751OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Why is it that when I declare three floats (I've even tried with just one. I've also tried ints as well) in a class, my program ends up freezing? I'm modifying the Jello Physics library to add a few more things as well as to be more compatable with the psp's GU.
Is it a memory overflow? I have no idea why my program would freeze once declaring something, even if I choose to do nothing with the variables.
Here's the class. You should see the commented out line where I put "// Crash?"
Any suggestions or reasons as to why this is happening would be appreciated, thanks!Code:class SpringBody : public Body { public: std::vector<InternalSpring*> mSprings; // shape-matching spring constants. bool mShapeMatchingOn; float mEdgeSpringK; float mEdgeSpringDamp; float mShapeSpringK; float mShapeSpringDamp; int dragPoint; //some addon std::vector<int> mIndexList; int *mIndices; int mIndicesCount; //float rC, gC, bC; // Crash? Vector2 dragForce; /** * Create a Springbody with shape matching set to OFF. *\param shape ClosedShape shape for this body *\param massPerPoint mass per PointMass. *\param edgeSpringK spring constant for edges. *\param edgeSpringDamp spring damping for edges *\param pos global position of the body *\param angleinRadians global angle of the body *\param scale scale *\param kinematic kinematic control boolean */ SpringBody(ClosedShape *shape, float massPerPoint, float edgeSpringK, float edgeSpringDamp, Vector2 pos, float angleinRadians, Vector2 scale, bool kinematic); /** * Create a SpringBody with shape matching turned ON. *\param shape ClosedShape shape for this body *\param massPerPoint mass per PointMass. *\param shapeSpringK shape-matching spring constant *\param shapeSpringDamp shape-matching spring damping *\param edgeSpringK spring constant for edges. *\param edgeSpringDamp spring damping for edges *\param pos global position of the body *\param angleinRadians global angle of the body *\param scale scale *\param kinematic kinematic control boolean */ SpringBody(ClosedShape *shape, float massPerPoint, float shapeSpringK, float shapeSpringDamp, float edgeSpringK, float edgeSpringDamp, Vector2 pos, float angleinRadians, Vector2 scale, bool kinematic); /** * Default deconstructor */ virtual ~SpringBody(); /** * Add an internal spring to this body. *\param pointA point mass on 1st end of the spring *\param pointB point mass on 2nd end of the spring *\param springK spring constant *\param damping spring damping */ void addInternalSpring(int pointA, int pointB, float springK, float damping); /** * build default springs */ void _buildDefaultSprings(); /** * Clear all springs from the body. */ void clearAllSprings(); /** * Set shape-matching on/off. *\param onoff on/off */ void setShapeMatching(bool onoff); /** * Set shape-matching spring constants. *\param springK spring constant *\param damping spring damping */ void setShapeMatchingConstants(float springK, float damping); /** * Change the spring constants for the springs around the shape itself (edge springs) *\param edgeSpringK spring constant *\param edgeSpringDamp spring damping */ void setEdgeSpringConstants(float edgeSpringK, float edgeSpringDamp); /** * Adjusting spring values *\param springID spring index *\param springK spring constant *\param springDamp spring damping */ void setSpringConstants(int springID, float springK, float springDamp); /** * Get spring constant *\param springID spring index *\return spring constant */ float getSpringK(int springID); /** * Get spring damping *\param springID spring index *\return spring damping */ float getSpringDamping(int springID); /** * Acumulating internal spring forces */ virtual void accumulateInternalForces(); /** * Acumulating external forces */ virtual void accumulateExternalForces(); /** * helper function for visualization - add an indexed triangle to this primitive. *\param A *\param B *\param C */ void addTriangle(int A, int B, int C); /** * finalize triangles */ void finalizeTriangles(); /** * set colour of triangles within a body */ void setColour(float R, float G, float B); /** * helper function for dragging body *\param force force for drag *\param pm index of PointMass that you want to drag */ void setDragForce(Vector2 force, int pm); /** * Debug render */ virtual void DrawMe(); };
-
07-23-2008, 01:27 AM #8752QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
All I can think is that another part of the library or code is expecting the class size to a be a certain size. Adding any variables will increase the class size and possible cause a memory overflow.
You might get lucky and rearranging the variables might help so that they match the memory alignment better:
(The PSP is 16 byte aligned isn't it?)Code:float rC, gC, bC; // Crash? float mEdgeSpringK; // 16 bytes float mEdgeSpringDamp; float mShapeSpringK; float mShapeSpringDamp; int dragPoint; // 16 bytes //some addon int *mIndices; // This is a really bad hack, I don't really recommend doing this int mIndicesCount : 31; bool mShapeMatchingOn : 1; Vector2 dragForce; // Assuming Vector 2 is 2 floats, 16 bytes std::vector<int> mIndexList; std::vector<InternalSpring*> mSprings; // Not sure how big vector information is, I assume they are general aligned regardless.[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
07-25-2008, 08:36 AM #8753
Hey, how do I debug with psplink (is there a tutorial or guide somewhere?)? Everytime there is a problem all I see is hex (with some text).
-
07-26-2008, 05:57 PM #8754
IN Makefile:
Under cflags add: -g
Then when ever your app crashes, in cygwin or commandline:
-f gives you the functionCode:psp-addr2line -f -e appname.elf 0x(the address given for EPC)
If that doesn't work: it says: "??"
In PSPLINK try: calc $epc-$mod
and
Code:psp-addr2line -f -e appname.elf 0x(the address calculated by psplink)
-
07-26-2008, 07:13 PM #8755
How can I Rotate image at a fixed point? Rotating makes the object move out of the point. This might have something to do with sin, cos stuff but I have no idea.
Any one got me?
-
07-26-2008, 07:46 PM #8756NetGameOrb Maker

- Registriert seit
- Jan 2008
- Ort
- New York
- Beiträge
- 683
- Points
- 6.138
- Level
- 50
- My Mood
-
- Downloads
- 2
- Uploads
- 0
GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.
Stats Blog:http://netgameorb.blogspot.com/
Website:http://www.netgameorb.com/
-
07-27-2008, 06:06 AM #8757
-
07-27-2008, 07:22 PM #8758NetGameOrb Maker

- Registriert seit
- Jan 2008
- Ort
- New York
- Beiträge
- 683
- Points
- 6.138
- Level
- 50
- My Mood
-
- Downloads
- 2
- Uploads
- 0
GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.
Stats Blog:http://netgameorb.blogspot.com/
Website:http://www.netgameorb.com/
-
07-29-2008, 07:45 AM #8759QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Ok guys so im working on a project for the qj homebrew contest.
The game is a penalty shoot-out game.
The main points im looking for the game is:
Analog Support
2 player mode
menu
gfx of course
Problem:
How would i make the goal keeper go after the ball and not make him save all of the shoots.
The Other problems have been resolved!Geändert von MiKeY188 (07-30-2008 um 06:57 AM Uhr)
-
07-29-2008, 05:07 PM #8760QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Ive been trying all day and ain't gotten anywhere please if someone can help in anyway!


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