erichenneke Posted September 11, 2016 Share Posted September 11, 2016 I looked around and didn't really find anything specifically related to the use of Atari Driving Controllers with the 8-bit computers, so I thought I'd ask... how do you read them? I know they output gray code in some joystick bits, but which bits should be read exactly? Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 11, 2016 Share Posted September 11, 2016 The fire button is same as for a joystick. According to the info I've found the rotation changes the lower 2 bits of the joystick input as repeating gray code, the upper 2 bits always read "11". http://www.videogames.org/html/2600Stuff/DrivingControllers The sequence occupies 90 Degrees of rotation so for a full revolution there's repeat 4 * 4 = 16 values. So the values should step through as shown: Rotating left 1100 1101<--| 1111 | 1110 | 1100---- ... etc Rotating right 1100 1110<--| 1111 | 1101 | 1100---- ... etc Note I removed the reference to UDLR as shown on the linked page as it's wrong. The way it works is similar to a mouse axis on ST or Amiga mouse except a mouse will return many more changes in value so need to be sampled more often to work well. With driving controller you could get away with 1 or 2 samples per frame. For the sampling, the best method would be to take the sample at VBlank and again halfway down the screen. Then do the processing during VBlank. 2 Quote Link to comment Share on other sites More sharing options...
erichenneke Posted September 11, 2016 Author Share Posted September 11, 2016 The fire button is same as for a joystick. According to the info I've found the rotation changes the lower 2 bits of the joystick input as repeating gray code, the upper 2 bits always read "11". http://www.videogames.org/html/2600Stuff/DrivingControllers The sequence occupies 90 Degrees of rotation so for a full revolution there's repeat 4 * 4 = 16 values. So the values should step through as shown: Rotating left 1100 1101<--| 1111 | 1110 | 1100---- ... etc Rotating right 1100 1110<--| 1111 | 1101 | 1100---- ... etc Note I removed the reference to UDLR as shown on the linked page as it's wrong. The way it works is similar to a mouse axis on ST or Amiga mouse except a mouse will return many more changes in value so need to be sampled more often to work well. With driving controller you could get away with 1 or 2 samples per frame. For the sampling, the best method would be to take the sample at VBlank and again halfway down the screen. Then do the processing during VBlank. thanks Rybags, very helpful. Got it. Quote Link to comment Share on other sites More sharing options...
Mathy Posted September 11, 2016 Share Posted September 11, 2016 Hello Eric At the Fujiama 2014 I wrote a small BASIC program that reads the driving controller. 100 A=STICK(0)-11110 B1=(A/2>1)120 B0=(A-(2*B1)>1)130 ? B0,B1155 GOTO 100 It'll show you what happens when you turn the knob on the driving controller. Maybe it'll give you an idea for your own routine. Sincerely Mathy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.