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: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?  (Read 8258 times)

0 Members and 1 Guest are viewing this topic.

tylerwerrin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:May 13, 2022, 02:16:31 pm
  • I want to build my own arcade controls!
How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« on: December 15, 2016, 04:14:10 pm »
I'm having an issue with MAME - It keeps recognizing both my Player 1 and Player 2 controls as "Joy 4". I am using a GPWiz 40.

How can I force MAME to recognize Player 1 and Player 2 as Joycode 1 and Joycode 2, respectively?

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: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #1 on: December 15, 2016, 07:00:07 pm »
Does it matter what they recognise as? As long as it works you could call em joy 6&9 ;)

tylerwerrin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:May 13, 2022, 02:16:31 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #2 on: December 15, 2016, 07:16:52 pm »
Yeah, it matters for my application - I have LED Blinky mapped to Joy 1 and Joy 2. I have to do this, as Blinky is mapped through MAME's input settings to generate the button colors. Since all my buttons are being recognized as Joy 4, my buttons are all out of whack.

tverona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:April 01, 2018, 11:12:57 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #3 on: December 16, 2016, 12:25:48 am »
Check this out and let me know if it helps (added it to name recently to solve this exact problem): http://docs.mamedev.org/advanced/devicemap.html

tylerwerrin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:May 13, 2022, 02:16:31 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #4 on: December 16, 2016, 02:43:08 am »
I'm not sure how to set it up - I don't understand what you are proposing. I ran the -v command and my cmd window and it brought up a list of all my devices, as well as the other mame settings which mame executes on boot up. However, it shows that my GPWiz is Joystick 3, and in MAME it's showing up as Joy 4.

FWIW, MAME is retaining my Joystick code as 4 - it hasn't change since I first installed MAME.

tverona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:April 01, 2018, 11:12:57 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #5 on: December 16, 2016, 07:40:17 pm »
Can you post the output of mame -v?

tylerwerrin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:May 13, 2022, 02:16:31 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #6 on: December 17, 2016, 02:32:42 am »
C:\Users\Arcade>C:\Hyperspin\Emulators\MAME\mame64.exe -v
Video: Monitor 65537 = "\\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Physical width 1920, height 1200
Direct3D: Initialize
Direct3D: Configuring adapter #0 = NVIDIA GeForce 210
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Direct3D: Max texture size = 8192x8192
Direct3D: Device created at 1920x1200
Direct3D: Initialize HLSL
RawInput: APIs detected
RawInput: APIs detected
RawInput: APIs detected
Sound: XAudio2 created initial buffers. total size: 46080, count 10, size each 4608
Sound: XAudio2 initialized. 48 ms.
Input: Adding keyboard #0: HID Keyboard Device (device id: \\?\HID#VID_040B&PID_2000&MI_00#7&2fb8e954&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #0: HID-compliant mouse (device id: \\?\HID#VID_040B&PID_2000&MI_01&Col03#7&17f55d0f&0&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #1: HID-compliant mouse (device id: \\?\HID#VID_D209&PID_1601&MI_02#7&6f69e7b&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #2: HID-compliant mouse (device id: \\?\HID#VID_D209&PID_1602&MI_02#7&23fea4a1&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #3: HID-compliant mouse (device id: \\?\HID#VID_046D&PID_C050#7&11fb47d6&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #4: HID-compliant mouse (device id: \\?\HID#VID_FAFA&PID_000B#8&26ee7ec7&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #0: HID-compliant mouse (device id: \\?\HID#VID_040B&PID_2000&MI_01&Col03#7&17f55d0f&0&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #1: HID-compliant mouse (device id: \\?\HID#VID_D209&PID_1601&MI_02#7&6f69e7b&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #2: HID-compliant mouse (device id: \\?\HID#VID_D209&PID_1602&MI_02#7&23fea4a1&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #3: HID-compliant mouse (device id: \\?\HID#VID_046D&PID_C050#7&11fb47d6&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #4: HID-compliant mouse (device id: \\?\HID#VID_FAFA&PID_000B#8&26ee7ec7&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding joystick #0: ATRAK Device #1 (device id: ATRAK Device #1 product_1601d209-0000-0000-0000-504944564944 instance_886dbd40-aeac-11e6-8002-444553540000)
Input: Adding joystick #1: ATRAK Device #2 (device id: ATRAK Device #2 product_1602d209-0000-0000-0000-504944564944 instance_e6b27d40-bc0e-11e6-8001-444553540000)
Input: Adding joystick #2: USB Gamepad  (device id: USB Gamepad  product_00110079-0000-0000-0000-504944564944 instance_88700730-aeac-11e6-8005-444553540000)
Input: Adding joystick #3: GP-Wiz40 (device id: GP-Wiz40 product_0035fafa-0000-0000-0000-504944564944 instance_08431970-ade5-11e6-8004-444553540000)
Region ':user1' created
Starting No Driver Loaded ':'
  (missing dependencies; rescheduling)
Starting Video Screen ':screen'
Optional device ':screen:finder_dummy_tag' not found
Starting No Driver Loaded ':'
Sound: overflows=0, underflows=1
Sound: XAudio2 deinitialized

tverona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:April 01, 2018, 11:12:57 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #7 on: December 17, 2016, 05:46:10 pm »
Hey tylerwerrin, so i only see one device called GP-Wiz40. To map it from joystick #4 to #1, you can add the following entry to your controller config file:
  <mapdevice device="GP-Wiz40" controller="JOYCODE_1" />

Note this requires mame .0179 or above.

That will just map GP-Wiz40 from joystick #4 to joystick #1. However, you also mentioned you have two GP-Wiz40 controllers, whereas mame only recognizes one. So if that's the case, it's a different problem. I'm not familiar with GP-Wiz40 - maybe someone else can help with that.

tylerwerrin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:May 13, 2022, 02:16:31 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #8 on: December 22, 2016, 02:57:29 am »
Where do I add that line? I think this will solve my issue... however, I do not have 2 GP Wiz's - only one. My issue was that LED Blinky only has 18 mappable buttons, so I was having to split the two maps for Joy 1 and Joy 2.

tverona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:April 01, 2018, 11:12:57 pm
  • I want to build my own arcade controls!
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #9 on: December 26, 2016, 11:08:14 am »
Check out the example here: http://docs.mamedev.org/advanced/devicemap.html

That shows where to add the line. Let me know of if you get stuck.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: How to get MAME to recognize my Joysticks as Joy1 & Joy 2?
« Reply #10 on: December 27, 2016, 07:57:49 am »
Thanks for this, I have been looking for an alternative to ControllerRemap for a while. The question I have is, where do I enter the <mapdevice> code? Does it go in the default.cfg? How would I prevent it from being overwritten? If you could give us a quick step by step as far as where the code should be placed, I would appreciate it. Thanks again for your hard work!

 :applaud: