Subject: Re: [stella] Reflex: Paddle woes From: Christopher Tumber <christophertumber@xxxxxxxxxx> Date: Fri, 02 Apr 2004 11:03:26 -0500 |
Reading the paddles isn't really difficult, just the timing has to be really precise (like everything else on the 2600, really). I was looking at a similar problem in Quadracide and wound up doing my paddle reads in the overscan. However, I only needed a dozen positionings or so which let me off the hook to a certain extent. However, there's no reason why you couldn't start the paddle read in the overscan (or at the bottom of the visible screen) and the continue on into the next vblank. Timer based interrupts would be really nice here, as it is you're probably going to need to find a way to slip polling the paddles into your regular code. Polling the paddle is quite quick, but it must be at regular intervals. The amount of time between polls determines the sensitivity of the paddle Here is my code from Quadracide: ;Start Overscan lda #2 STA VBLANK ; Make TIA output invisible, and charge paddles lda #30 sta TIM64T lda #23 sta Player0x sta Player1x sta Player2y sta Player3y ; jmp skippaddles ldy #22 nextpa0: lda #128 bit INPT0 bne donepa0 ;2/3 dec Player0x ;5 jmp donepa0a ;3 donepa0: nop nop sta $30 ;time waster donepa0a: lda #128 bit INPT1 bne donepa1 dec Player1x jmp donepa1a ;3 donepa1: nop nop sta $30 ;time waster donepa1a: lda #128 bit INPT2 bne donepa2 dec Player2y jmp donepa2a ;3 donepa2: nop nop sta $30 ;time waster donepa2a: lda #128 bit INPT3 bne donepa3 dec Player3y jmp donepa3a ;3 donepa3: nop nop sta $30 ;time waster donepa3a: dey bpl nextpa0 skippaddles: OverscanWait: lda INTIM bne OverscanWait JMP MainLoop ;Continue forever. ---------------------------------------------------------------------------------------------- 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] Reflex: Paddle woes, Adam Thornton | Thread | RE: [stella] Reflex: Paddle woes, KirkIsrael |
[stella] OT-- WAS: Reflex: Paddle w, KirkIsrael | Date | Re: [stella] OT-- WAS: Reflex: Padd, Rob |
Month |