Main > Main Forum

GamePad Wiring then .ini issues

<< < (2/6) > >>

NoBonus:
I have hacked a couple gamepads and as long as you are dealing with buttons that close a circuit on a PCB, the hacking should b theoretically the same. I think you run into more problems when you attempt to hack say a PC gamepad into a SNES.

blue:
Ok, this is what I

Tiger-Heli:
You're definitely confusing yourself.  I'll try to walk you through the tough stuff, but first, after the rest of this reply makes sense to you, and before you start hacking anything, try labelling one pad as P1, one as P2, installing the pads directly to the computer and working with them the way you plan to use them.

I think your setup will work.  The thing I am possibly a little concerned with is the pads swapping positions (in MAME) when you power down and re-start the computer.

More answers below -


--- Quote from: blue on May 14, 2004, 04:15:58 pm ---My question now is along with my 2 Axispads (as interfaces for P1 and P2) is it possible in MAME32 to have P1 controls and the flightstick controls the same. Ie: Have both control player 1

--- End quote ---
It is in command-line MAME, I would assume so in MAME32.

--- Quote ---In the .ini file what is the command for assigning 2 buttons on 2 different controllers?
P1_BUTTON1 | P3_BUTTON1

--- End quote ---
Okay, here is where you start getting confused - First off, you don't actually assign an interface to a player - you assign buttons on an interface to buttons in the game (on a global or per-game basis).

It's a subtle difference, but it's there.

So let's say you want to assign button 1 on the 1st Axis pad and button 1 on the flightstick to Player 1 Button 1 in all games -

The command would most likely be (replaced in your default.ini ctrlr .ini file):

P1_BUTTON1  "KEYCODE_LCONTROL | JOYCODE_1_BUTTON1 | JOYCODE_3_BUTTON1 | MOUSECODE_1_BUTTON1"

Some caveats here:  The LCtrl and mousebutton assignments are optional defaults and can be deleted.  MAME only recognizes (through standard names like this in .ini files) the first four gamepads and the first five buttons on each pad.  Beyond this, you have to use the tab menu and pretend to assign buttons to inputs and then enter that (with underscores in place of spaces) in your .ini file.

For example, gamepad 1 button 1 most likely maps to "J1 Button0" in the tab menu, so you can use either "J1_Button0" or "Joycode_1_Button1" for this input.

The reason I mention this is b/c Button 6 will have to be "J1_Button5" and that is completely different from "JOYCODE_1_BUTTON5", which is a little confusing until you get used to it.

Also, J1_Button1 is the most common, but it could be J1_B1 or JOYSTICK1_B1, etc. and you need to match what the TAB menu is showing when you press the button.

--- Quote ---If I define the flightstick as player3 does this mean that the 3rd person is going to have to use the flightstick in 4players games?

--- End quote ---
Not if you define P3_BUTTON1 to use a different control in these games, etc. . .  Do you follow me?

--- Quote ---How many controls can MAME recognize?

--- End quote ---
I believe it is up to 8 gamepads and 8 mice/trackballs/optical interfaces.

One last thing - I don't think this applies to gamepads, but it might be a problem if you use dual trackballs down the line -

I use dual USB trackballs which are USB so I can have them plugged in when I need them and unplugged when I don't.  For dual trackball games, I use a version 0.73 or previous build of either NoNameMAME or MAME Analog Plus (which was the last build that remembered mouse assignments).

I assigned Mouse 2 to Player 2, which worked fine as long as both trackballs were plugged in.  The problem was if I unplugged one track ball and played a one player game, MAME assumed that I no longer had a Mouse 2 and dropped the assignment to player two for the second trackball.  The solution was to play a 2 player game, get the trackballs assigned properly, exit MAME, and change the gamename.ana file to read-only.

--- Quote ---Am I making this clear or not? I think that I?m confusing myself?
 :-\

--- End quote ---
I knew what you were saying, but I threw a lot at you, so if you didn't follow along, post a reply.

paigeoliver:
If you hack yourself 2 identical gamepads then you are going to find that they will randomly swap position on each reboot.

blue:
Kewl!

Thanks for all the info Tiger-Heli its really appreciated and the extra info. I don't think i'll be using it now but might come in handy doen the line...

I'm not too worried abut the gamepads swapping position on restart, thats a minor problem i can live with (thanks to paigeoliver also.)

However...
I have run into a problem tho, these AxisPads suck!
It seams that the analog control on them is the default control stick and the digital pad never kicks in. There isn't a way to change from analog-to-digital like on psx controls. I actually don't think there is a way to only use the digital, at least not one that i've found. The driver for this don't do anything and the company Interact is out of business...  >:(

I'm still trying to find out a way to work around this... am thinking of removing the analog control from the pcb and hoping that digital will kick in...but i think that its a long shot. If this doesn't work i'll be going back to my original plan of hacking old school psone controllers and using the USB adapt.

I'll keep everyone uptodate on these Axispads.

p.s. has anyone taken apart a Dual Shock PS Controllers... I didn't know they didn't have a pcb in them...  ???

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version