Re: [stella] Calculating values for the T1024T timer

Subject: Re: [stella] Calculating values for the T1024T timer
From: "Eckhard Stolberg" <Eckhard_Stolberg@xxxxxx>
Date: Tue, 1 Oct 2002 14:37:08 +0200
> I have been experimenting with this and it seems like I'm getting
> strange results. For instance, I'm timing my kernel using the timer.
> When I use TIM64T I set the timer to 228 (192 scan lines * 76 cycles /
> 64 ~ 228). This works out fine. When I use T1024T I set the timer to 14
> (192 scan lines * 76 cycles / 1024 ~ 14). When I look at my scan line
> count in Z26 I get 262 when I use TIM64T and 246 when I use T1024T.
> 
> Am I using the timer wrong? The Stella Programming Guide mentions that
> the timers basically reduce by machine cycles, right?

I suppose you are checking if INTIM has reached zero, when you want to
know if the timer has expired, right? The T1024T timer will be in this
state for 1024 cycles, so your "waiting to expire" loop might catch it
way too early. This would explain the 16 lines difference. You just need
to increase your timer value by one, and the timer loop should work as
you expected.


Ciao, Eckhard Stolberg


----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread