Re: [cc65] mouse irq callback

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-10-04 21:41:03


On Saturday 04 October 2003 21:31, MagerValp wrote:
> >>>>> "PF" == Piotr Fusik <P.Fusik_at_elka.pw.edu.pl> writes:
>
> PF> Calling any user code on a 3-5 kHz IRQ doesn't make much sense, at
> PF> least for Atari. You'd better use VBL interrupt for drawing the
> PF> mouse pointer.
>
> Ah, on the C64 the mouse irq is hooked into the VBL, but of course
> that's not the case on other platforms, or even if you use an Amiga
> mouse on the C64. And yes, what I did was write a custom VBL handler
> that called the drivers (mouse, joystick, keyboard), and updated the
> sprites.
>
> Maybe what we need is some kind of irq handling API?

i'd say yes for a first glance - then again it doesnt really make sence if its 
not generic enough to handle any given code as irq handler (and not only code 
written in plain asm)

however, (in theory) there _is_ a irq handling api - see signal.h :=) all it 
takes is implementing "alarm" for example, and then you can have timer 
interupts (if the signal api works with c-code as signal handler that is, 
didnt check that :=))

its probably somewhat harder to come up with something that a) works across 
the supported targets and b) offers some commonly used types of interupts 
(timer/vbl/break) and c) still is generic enough to be useful at all :)

gpz

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-10-04 21:46:12 CEST