Re: [stella] RIOT Timer questions

Subject: Re: [stella] RIOT Timer questions
From: "Eric Ball" <ericball@xxxxxxxxxxxx>
Date: Mon, 8 Sep 2003 21:57:13 -0400
You can get scans of the 6532 datasheets from
http://www.6502.org/datasheets/6532.zip

> 1) It appears that when the count expires (hits zero) its next value is
> $FF and it switches to single-count-per-cycle mode (if it wasn't already
> there). Apparently at that time an interrupt flag is set in a register
> that appears to be addressable. Question: can this flag be polled to
> determine count completion on the 2600? What memory address?

yes: $285, note you may need to write to TIMxT+$20 to enable the IRQ

> 2) When the timer switches to single-count-per-cycle mode after count
> completion, it begins decrementing, according to the data sheet, down
> to -255. Question: Is -255 the same as 0? Question: does the counter
> then stop at 0, or does it rollover and continue counting?

looking at the data sheet, it appears the timer output contains the ones
complement (eor #$FF) of the number of cycles since the interrupt / rollover
occurred.  The data sheet doesn't specify if a second rollover occurs.  If I
were designing the part, I would have it stop at 00 to indicate at least 255
cycles have elapsed since the transition to single cycle operation.

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


Current Thread