Subject: Re: [stella] reading the driving controllers, generic thoughts From: Thomas Jentzsch <tjentzsch@xxxxxx> Date: Tue, 30 Oct 2001 18:53:08 +0100 |
Glenn Saunders wrote: >How does your code handle isolating the left or right nybble >(controller 0 or controller 1)? It doesn't :-) But after lda SWCHA you could insert the same code as Eckhard does: lda SWCHA cpx #1 ; x = player number (0,1) beq .player1 lsr lsr lsr lsr .player1: ... BTW: Did you notice, that Eckhard's solution is nearly identical with my first one? >Last night I was thinking of yet another way to do it where >you store the possible previous and next controller states >(which could be done with two nybbles or strip out the always >set bits and store the entire thing in one nybble per byte. > >Then you could mask and shift bits in order to merge the real- >time last and current controller state and scan once through >the table. Depending on the number range of the match, it will >be in the left or right half of the table. That should work too, but I'm sure, it would be slower (scanning!) and larger than the other solutions. Have fun! Thomas - Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] reading the driving co, Glenn Saunders | Thread | [stella] My first (half) game + Cut, Andrew Wallace |
[stella] game ideas, Ben Larson | Date | Re: [stella] game ideas, Chris Wilkson |
Month |