forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Win32 PS2SDK problems?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
cnlohr3



Joined: 05 Feb 2006
Posts: 4

PostPosted: Sun Feb 05, 2006 2:12 pm    Post subject: Win32 PS2SDK problems? Reply with quote

I'm a bit of a noob here, but I seem to have gotten a lot of what I wanted to work, compile and everything but a little bit to link.

I am currently using the win32 version of the PS2SDK found on the main PS2DEV.org homepage under "tools."

I cannot seem to fix the following two problems I keep running into.

1: I can't seem to find any way of linking in gettimeofday. Is it in the SDK? Or just in the .h's and not in the libaries?

I even tried manually externing' a definition to "C" and it still couldn't link it.

2: I cannot seem to get strings to work ... at all. Any time I use them I keep getting the following bunch of errors:

In file included from /cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/cwchar:51,
from /cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/bits/fpos.h:45
,
from /cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/bits/char_trai
ts.h:46,
from /cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/string:47,
from src/StdString.h:95,
from src/global.h:9,
from src/MercuryINI.h:4,
from src/MercuryINI.cpp:1:
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(71) : `difftime' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(72) : `mktime' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(73) : `time' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(74) : `asctime' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(75) : `ctime' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(76) : `gmtime' not declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(77) : `localtime' not
declared
/cygdrive/c/ps2dev/IDE/ee/include/c++/3.2.2/ctime(78) : `strftime' not declared

Any ideas what I could be doing wrong?
Back to top
View user's profile Send private message AIM Address
cnlohr3



Joined: 05 Feb 2006
Posts: 4

PostPosted: Mon Feb 06, 2006 10:33 am    Post subject: Reply with quote

(double post)

I am still curious about the windows problem... But I have since switched to the linux PS2 toolchain.

I am curious still as to how to get gettimeofday() to work. It doesn't seem to be in the normal <sys/time.h> file, and when I forcefully give it the definition, I cannot get it to find gettimeofday in any of the libaries provided. Is it necessiary to set a flag, or is there another way of getting detailed time on the PS2?
Back to top
View user's profile Send private message AIM Address
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Feb 06, 2006 8:55 pm    Post subject: Reply with quote

gettimeofday doesn't work on PS2

You can use cdReadClock, however keep in mind it's a very expensive call.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
cnlohr3



Joined: 05 Feb 2006
Posts: 4

PostPosted: Tue Feb 07, 2006 3:53 am    Post subject: Reply with quote

Thank you very much! That is very helpful.

Actually, with the way the engine works, we only have to do one time call every game cycle, with VSync on, I can't imagine it taking that much of a toll.

Or do you mean very expensive on very large scale? >0.01s?
Back to top
View user's profile Send private message AIM Address
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Tue Feb 07, 2006 7:25 am    Post subject: Reply with quote

Its definately not worth doing every frame. You are MUCH better off doing only once during init and from then on in incrementing by 1/60* sec every frame, or maybe even using the performance timers to interrupt every so often so you can update the time.
Keep in mind that interrupts can suck on performance on PS2 (cache, etc) so if 1/60 sec is good enough, your best bet is to keep time on the vsync.

*or 1/50 depending on NTSC/PAL of course :)
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group