Re: [stella] a "pot" of confusion

Subject: Re: [stella] a "pot" of confusion
From: Eckhard Stolberg <Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 May 1999 14:28:28 +0200
At 23:12 25.05.99 -0700, you wrote:
>after looking over the stella document some more, i noticed that the four
paddles
>only have one bit each in which the pot can be read...and i find that
>confusing...how
>does one go about keeping track of where the knob of the paddle is and stuff?

You count the time that it takes for the paddle bit to go from low
to high. When you write a 1 into bit 7 of VBLANK the pots will be
discharged and the paddle read bits will go low. When you write 0
into bit 7 of VBLANK the pots will start to recharge. The further
you have turned a paddle's knob the longer it will take to recharge
the paddle's pot and the longer it will take the paddle's read bit
to go high again.

Usually you do the discharge/start the recharge stuff during the
VSYNC time. Then you have to set a counter in RAM  to zero. During
the displayed part of the screen you read the paddle bit in every
scanline and if it still is low, you increase the counter by one.
At the start of the overscan the counter then holds a value, that
you can use to position your player or whatever.


Ciao, Eckhard Stolberg



--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread