Re: [cc65] tgi interrupts?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-09-09 16:50:45
Karri Kaksonen wrote:
> In all my programs I have a VBL interrupt handler in order to swap
> tgi_drawpage and tgi_showpage at a time when the user won't notice the
> change.
>
> Somehow it would be nice to include this service to the cc65 libraries.
>
> Perhaps a separate tgi_utils.s ?

I don't like the idea of having separate platform dependent code outside the
driver.

Did you know that the driver can receive interrupts? There's an IRQ vector in
the driver that - when it is not zero - is called on each interrupt.
Prerequisite is that the startup code sets up an IRQ handler that calls
callirq. So you could move tgi_swap into the driver. 

The frame counter should probably get replaced by a separate function called
in the IRQ. It is then also possible to implement a clock() function. Maybe
the two can go into one module?

Once the IRQ handler calls callirq, new IRQ functions can be simply declared
with .interruptor.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Sep 9 16:52:44 2009

This archive was generated by hypermail 2.1.8 : 2009-09-09 16:52:47 CEST