| View previous topic :: View next topic |
| Author |
Message |
cnlohr3
Joined: 05 Feb 2006 Posts: 4
|
Posted: Sun Feb 05, 2006 2:12 pm Post subject: Win32 PS2SDK problems? |
|
|
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 |
|
 |
cnlohr3
Joined: 05 Feb 2006 Posts: 4
|
Posted: Mon Feb 06, 2006 10:33 am Post subject: |
|
|
(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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Mon Feb 06, 2006 8:55 pm Post subject: |
|
|
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 |
|
 |
cnlohr3
Joined: 05 Feb 2006 Posts: 4
|
Posted: Tue Feb 07, 2006 3:53 am Post subject: |
|
|
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 |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Tue Feb 07, 2006 7:25 am Post subject: |
|
|
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 |
|
 |
|