Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:50 03 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Arcade/joystick/paddle direct pin interface conventions

Author Message
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 03:29am 13 Aug 2020
Copy link to clipboard 
Print this post

Previous discussions had been mixed together in the same thread as ideas for using I2C and/or Nintendo Wii protocols for connecting controllers, it could be good to have a thread more focussed on the direct pin to switch or pin to potentiometer connections (maybe with a few capacitors and resistors, but no required microcontrollers or I2C chips)

I chose a subset to promote as the digital joystick standard (to be supported along with the I2C based Wii protocols)

  capsikin said  
Digital up - pin 35
Digital down - pin 36
Digital left - pin 38
Digital right - pin 29

Button A - pin 32
Button B - pin 33
Button C - pin 27
Button D - pin 28

If it's a one button joystick it uses button A, pin 32.
If it's a two button joystick also uses button A, pin 32 and button B, pin 33.


People have been talking about porting colour invaders, and it would be good to have a convention for paddle potentiometer pins for that. I've also kind of ported another space invaders, and paddle support could be added to that.

vegipete's proposal looks good to me for paddles.

Edited to just the paddle proposal:
  vegipete said  I've been hacking together a game from the olden days that plays most easily with a paddle. I used joystick 2 y-axis and button D. This is convenient because analog-Y2/button-D/ground are together in a row (pins 26/28/30.) Add 3.3v from pin [1 or 17] to complete the potentiometer voltage divider.

[...] Games like Pong would benefit from 2 paddles. Maybe [...] a pair of paddles first on pins 15/26/27/28.


So if I'm not mistaken, that's
Paddle 1 on pin 26
Paddle 1 button on pin 28
Paddle 2 on pin 15
Paddle 2 button on pin 27

Turbo46's proposal for a second digital joystick looked good to me, I was planning on supporting it once there are some two player games and people with the hardware, I can write a test program for it whenever there's interest.

digital up - pin 7
digital down - pin 13
digital left - pin 15
digital right - pin 26

Button C - pin 27 / joystick 2
Button D - pin 28 / joystick 2 aux

I'll also mention vegipete's pin usage for 1 or 2 analog 2 axis joysticks (https://www.thebackshed.com/forum/ViewTopic.php?TID=12282&P=1#149194), and matherp's original suggestion for 3 analog axis (https://www.thebackshed.com/forum/ViewTopic.php?TID=12282&P=1#149155), in case anyone wants to look at those.

2 axis joysticks:
analog x1 - pin 7
analog y1 - pin 13
analog x2 - pin 15
analog y2 - pin 26

3 axis joystick:
analog x - pin 7
analog y - pin 13
analog z - pin 15
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024