Atari Driving Controller Games

The Speccy's spritely young offspring. Discuss everything from FPGA to ZX
Post Reply
User avatar
Daveysloan
Manic Miner
Posts: 365
Joined: Tue Jun 08, 2021 12:57 pm
Contact:

Atari Driving Controller Games

Post by Daveysloan »

I've only recently been able to pick up my Next & I'm really impressed with it. One of the unexpected bonuses is that the excellent game Bikers allows you to use the Atari 2600's driving controller, which is incredible, I absolutely love being able to use the spinner controls. They obviously work really well for Arkanoid/Breakout style games & games like Super Sprint etc.

Are there any other games that take advantage of this?

Cheers
User avatar
stupidget
Dynamite Dan
Posts: 1644
Joined: Wed Jan 24, 2018 2:09 pm
Location: Sunny Wolverhampton

Re: Atari Driving Controller Games

Post by stupidget »

Wow, I didn’t even know this was possible. Just in the process of building a bit of a permanent setup for my NEXT and really looking forward to trying this out. Does it work on Deathchase?
User avatar
Pobulous
Dynamite Dan
Posts: 1366
Joined: Wed Nov 15, 2017 12:51 pm

Re: Atari Driving Controller Games

Post by Pobulous »

The Driving Controller is digital, rather than analogue like the paddles, so can work on any system, as long as the game is coded for it.
It uses the standard UDLR inputs to encode the current angle.

By reading the joystick port and comparing to the previous reading you can ascertain which way the wheel was turned, and how far.
User avatar
Daveysloan
Manic Miner
Posts: 365
Joined: Tue Jun 08, 2021 12:57 pm
Contact:

Re: Atari Driving Controller Games

Post by Daveysloan »

Now if some boffin could remake Deathchase for the Next & make it compatible with the Driving Controller, that'd be incredible!
User avatar
Seven.FFF
Manic Miner
Posts: 744
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Atari Driving Controller Games

Post by Seven.FFF »

Daveysloan wrote: Mon Mar 18, 2024 11:43 am Now if some boffin could remake Deathchase for the Next & make it compatible with the Driving Controller, that'd be incredible!
Atari driving controller will generally work anywhere Spectrum joysticks work, and with any kempston/sinclair/cursor/protek protocol. They only use left/right/gnd pins, on which they put a single-axis quadrature signal. They don’t connect to any power lines or use second/third fire buttons, so they are pretty universal.

Think of an infinitely long strip of paper with bits written on it like this:

Code: Select all

…000111100001111000011110…
There’s a two digit wide window like an advent calendar, and the strip can slide left or right behind. Every time you slide it one position a different pair of bits appears. You can tell which direction it was slid in by the current and previous pairs.

The controller is like this, and the current pair is read from the left and right bits. Notice that with a single position change, only a single digit ever changes (a Gray code). You can use this to detect glitches or super fast spinning.

So basically any spectrum game (or Next game) can be patched fairly easily for a driving controller by a competent machine code hacker.

Don’t mix up the driving controller (pic of car on it) with the Atari analogue paddle (pic of tennis rackets on it), which will probably not do your Spectrum or Next much good if you plug one in.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Atari Driving Controller Games

Post by Joefish »

Surely you need to be reading that at a hell of a rate to detect the switching, to the detriment of the game? Then again, it seems they only use 16 pulses per revolution of the controller, so maybe interrupt-driven checking is fast enough.

For a good rotary controller I'd suggest wiring a rotary encoder up to a Kempston Mouse interface, to do the pulse-counting for you and return an 8-bit number.
User avatar
Seven.FFF
Manic Miner
Posts: 744
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Atari Driving Controller Games

Post by Seven.FFF »

Joefish wrote: Mon Mar 18, 2024 2:53 pm Surely you need to be reading that at a hell of a rate to detect the switching, to the detriment of the game?
It presents constant bit values to, say, IN 31 with a kempston interface, so you only need to read once per frame, just like you would with a joystick. The values only change when the user rotates, which usually happens at less than one clickstop per frame. It's hard to spin it round faster than that. There's no pulse counting involved at all.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Atari Driving Controller Games

Post by Joefish »

According to this video it is a pulse-counting type of encoder:


I know you can get rotary encoders that report their absolute angle on four or five pins (a 0..15 or 0..31 value that relates to the angle 0..359°), but according to that rebuild it simply uses a 3-pin pulse encoder type. You would still have to count or at least detect a particular pulse / strobe / transition and add that to a rotation angle.
Post Reply