Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:49 20 Apr 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: Recommendations for joystick/game controller I/F standard

     Page 5 of 5    
Author Message
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 01:35pm 06 Aug 2020
Copy link to clipboard 
Print this post

  Turbo46 said  
  Quote  I think that would be enough for me to start writing a controller library (initially for just a single player, digital joystick), and if it gets much use that then tells you the pins to use for your hardware.

What do you think?

Could you please list your proposal for clarity? It's all getting a bit confusing. I'm happy with whatever you choose except pin 40, an accidental reset will confuse an inexperienced user just wanting to play a game.

All I'm asking/begging for is a standard pin allocation that will be universally adopted to allow a permanent hardware interface to be used.

Bill


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.

That's the proposal.

Pins 7,13,15,26 are left free. Pins 27 and 28 are left free when the joystick only uses one or two buttons.

(e.g. for some of the uses you or vegipete have suggested)
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 10:47pm 06 Aug 2020
Copy link to clipboard 
Print this post

  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.

That's the proposal.

Pins 7,13,15,26 are left free. Pins 27 and 28 are left free when the joystick only uses one or two buttons.

(e.g. for some of the uses you or vegipete have suggested)

If I read this correctly, the only change you've suggested is moving Digital Joystick Right away from (the dangerous) pin 40 and to pin 29 instead.
Visit Vegipete's *Mite Library for cool programs.
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 12:44am 07 Aug 2020
Copy link to clipboard 
Print this post

  vegipete said  
  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.

That's the proposal.

Pins 7,13,15,26 are left free. Pins 27 and 28 are left free when the joystick only uses one or two buttons.

(e.g. for some of the uses you or vegipete have suggested)

If I read this correctly, the only change you've suggested is moving Digital Joystick Right away from (the dangerous) pin 40 and to pin 29 instead.


Correct in that that's the only different pin.

I did mention leaving pins 27 and 28 free when not needed for this joystick, with the intent that they could be used for another device/devices.

I didn't define the analog pins, they could be used either as in your 2 analog joystick proposal and/or paddles, matherp's 3 axis analog joystick proposal, or Turbo46's digital joystick proposal to have 2 digital joysticks. That seemed like too much to decide on since two of us aren't using analog joysticks, and I wasn't planning to experiment with paddles until after I've done the digital joystick, and paddles wouldn't be usable for games needing a joystick.

I didn't include a separate button for the digital joystick like you'd proposed. If you want to do this for your own use I'm fine to have software support it in addition to pin 32, but I didn't want to include in the proposal for promoting to other people. It would limit them to only one button instead of 2 or 4, and waste pins for people who don't have an analog joystick.

Instead I would suggest:
One option is to connect up both the button for the digital joystick and the button for an analog joystick to pin 32 at the same time. They shouldn't interfere except if you were using one joystick and pressed the button for the other, and all that would do is count as a button press. This is what I'd suggest for something like your Proposed Colour Maximite 2 Game Controller Interface, as a change from Rev 1.2 - connect pin 32 both to an Atari-style joystick plug/socket, and to whatever connector is used for the analog joystick.

Another option is to disconnect the digital joystick pins (or at least pin 32) when you want to plug in another device, and vice versa. This is an option if you've connected things up with plug to socket jumper leads like I had started to do.

And your (vegipete's) paddle proposal already uses different buttons.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1590
Posted: 01:50am 07 Aug 2020
Copy link to clipboard 
Print this post

@capsikin and vegipete,

If both of you are happy with that so am I. Since there has been no comment by Peter or Geoff I guess there is little hope of having it included in the manual as a suggested or recommended standard so does anyone have an idea on how it can be more widely adopted?

Bill
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5882
Posted: 02:28am 07 Aug 2020
Copy link to clipboard 
Print this post

Bill,
The most important thing programmers can do is use constants (or global variables) for the pins.
That way it is easy to port programs to different platforms as well as cater for users who don't have the chosen pins available.

  Quote  CONST Dup     = 35 'Digital up - pin 35
CONST Ddown   = 36 'Digital down - pin 36
CONST Dleft   = 38 'Digital left - pin 38
CONST Dright  = 29 'Digital right - pin 29

CONST ButtonA = 32 'Button A - pin 32
CONST ButtonA = 33 'Button B - pin 33
CONST ButtonA = 27 'Button C - pin 27
CONST ButtonA = 28 'Button D - pin 28


The next step in usability would be to have the input device reading routines in well defined and commented subroutines so users can adapt them to suit whatever input device they are using.

You might prefer an Atari digital joystick, someone else has a Wii Classic controller. I have an analog joystick which I emulate a Wii with.

Jim
VK7JH
MMedit   MMBasic Help
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1590
Posted: 03:04am 07 Aug 2020
Copy link to clipboard 
Print this post

Thanks Jim,

It's a pity but I think you are right. We have a standard for Wii devices but not joysticks. We will have to rely on programmers to to define the input arrangements clearly so users can hack the games to suit where necessary.

Bill
Keep safe. Live long and prosper.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3649
Posted: 06:18am 07 Aug 2020
Copy link to clipboard 
Print this post

Maybe a chance for a common routine to do the setup?

It would (I guess) prompt the user to press (something), repeatedly if needs be, and figure out where it's connected.  Then to press (another) and so on.

John
 
Daren
Newbie

Joined: 05/08/2020
Location: United Kingdom
Posts: 25
Posted: 06:56pm 08 Aug 2020
Copy link to clipboard 
Print this post

Just a heads up, I ordered a wii classic gamepad today for about £9 from ebay, then just now got an email about this deal for €2! today only apparently so be quick if you want one, I didn’t order one because I already have the other one coming but I have used this company before and they are reputable.

Maybe someone can benefit from the deal though.

https://www.konsolenkost.de/wii-controller-pad-weiss-classic-gamepad-pro-verschiedene-hersteller-ohne-ovp-neu/a-1075514/
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 07:19pm 08 Aug 2020
Copy link to clipboard 
Print this post

  Daren said  Just a heads up, I ordered a wii classic gamepad today for about £9 from ebay, then just now got an email about this deal for €2! today only apparently so be quick if you want one, I didn’t order one because I already have the other one coming but I have used this company before and they are reputable.

Maybe someone can benefit from the deal though.

https://www.konsolenkost.de/wii-controller-pad-weiss-classic-gamepad-pro-verschiedene-hersteller-ohne-ovp-neu/a-1075514/


Not so good after shipping!! It is third party and you will not know what you are getting till you get it and then good luck sending it back.  I got two nice knockoffes on Amazon prime for $14 but could have freely returned them if they were crap.  

From their checkout.
total
Value of goods (net)$ 2.03 Goods value (gross)$ 2.36 Shipping costs (net)$ 4.05 Shipping costs (gross)4.70 USD
Total (net)$ 6.08
VAT 16%$ 0.97
Total (gross)$ 7.06
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 11:27pm 14 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  Bill,
The most important thing programmers can do is use constants (or global variables) for the pins.
That way it is easy to port programs to different platforms as well as cater for users who don't have the chosen pins available.

  Quote  CONST Dup     = 35 'Digital up - pin 35
CONST Ddown   = 36 'Digital down - pin 36
CONST Dleft   = 38 'Digital left - pin 38
CONST Dright  = 29 'Digital right - pin 29

CONST ButtonA = 32 'Button A - pin 32
CONST ButtonA = 33 'Button B - pin 33
CONST ButtonA = 27 'Button C - pin 27
CONST ButtonA = 28 'Button D - pin 28



Thanks, I based some of my code comments in my library / library collection on this.
  Quote  

The next step in usability would be to have the input device reading routines in well defined and commented subroutines so users can adapt them to suit whatever input device they are using.

You might prefer an Atari digital joystick, someone else has a Wii Classic controller. I have an analog joystick which I emulate a Wii with.

Jim

I've made several versions of my library routines, some should be easy to modify like that, I may need to document that more as there are many to choose from.

But also for a few common standard configurations, I want to have the routines already written, so the only adaption needed is picking the right library.

And at least for the Wii controllers, a more complex version of the library can choose routines based on what is plugged in.

  capsikin said  
  Turbo46 said  It's a pity that this post is flip/flopping between Joysticks and Nunchuks.

Yeah, maybe we should start a separate thread for the direct pin reading interface. Not sure what we'd call it though.

Well I started one, CMM2: Arcade/joystick/paddle direct pin interface conventions
Edited 2020-08-15 09:37 by capsikin
 
     Page 5 of 5    
Print this page


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

© JAQ Software 2024