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: First gamepad recognised as Joy2 in Mame rather than Joy1  (Read 4979 times)

0 Members and 1 Guest are viewing this topic.

mickael28

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 183
  • Last login:July 01, 2020, 07:56:15 am
  • I want to build my own arcade controls!
First gamepad recognised as Joy2 in Mame rather than Joy1
« on: November 17, 2017, 08:42:58 pm »
Hi guys,

I've got an Xbox 360 on my Windows 10 PC and the controller settings recognise it as the 1st joystick. The green LED in the gamepad is marked as 1 as well.

The problem is that when I launched MAME, which is pre-configured with all options for Joy1, is somehow detecting this as a Joy2 joystick...

Is there a way for me to tell MAME that this is in fact Joy1? I don't want to reconfigure everything, and then on next reboot have the opposite problem (that I've reconfigured everything for Joy2 and MAME recognise it as Joy1 instead!)

Not sure where they're getting that information from, but it seems they're getting it wrong...

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: First gamepad recognised as Joy2 in Mame rather than Joy1
« Reply #1 on: November 18, 2017, 01:59:22 am »
The short answer is no but there are work arounds.
Its not mame thats the problem as such its the way that windows assigns the id’s.

You have 2 options.

1) reconfigure mame to your current set up.
But only do this if you do not unplug the controller or swap your usb’s around otherwise it will probably change again.

2) fix the decice ID and then reconfigure mame.
This will permanently fix the pad to id## so you can remove it and swap it around etc.

There are apps on the net that do this, Cant remember the name of the one I use sorry..

You can also do it through mame directly but I could never get it to work properly.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9403
  • Last login:Today at 12:08:16 am
  • Designated spam hunter
Re: First gamepad recognised as Joy2 in Mame rather than Joy1
« Reply #2 on: November 18, 2017, 02:45:59 am »
Check out Drventure's ControllerRemap for Mame and Stigzler's ControllerRemap GUI or this thread about a similar capability added to MAME around v0.179.

There's probably a better thread about the MAME feature.  :dunno


Scott

mickael28

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 183
  • Last login:July 01, 2020, 07:56:15 am
  • I want to build my own arcade controls!
Re: First gamepad recognised as Joy2 in Mame rather than Joy1
« Reply #3 on: November 18, 2017, 01:11:57 pm »
Thanks guys, it seems it is now natively supported by MAME and works quite well.

http://docs.mamedev.org/advanced/devicemap.html

So, basically, one just needs to get the device names they want by running 'mame -v', eg in my case:
Quote
mame64.exe -v
...
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
Input: Adding keyboard #0: HID Keyboard Device (device id: \\?\HID#Vid_8888&Pid_0208#7&1ae202bc&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #1: HID Keyboard Device (device id: \\?\HID#vmultia&Col07#1&2d595ca7&3&0006#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #2: HID Keyboard Device (device id: \\?\HID#VID_0DC6&PID_5022&MI_00#a&75b8308&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #0: HID-compliant mouse (device id: \\?\HID#Vid_8888&Pid_0108#7&8f53b06&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #1: HID-compliant mouse (device id: \\?\HID#VID_1532&PID_0002#8&39f2c1d7&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #2: HID-compliant mouse (device id: \\?\HID#vmultia&Col03#1&2d595ca7&3&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #3: HID-compliant mouse (device id: \\?\HID#vmultia&Col04#1&2d595ca7&3&0003#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #0: HID-compliant mouse (device id: \\?\HID#Vid_8888&Pid_0108#7&8f53b06&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #1: HID-compliant mouse (device id: \\?\HID#VID_1532&PID_0002#8&39f2c1d7&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #2: HID-compliant mouse (device id: \\?\HID#vmultia&Col03#1&2d595ca7&3&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #3: HID-compliant mouse (device id: \\?\HID#vmultia&Col04#1&2d595ca7&3&0003#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Skipping DirectInput for XInput compatible joystick Controller (MadCatz Call of Duty GamePad).
Input: Adding joystick #0: vmultia HID (device id: vmultia HID product_ba1c001f-0000-0000-0000-504944564944 instance_91900ea0-c404-11e7-8005-444553540000)
Input: Adding joystick #1: XInput Player 1 (device id: XInput Player 1)
Region ':user1' created
Starting No Driver Loaded ':'
  (missing dependencies; rescheduling)
Starting Video Screen ':screen'
Starting No Driver Loaded ':'

That 'XInput Player 1' gamepad is what MAME was recognising as Joy2.

So one can create a 'testremap.cfg' file under their MAME/ctrlr folder with this content:
Quote
<mameconfig version="10">
   <system name="default">
      <input>
         <mapdevice device="XInput Player 1" controller="JOYCODE_1" />         
      </input>
   </system>
</mameconfig>

And modify 'mame.ini' to read that file:
Quote
#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                     testremap

Voila, original Joy2 controller remapped to Joy1:
Quote
Input: Remapped joystick #0: XInput Player 1 (device id: XInput Player 1)
« Last Edit: November 18, 2017, 07:04:57 pm by mickael28 »