Re: [stella] reading the driving controllers, generic thoughts

Subject: Re: [stella] reading the driving controllers, generic thoughts
From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx>
Date: Wed, 07 Nov 2001 01:07:54 -0800
I tried pretty hard to adapt this to my code but I couldn't do it.

I wound up having to follow my original idea which was to take the previous controller state and bit merge it with the current controller state side by side, and scan through a table of pre-merged data and X > 3 then it's turning right, else left. So I've still got a table plus some overhead shifting and merging bits and juggling registers in the process.

So while my current code is definitely an improvement over the previous one, but I'd obviously like to try to use the stuff below but I just can't wrap my brain around the bitwise logic.

At 11:45 AM 10/30/2001 +0100, Thomas wrote:
        lda SWCHA
        tay
        eor last        ; 01 or 10 (else: abrupt twist)
        sty last
        dey             ; -> y = -1..2
        cpy  #2
        sbc  #1 ; -> a = -1, 0, 1
        beq .right
.left:

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