Re: [stella] Fire button routines

Subject: Re: [stella] Fire button routines
From: Mark De Smet <de-smet@xxxxxxxxxxxxxxx>
Date: Thu, 22 Jun 2000 18:15:51 -0500 (CDT)
> A game like Enduro needs to know when the fire button has been released 
> after it's been held for a while.  The latched mode will be stuck until you 
> clear it.  If you just clear it when it's set every frame, and you still 
> have your thumb on the button, then the latch won't be set again, will 
> it?  So it "forgets" that you are still holding the button down.  Hence the 

Yes it will.  It is level sensitive(hence latch verses flipflop which is
edge senstive).

> need to manually poll the current state.  The latch is only set when the 
> button goes from an unpressed to a pressed state, right?

No, to continue, it sets whenever the button is pressed, and will
immediately set itself again if you try to clear it while pressed.

> If you simply poll the actual current state once a frame I guess that would 
> be accurate enough for most games.  Odds are you won't be able to hold the 
> fire button down (or momentarily release it) so briefly that it doesn't 
> cross at least one read in time to register it.

Ya, I think the real purpose is for when you want to avoid polling for a
while to do something else.


Archives (includes files) at
Unsub & more at

Current Thread