[Coco] Video sync issue... (crosspost)

Robert Gault robert.gault at worldnet.att.net
Wed Nov 10 19:42:16 EST 2004


Rogelio Perea wrote:

> Crossposting from comp.sys.m6809 and comp.sys.tandy:
> 
> - - - - - - - - - - - - -
> 
> Hi,
> 
> Does anyone know how to perform a vsync in 6809 assembly language when
> programming animation on the Dragon/Tandy to prevent flickering graphics?
> I'm sure it's something to do with checking an interrupt, but I don't know
> how.
> 
> Thanks,
> Collywobbles
> 
> - - - - - - - - - - - - - - -
> 

I'm going to assume that you can write a program but just don't know 
what data to look for.

There is a flag in bit7 of $FF03 which is the field sync interrupt flag. 
It is set when a Vsync occurs. The flag is cleared by reading $FF02. 
This can be used on any model Coco.

There is also at bit3 in $FF92 (IRQ) and $FF93 (FIRQ) which will enable 
interrupts via the GIME on a Coco3. You would need to enable the Coco3 
interrupts at bit5 (IRQ) or bit4 (FIRQ) in %FF90 for the Coco3 
interrupts to be active. Now you read either $FF92 or $FF93 to clear the 
interrupt and check the bits read to see from where the interrupt came.

Depending on the use of the program you intend writing, you will either 
monitor these flags in a tight loop until a flag sets with orcc #$50 
(interrupts off to the cpu) or create an interrupt routine which will 
check on which flags were set as the interrupts occur and the cpu 
vectors to the interrupt routine.




More information about the Coco mailing list