[stella] reading paddles

Subject: [stella] reading paddles
From: p.cavina@xxxxxxxxxxxxx (Piero Cavina)
Date: Thu, 5 Dec 1996 19:07:34 +0100
Thanks for your answers about _overscan_...
My game uses paddles, and not having the source code of a paddle game to
get 'inspiration' from, I had to figure out how to read them by myself...

this is what I do:

  LDA #0
  STA Pot
  STA Pot+1

  (...)


; the following instructions are within the main screen drawing routine

  LDA INPT0          ; read port 0
  BMI charged0       ; condenser already charged, skip increment
  INC Pot            ; increment paddle position value
charged0:
  LDA INPT1          ; as above e for the other paddle
  BMI charged1cent:
  INC Pot+1
charged1:

  (...)
; (end of tv frame loop)
; at this point Pot and Pot+1 are (more or less) proportional to the
current paddle position.

What do you think? These instruction have to be executed every two scan
lines so it is very important to save time at this point. Is there a better
way to do it?

Another problem is that the read values are a bit unstable, even if I'm not
touching the paddles. I don't know if this is a software or hardware
problem (worn potentiometers or aged 2600 circuitry).

Ciao,
 P.





Current Thread