Re: [stella] reading paddles

Subject: Re: [stella] reading paddles
From: jimn8@xxxxxxxxxx (Jim Nitchals)
Date: Fri, 6 Dec 1996 10:47:27 -0800 (PST)
> 
> >I wonder if doing an extremely short capacitor dump cycle would cause
> >the potentiometer values to change quick enough to read the pots in
> >a short loop.

The idea being that if the capacitor is not fully dumped, it will sooner
float to full charge and you need less time to measure how long that
it takes to be recharged:

> >i.e.
> >    lda #$80
> >    ldx #0
> >    sta VBLANK
> >    stx VBLANK

Whether this might work depends on how long the hardware takes to do a
full capacitor dump.  If it's FAST, this approach won't work.  If it's
SLOW, and the above code only does a **partial** capacitor dump, the 
following should work well:

> Do you mean 'stop and wait until the capacitor is charged'? Something like
> this...
> 
> loop:
>      LDA INPUT0
>      BMI charged
>      INC Pot
>      BNE loop
> charged:

Exactly.  Again, I haven't tried it, and it will certainly NOT work on an
emulator, but it's worth checking out.  

If nobody posts results on this today, I'll hack something together over
the weekend and post a good set of paddle reading routines with dejittering
and HOPEFULLY (fingers crossed!) not requiring display time.


Current Thread