Rotary Joystick won't configure in MAME
-
I'm trying to setup my rotary joystick (ultimarc ikari 12 way upgrade) in MAME2010. When I enter the MAME Input (this machine) menu, I go down to the Dial Analog Inc or Dial Analog Dec and press enter but it won't accept the keys I want to use. I'd like for it to be:
Player 1 Inc - "["
Player 1 Dec - "]"
Player 1 Inc - "/"
Player 1 Dec - "."I've setup the ultimarc to use these outputs and MAME doesn't accept the new key from the ultimarc nor will it accept the output when I send the command from a keyboard. Also, what should the Dial Analog be showing?
I've also tested other available keys and it doesn't accept them either: 7,8,9,;,',
I tested this on my desktop computer with MAME64 and it takes the key but it's grayed out and I can't connect the joysticks from my arcade cabinet to my desktop to do any further troubleshooting that way.
What am I doing wrong?
Power Supply: Canakit
RetroPie Version: 4.8.2
Built From: Premade from Raspberry Pi Imager
USB Devices: Ultimarc I-PAC Ultimate I/O and Ultimarc rotary upgrade (Player 1 and 2)
Sound hat: IQaudio DAC PRO -
Good question. Because it's a rotary switch, I don't think MAME is going to read it the way your are asking it to. Rotary in MAME is a spinner like Tempest and sees axis Left/Right or UP/Down. A true rotary switch might need actual positional input.
So as you're turning it, it's like pushing the joystick into a direction. Whereas each position is a keystroke. Then pressing down (if it does it) is a "fire" input.
I setup Front Line this way to use a joystick and it works really well. It might be the same for you...or maybe try it that way. I'm curious as well.
What does the back of the switch look like? Tabs for each position? Or is it an optical reader?
-
@hhcasey I looked at this a little more...
Here is a video describing exactly what you are trying to do. It's a little long and he uses too much game video, but you can see the menu you speak of.
So first try this.. MAME is playing in the libretro environment assuming it's using lr-MAME2010 (that's the standard for RetroPie). Start a game with a keyboard plugged in and press "scroll lock". This is mapped to the Game Focus option and is on by deafult. Hitting Scroll Lock should turn it off. See if the keys you are trying to map work now. If it didn't turn it off, you can go into the RetroArch menu while playing the game and get to it by Settings --> Input --> Hotkeys and map it to something else if need be. But it should turn it off. With Game Focus on, you loose a lot of the keyboard input as it's designed to block out hot keys so you don't press any and mess up the game play.
Try that. It might be holding you back from pressing the keys. Also... in MAME.. there is a selection in the MAME menu for keyboard type "natural" or "emulated". But I don't think that's the issue.
One last thing... maybe pick keys that are letters, rather than the keys that you are trying to use.
-
It looks like the video above is being played on a windows machine. Windows doesn't seem to be a problem because it automatically sets up devices. Linux does not. If you've ever worked on getting a spinner and a rollerball working, you'll know what I mean.
Here's a picture of the bottom of the switch.
If I open a terminal session from Emulation Station, the two switches send the correct keystrokes. If I use cat /dev/input/mice both respond. If I use cat /dev/input/mouse0 and mouse1, the controls send the correct keystroke.
When I set the run command to run verbose, I get the following:
Parameters:
Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/lib$
[INFO] RetroArch 1.8.8 (Git 9552f87)
[INFO] Redirecting save file to "/home/pi/RetroPie/roms/mame-libretro/ikari.srm$
[INFO] Redirecting save state to "/home/pi/RetroPie/roms/mame-libretro/ikari.st$
[INFO] === Build =======================================
[INFO] Capabilities: NEON VFPv3 VFPv4
[INFO] Built: Nov 2 2020
[INFO] Version: 1.8.8
[INFO] Git: 9552f87
[INFO] =================================================
[INFO] Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-mame$
[INFO] [Overrides] no core-specific overrides found at /home/pi/.config/retroar$
[INFO] [Overrides] no content-dir-specific overrides found at /home/pi/.config/$
[INFO] [Overrides] game-specific overrides found at /home/pi/.config/retroarch/$
[INFO] Config: appending config "/home/pi/.config/retroarch/config/MAME 2010/ik$
Average speed: 99.98% (37 seconds)There's no mention of mouse devices, positional devices or dials.
Sticking with Ikari, because that's what the device is made for, I can enter the MAMEUI and it's looking for 3 bits of information:
Positional Device Mouse x
Positional Inc [
Positional Dec ]This is from my desktop NOT my raspberry. The raspberry has Mouse listed but as soon as I select Positional Inc to bind it to a keystroke, the Mouse entry in Positional Device clears and the MAMEUI refuses to accept a command.
I've also tried to bind the keystroke in Retroarch for the game for player 1. The device index shows the "Ultimarc 12Way Rotary Ultimarc 12Way Rotary (#1) in the player 1 settings and (#2) in player 2. I know from setting up my spinner and trackball that the mouse index can be elusive because it doesn't match what is found in cat /dev/input/mice. So I started with 1 and worked up to 15 testing both rotary switches.
Nothing.
The only other thing I see that might not be setup correctly is when the game starts, it tells you the config override is loaded and then gives me two copies of this error message at the bottom of the screen:
Ultimarc 12Way Rotary Ultimarc 12Way Rotary (53769/1120) not configured.
Admittedly MAME2010 is very different from MAME64 but this works correctly on my desktop. The mouse can spin the character but more importantly, the [ and ] control the character correctly.
I'm running out of ideas.
-
@hhcasey Which USB port is this plugged into?
The ports matter, they are numbered. Make sure it's in the lowest, see if that helps. It helped with my Pi3 and another controller interface I had plugged in. If i put it in any other USB port than USB0, it would screw everything up.
I don't know how the Pi4 ports are numbered, because they have 2.0 and 3.0, but make sure your controller is in the lowest of all ports.
Maybe see if that helps. Other than that, I'm at a loss.
But yes, MAME for Linux/Retroarch is not the same as for Windows. Maybe in the conversion there is something that is causing an issue.
Try all the versions as well, including the FreeBurn emulators as well. See if any of them pick-up your controller.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.