Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Controllers with many mappable buttons  (Read 3142 times)

0 Members and 1 Guest are viewing this topic.

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Controllers with many mappable buttons
« on: December 08, 2008, 01:55:28 pm »
Hello all,

I been doing a bit of investigating single USB controller options for hacking into a mame project.  Doing some of my own research I discovered that the PS-2 controller seems to offer the most inputs.

I made this little chart up showing it's mapping capabilities:

Playstation 2 Controller Mapping within Linux

Digital Mode:

D-Pad = X/Y (4 mappable points)
Left Analog Stick = Inactive
Right Analog Stick = Inactive
Button 0 = Triangle
Button 1 = Circle
Button 2 = X
Button 3 = Square
Button 4 = L2
Button 5 = R2
Button 6 = L1
Button 7 = R1
Button 8 = Select
Button 9 = Start
Button 10 = (in XY Analog Stick = Inactive)
Button 11 = (in ZR Analog Stick = Inactive)

Total mappable points = 14
1 joystick and 10 buttons
2 joysticks and 6 buttons

Analog Mode:

D-Pad = Hat control up/down/left/right (4 mappable points)
Left Analog Stick = X/Y (4 mappable points)
Right Analog Stick = Z/R (4 mappable points)
Button 0 = Triangle
Button 1 = Circle
Button 2 = X
Button 3 = Square
Button 4 = L2
Button 5 = R2
Button 6 = L1
Button 7 = R1
Button 8 = Select
Button 9 = Start
Button 10 = (in XY Analog Stick = Active)
Button 11 = (in ZR Analog Stick = Active)

Total Mappable points = 24

1 joystick and 20 buttons
2 joysticks and 16 buttons
3 joysticks and 12 buttons

Notes:

1) The X/Y axis that is normally assigned to the D-Pad switches to the LEFT analog stick.
2) The D-Pad changes to a new set of mappable points referred to as the "Hat" control.
3) Pressing down on the Left and Right Analog sticks activates buttons 10 and 11 of which are normally inactive in the Digital mode.
4) Assignments to the Analog sticks in digital mode are ignored.

Now taking all of this into account, it would obviously seem that the analog mode would be the best way to go given that it offers 24 mappable points other than the 14 you would get in digital mode.

The big problem with this mode is that you NEED some kind of analog stick hooked up to replace the two thumbsticks on the controller.  If you disconnect the thumbsticks and try to wire them for on/off use, the controller will NOT work.

So while it is simple enough to use Analog controls there are a few caveats:

1) Analog controls are extremely expensive.  I priced about 3 or 4 Happ sticks at over $100 each.
2) I don't know how 4 way games would behave under analog control.  However I was able to test some 4 way games with a straight PS-2 controller using the thumb controls and I will say that I DON'T like playing 4 way games in this manner.
3) The analog mode never comes on automatically upon power up, you MUST push a button to engage it.   So this is another problem that I don't know how to over come.   The good thing is that if I were to stick with the PS-2 controller in digital mode, the analog mode switch could be used as a "mode" selector and the button assignments "switch" as I mentioned above.

So sticking with the digital mode, I would only have 14 buttons to map.   I have looked into the Nintendo and X-Box controllers as well and they both have similar features to the PS-2.

I know that a simple solution would be to just use two controllers in digital mode and that would give me 28 mappable points and that would be more than enough.  But that would also take up two USB ports for control purposes.  While this isn't that big of a deal, I am curious if there controllers that offer more than the 14 points you would get from a PS2 or XBox controller.  One area I have not explored are dedicated PC based USB controllers.

I am open to ideas or suggestions as perhaps maybe someone out there has found the 'ultimate' usb controller to hack for mame purposes.

So one might think, why not buy an encoder?  Well, cost is a factor and it goes without saying I would like to do this as cheap as possible.   As it stands, I can get two Gravis Gamepad Pros (USB) for around $6 to $10 each.  If I have to spend a bit more to save a USB port than fine, but if it goes much over $40, then I AM better off buying an encoder.

Thanx

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Controllers with many mappable buttons
« Reply #1 on: December 08, 2008, 04:17:54 pm »
The big problem with this mode is that you NEED some kind of analog stick hooked up to replace the two thumbsticks on the controller.  If you disconnect the thumbsticks and try to wire them for on/off use, the controller will NOT work.

You can fake it with two resistors per axis, wired correctly using switches with both "Normally Open" (aka "NO") and "Normally Closed" (aka "NC") on the stick (such as most microswitch arcade stickes). 

First, figure the original analog POTs resistance.  Examples: common for PCs is 100k ohm, arcades is 5k ohm.  (Either use multimeter or look and see if it's written on the POT.)  If you're using a multimeter, measure the resistance of a centered stick, all left and all right.  Example: if 100k total, 50k centered and 0 minimum, 47k resistors should work.

Then you'd wire like the very quick sketch, below.  Notice one of the joystick's switches has the NO and the other has the NC. I'm not sure how the PS2 is set up, but for the PC, left & up are usually no resistance and right & down are max, this means left & up switches should be wired to NC, and right & down switches should be wired to NO.

More work, yeah, but not very hard, nor very expensive.
Robin
Knowledge is Power

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Re: Controllers with many mappable buttons
« Reply #2 on: December 08, 2008, 10:06:10 pm »
The big problem with this mode is that you NEED some kind of analog stick hooked up to replace the two thumbsticks on the controller.  If you disconnect the thumbsticks and try to wire them for on/off use, the controller will NOT work.

You can fake it with two resistors per axis, wired correctly using switches with both "Normally Open" (aka "NO") and "Normally Closed" (aka "NC") on the stick (such as most microswitch arcade stickes). 

First, figure the original analog POTs resistance.  Examples: common for PCs is 100k ohm, arcades is 5k ohm.  (Either use multimeter or look and see if it's written on the POT.)  If you're using a multimeter, measure the resistance of a centered stick, all left and all right.  Example: if 100k total, 50k centered and 0 minimum, 47k resistors should work.

Then you'd wire like the very quick sketch, below.  Notice one of the joystick's switches has the NO and the other has the NC. I'm not sure how the PS2 is set up, but for the PC, left & up are usually no resistance and right & down are max, this means left & up switches should be wired to NC, and right & down switches should be wired to NO.

More work, yeah, but not very hard, nor very expensive.

I have seen this tactic used before, but for some reason those that have tried it said while it works on most controllers it doesn't work with the PS2 controller.   One fellow did it, it didn't work and he put the old controls back in and just left them inside his controller box (not used but there), and it started to work again.

So I don't get it.  Does the PS-2 have a special control pot there? 

Well, as I said, if there isn't a single controller (to hack) that has more inputs than the PS2 then I will just get a USB expander card and use 2 Gravis Gamepad Pro's to hack.  That is my old standby anyway.  Basically the Gravis Gamepad Pro is the same thing as the OLD Playstation (1) controller but with a USB plug on it.  So you don't need to buy an adapter.

The one thing that is still good about the PS-2 controller, even if I don't use the analog controls is that when you go into analog mode, it is like a 'shift' button for the D-Pad.  You get 4 new direction assignments to map AND the switches under the analog controls become operational.  So yeah I thought of this as a "service" mode.  So for a basic two joystick four button setup, one PS2 controller is all that is needed.

I seen some cheapy off brand PS2 controllers selling for less than $10 on the internet.  Definitely worth the price.   More then likely the controls are flimsy and cheap on a controller like this, but then again, I am mostly interested in just the board!

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Controllers with many mappable buttons
« Reply #3 on: December 09, 2008, 01:56:06 pm »
I have seen this tactic used before, but for some reason those that have tried it said while it works on most controllers it doesn't work with the PS2 controller.   One fellow did it, it didn't work and he put the old controls back in and just left them inside his controller box (not used but there), and it started to work again.

So I don't get it.  Does the PS-2 have a special control pot there? 

Interesting.  Do you happen to have the link to the person who it didn't work?  I've heard of problems with sega's dreamcast controllers, but not the 3rd party controllers.  Sega was using hall effect sensors, while 3rd party were POTs.  Maybe I should test it out on my brother's ps2 controllers. ;)
Robin
Knowledge is Power

jukingeo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 362
  • Last login:March 14, 2015, 08:25:28 pm
Re: Controllers with many mappable buttons
« Reply #4 on: December 09, 2008, 03:21:10 pm »

Interesting.  Do you happen to have the link to the person who it didn't work?

Nope!  Don't remember where I saw or read it, but I heard about the incident on more than one occasion.

 
Quote
I've heard of problems with sega's dreamcast controllers, but not the 3rd party controllers.  Sega was using hall effect sensors, while 3rd party were POTs.  Maybe I should test it out on my brother's ps2 controllers. ;)

I have re-entered the thought of using the Sidewinder Dual Strike.   This controller is a simple pot base and it is known to use a 5k input, which is what standard "pro" arcade controllers use.   Successes are much greater with this controller.

Running through the mappable buttons, the Dual Strike has one less button than the Play Station 2 controller.   Using Windows games, the Dual Strike has a shift function, but this is a software option and not hardware like the PS-2 is.   However, you do have an analog x-y input with the Dual Strike, so that is the trade off.   It is very much possible to have an analog stick AND a digital 4/8 way.   However, I don't know how that would work with games like Robotron or even more important, tank based games (where the joysticks should be identical).

If I could make use of the x-y analog axis for a digital input, I would actually gain 4 more inputs, and could easily attain a two joystick 6 button, player start (1,2) AND a coin up button.  So going that avenue, this would yield more inputs than the PS-2 (in digital mode).

Another thing I like about the dual strike is that should I need analog inputs for another control panel (say a driver panel), I could simply "wire up" the panel as such and still use the same Dual Strike controller as an interface.  The wiring is easier on the Dual Strike as well because you have pin headers which terminate in wires.  So you can wire these to a terminal block (or computer DB connector) for easier wiring purposes.

Granted I did look into the PS-2 controller because of the analog mode, but because this mode is not a default and because of the issue I read about, the analog mode with the PS-2 has become less attractive to me for analog use.

If I do end up going the Dual Strike route, one thing I really wanted to do for a first analog project would be to re-create the throttle lever used on Lunar Lander.   After playing the real McCoy, it is hard to go to tapping digital buttons for the thrust.  BLECH!

I tested a Dual Strike last night and within Mame I mapped the analog y-axis to the throttle for Lunar Lander.   Ahhhhh, it works like a DREAM!  The thrust is proportional, like the way it should be, not all on or all off.

Geo
"Let me tell you about the time I used a sharpened clamshell to turn a T-Rex into a T-Rachel!" -Buck  Ice Age 3