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 obvious I thought of straight away, cause I have noticed a
gba.h floating around that didn't declare any registers to be volatile.
Greg
At 10:19 PM 5/09/2002, you wrote:
>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 encountered was:
>
>if i create a while-loop and check the value of the counter, it never
>stops! (means: the cpu doesn't check the value of the counter, but if i
>insert something like
>"WaitforVBlank()" into the while-loop, the counter works correctly (but
>significantly slower...).
>
>while(REG_TM3D < 263){} //doesn't work
>
>while(REG_TM3D < 263){WaitVblank();} //works....
>
>i also tried to enable the interrupt-on-overflow...didn't work either...
>
>it just seems that counting occupies the cpu to 100% so he doesn't have
>the time anymore to check if the abort-conditions have already reached...
>i really don't have a clue how to fix that.
>
>cheers
>
>roman
>
>
>[Non-text portions of this message have been removed]
>
>
>
>
>
>
>Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
----
Wogan (
wogan@...)