[stella] Fire button routines

Subject: [stella] Fire button routines
From: Glenn Saunders <cybpunks@xxxxxxxxxxxxx>
Date: Wed, 21 Jun 2000 16:23:42 -0700
At 05:55 PM 6/21/2000 -0500, you wrote:
Assuming that you are reading the register in vertical blank/overscan etc,
then you won't be able to tell the difference between that scenario and
holding the button.  This is effect the interferance case can cause.  If
you want to do edge detection, you can use the interrupt logic in the
PIA(only for the joystick or paddle buttons).

But aren't there two ways to read the joystick buttons, one latched and one not latched? By not latched meaning the current state, not the latched (locked on) state?

In games where you can hold down the fire button for a while (like Enduro) you wouldn't want to clear the latch every single frame. You'd read the INTP4/5 while in latched mode, set to dumped mode by setting D6 of VBLANK and read the direct value, and only clear the value if the button is currently not on, right? Then set back to latched mode.

That way the latch allows you to test for sub-frame-duration presses later within VBlank, but once in Vblank you can decide whether to clear the latch based on the current direct value?

For games that enforce delays between missiles (like only one missile in play at once like Combat) then the latch can be left alone and the button ignored until the missile is expended, right?

It's just that if the latch locks on when the button is pressed and is not cleared when the button is released, then the program needs to manually clear the latch by testing the current state, right?

Glenn Saunders - Producer - Cyberpunks Entertainment Personal homepage: http://www.geocities.com/Hollywood/1698 Cyberpunks Entertainment: http://cyberpunks.uni.cc

-- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread