Re: [stella] Newbie: Efficiency in Code, Joystick Routine as Example

Subject: Re: [stella] Newbie: Efficiency in Code, Joystick Routine as Example
From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx>
Date: Tue, 23 Jul 2002 06:19:03 -0700
At 11:56 AM 7/14/2002 -0700, you wrote:
This looks bizarre, don't it?
Here's how it works:
First we need to know how the values returned by SWCHA look in binary.
    $EF = 1110 1111    ;up
    $DF = 1101 1111    ;down
    $BF = 1011 1111    ;left
    $7F = 0111 1111    ;right


This would only work for 4-direction type games (ala Pac Man, Frogger, etc..)
Remember that the joystick supports 8 positions so for the diagonals two of the bits flip to zero, not just one.


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


Current Thread