Re: [stella] Reading Paddles?

Subject: Re: [stella] Reading Paddles?
From: Erik Eid <eeid@xxxxxxxxx>
Date: Fri, 10 Jan 2003 21:54:13 -0500
On Friday 10 January 2003 20:32, Chris Larkin wrote:
> I wanted to add paddle control to my recent game, as opposed to Joysticks
> like it uses now... and then I realised... I have no idea how to write for
> paddles...

Don't do it... don't do it...  :)

Seriously, it's uglier than reading joysticks.  Early versions of Euchre 
actually had paddle control, but I eventually abandoned it.

Basically, to get accurate paddle reads, you have to read INPT0 throughout 
the display kernel, rather than once per frame.  For the most accuracy, you'd 
read it once every scanline or two.  This eats away at the free cycles you 
have available per line.

That said, if you're still interested, you might want to go here:  
It's the SCSIcide web page, which has links to the source code.  SCSIcide is 
a paddle game.

> How does INPT0 relate to the actual position of the paddle? How do I know
> how to increment/decrement the position of whatever it is I want controlled
> by the paddle based on the value of INPT0.

The value of INPT0 is only relevant as to whether bit 7 is set or not.  From 
the beginning of the display, increment a counter every time you read INPT0 
and bit 7 is _not_ set.  When you get to the end of the display, you'll have 
a number that you can use to control something in your game.  The longer it 
takes to get a positive read (bit 7 set), the further the paddle was turned.

Good luck!
Archives (includes files) at
Unsub & more at

Current Thread