[Coco] Coco GIME Timer interrupt

Roger Taylor operator at coco3.com
Wed Jan 30 21:42:20 EST 2008


At 07:45 PM 1/30/2008, you wrote:
>Fellow Coconuts,
>
>Is there anywhere a document about the use of the timer interrupt in 
>the GIME of the coco3?



It's in my CoCo 3 service manual, but I figured it all out by 
trial-and-error a long time ago.  Basically, you have two base timer 
rates to choose from, selected by a single bit in one of the GIME 
registers, then a 16-bit timer value in two other registers that runs 
at the base rate.  You can generate an IRQ or a FIRQ (your choice, 
and I've never tried both at the same time), and at the interrupt 
service code you just read the IRQ or FIRQ status register of the 
GIME to reset the pending interrupt flag and in this case I think it 
restarts the timer as well.

It would be pretty easy if you're good with math to simulate a 
vertical blank at 60hz, 120hz, 30hz, etc.  It wouldn't be the same as 
a vertical sync but at the interrupt service routine you could wait 
on the real 60hz sync if you're simulating 60hz, 30hz, or 15hz, etc.





More information about the Coco mailing list