Subject: Re: reading paddles (again) (was:Re: [stella] stick/paddle combos) From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney) Date: Wed, 01 Oct 1997 16:54:35 GMT |
>>> LDA INPT0 ; read port 0 >>> BMI charged0 ; condenser already charged, skip increment >>> INC Pot ; increment paddle position value >>>charged0 > >(please substitute my "condenser" with "capacitor", btw ;) If you need to read four paddles, it's faster to do INC scanline ;not necessary if you already have a scanline variable LDA scanline BIT INPT0 BMI charged0 STA Pot0 charged0 BIT INPT1 BMI charged1 STA Pot1 charged1 BIT INPT2 BMI charged2 STA Pot2 charged2 BIT INPT3 BMI charged3 STA Pot3 charged3 this is faster because STA takes two fewer cycles than INC... and it also leaves you with the scanline in A (or X or Y if you like), saving a load if you need to use the scanline number again. This way is also less time-variable - the branches each skip 3 cycles instead of five. Hey Jim, is there a time-invariant quick way to read all four paddles? -- Archives updated once/day at http://www.biglist.com/lists/stella/archives/ Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
reading paddles (again) (was:Re: [s, Piero Cavina | Thread | [stella] Paddles/warlords, Glenn Saunders |
reading paddles (again) (was:Re: [s, Piero Cavina | Date | [stella] Paddles/warlords, Glenn Saunders |
Month |