Monday, September 11, 2006

Gamers Paradise

How long does your kid hold the buttons on his game station down?

What I see now when I run the code is that a whole lot of interrupts happen after I "Push my button" and then they stop. The main program continues to waggle the pin.

So while the button is pressed, interrupts happen. When the button is not pressed interrupts don't happen -- "Logical Captain".

This is Grrrreat! But I want to press the button once, take my finger off the button and something should happen. Not multiple somethings!

Also, if I double press the button something different should happen. But what is a double press?

This is not good, because in my time I've met CTOs, COOs and entrepreneurs who, when I say "Keyboard Driver for [insert British Z80/6502 based computer of your choice]" shrink at the memory.
I too went through the mill in the 80s doing games-related stuff and it isn't pretty.

I think when I trigger the first interrupt, I will initiate a timer routine that ,when counted down, re-enables the EXTINT with the magic rune:

EXTINT = EXTINT | 1; // Clear EINT0 to accept interrupts

0 Comments:

Post a Comment

<< Home