Re: [stella] Driving controller multitap

Subject: Re: [stella] Driving controller multitap
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Wed, 25 Feb 2004 23:36:18 -0500
>> I guess there's no way to do it during VBLANK?
>
>Only if you need only very few different values and are able to poll the 
>hardware registers in constant intervalls. 

For Quadraside I was reading the paddles in the overscan. This worked fine, however I only had something like 13 paddle positions, This wouldn't do for Kaboom! but it might work for something like a driving game if you don't need too many wheel position - Particularly if you have something like: "Hard left", "Left", "Slight left", "Center", "Slight right", "Right", "Hard right".

Code follows:


;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
donepa0a:
   lda #128
   bit INPT1
   bne donepa1
   dec Player1x
   jmp donepa1a ;3
donepa1:
   nop
   nop
   sta $30
donepa1a:
   lda #128
   bit INPT2
   bne donepa2
   dec Player2y
   jmp donepa2a ;3
donepa2:
   nop
   nop
   sta $30
donepa2a:
   lda #128
   bit INPT3
   bne donepa3
   dec Player3y
   jmp donepa3a ;3
donepa3:
   nop
   nop
   sta $30
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