Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
timer-problems   Message List  
Reply | Forward Message #12617 of 15019 |
Re: timer-problems

--- In gbadev@y..., "Willem Kokke" <wkokke@g...> wrote:
> With a period of 64 it takes 0.001003265380859375 seconds to make
the
> timer reach 263

well, that is exactly the plan. i wanted to implement a timer that is
accurate to 1/1000 s...

> One other point you should check, is wheter that define use a
volatile
> pointer, else the compiler will optimise it away
> But I think that's not the problem
>

it was indeed the problem that the pointer was not defined as
volatile...
actually, i recently changed from basic to c++ and there are many
things about c i don't know yet (for example that pointers which are
not volatile will be "rationalized" away...)
thank you guys...

roman





Thu Sep 5, 2002 8:47 pm

schoebey
Offline Offline
Send Email Send Email

Forward
Message #12617 of 15019 |
Expand Messages Author Sort by Date

hello there.. since i need a timer in my game, i tried to create a function which uses one of the internal timer registers (obviously). the problem i...
Roman Schaub
schoebey
Offline Send Email
Sep 5, 2002
4:20 pm

You're sure you have declared REG_TM3D to be volatile right? Otherwise the value will likely be cached, thus changes in it will be unnoticed? Just something...
Wogan
wogan_gwb
Offline Send Email
Sep 5, 2002
4:59 pm

... How is 'REG_TMD3D' defined? Is it volatile? Waiting for Vblank within the while loop puts the CPU on halt until a Vblank interrupt fires, so that happens...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
Sep 5, 2002
5:02 pm

Normally there is no need to check the timer yourself.. The normal timer usage is this: Set the correct period to use.. (every 1, 64, 256 or 1024 clocks) Set...
Willem Kokke
thezensunni
Offline Send Email
Sep 5, 2002
5:03 pm

... the ... well, that is exactly the plan. i wanted to implement a timer that is accurate to 1/1000 s... ... volatile ... it was indeed the problem that the...
schoebey
Offline Send Email
Sep 5, 2002
9:05 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help