Rotary controller
Moderator: dee2eR
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Rotary controller
I fitted my joystick with a mechanical rotary accessory from Ultimarc (https://www.ultimarc.com/arcade-control ... ik-j-stik/) in the hopes of being able to enjoy some of my old arcade faves like Ikari Warriors and Heavy Barrel. However, I'm experiencing a weird issue.
It took a fair amount of reading/tinkering to even get the rotary L/R movements to register in these games, but I more or less have it working now with a reasonable (if not perfect) degree of precision. When I twist the joystick left or right using the ball-top handle, the in-game player's aim direction changes incrementally with each click, as expected.
The problem I'm having is that anytime I move the joystick, it changes the aim direction, without my even twisting the rotary knob. This effectively makes these games unplayable because I am unable to maintain aim direction while moving the joystick. Moving the joystick Up/Down/Left/Right should be independent of the rotary movement, but it appears the former is interfering with the latter.
I can reproduce this behavior when the rotary controller is disconnected. In that scenario, rotating the joystick handle has no effect, but moving the joystick causes the aim direction to change in unpredictable ways. So that tells me that joystick movement is somehow mapped to the rotary control in MAME.
In doing some research, I ran across mention of needing to either enable or disable mouse control or something along those lines, but I don't see a way to do that.
Does anyone have any suggestions to fix this issue?
It took a fair amount of reading/tinkering to even get the rotary L/R movements to register in these games, but I more or less have it working now with a reasonable (if not perfect) degree of precision. When I twist the joystick left or right using the ball-top handle, the in-game player's aim direction changes incrementally with each click, as expected.
The problem I'm having is that anytime I move the joystick, it changes the aim direction, without my even twisting the rotary knob. This effectively makes these games unplayable because I am unable to maintain aim direction while moving the joystick. Moving the joystick Up/Down/Left/Right should be independent of the rotary movement, but it appears the former is interfering with the latter.
I can reproduce this behavior when the rotary controller is disconnected. In that scenario, rotating the joystick handle has no effect, but moving the joystick causes the aim direction to change in unpredictable ways. So that tells me that joystick movement is somehow mapped to the rotary control in MAME.
In doing some research, I ran across mention of needing to either enable or disable mouse control or something along those lines, but I don't see a way to do that.
Does anyone have any suggestions to fix this issue?
Re: Rotary controller
I have no experience at all with this product. Checking the sales link you posted it seems like there's a configuration program (for Windows) for the rotary encoder - I assume it's for setting the encoder up so it doesn't interfere with anything else. Did you try that at all?
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Re: Rotary controller
Fwiw, I don’t think the rotary controller is the culprit here. I have already configured it using the WinIPAC utility to generate a particular keypress when the rotary is twisted left and another when it is twisted right, and I have confirmed that these keystroke signals register as spin-left and spin-right in multiple games, including Ikari Warriors.
To clarify, the joystick itself is just a standard joystick that is wired up thru the JAMMA interface. The rotary accessory is attached to the base of the joystick and has its own controller board that is connected to the Rpi via USB.
The reason I say the rotary controller is not the problem is because when I unplug the USB cable, which effectively takes it out of the equation, I still see in games like Ikari Warriors that simply moving the joystick up/down/left/right causes the aim direction to spin around. The rotary knob doesn’t do anything in that scenario, but it seems like the joystick is somehow behaving like a spinner (or as a mouse?) while simultaneously generating up/down/left/right movement.
The fact that the joystick is interfering with the rotary controller is the issue. So setting the rotary controller aside for now, how can I prevent standard joystick movement from changing the aim direction?
To clarify, the joystick itself is just a standard joystick that is wired up thru the JAMMA interface. The rotary accessory is attached to the base of the joystick and has its own controller board that is connected to the Rpi via USB.
The reason I say the rotary controller is not the problem is because when I unplug the USB cable, which effectively takes it out of the equation, I still see in games like Ikari Warriors that simply moving the joystick up/down/left/right causes the aim direction to spin around. The rotary knob doesn’t do anything in that scenario, but it seems like the joystick is somehow behaving like a spinner (or as a mouse?) while simultaneously generating up/down/left/right movement.
The fact that the joystick is interfering with the rotary controller is the issue. So setting the rotary controller aside for now, how can I prevent standard joystick movement from changing the aim direction?
Re: Rotary controller
That should be configurable from MAMEs menus.
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Re: Rotary controller
Thanks, dee2eR.
I think so too, but that's kind of where I'm stuck. I'll continue digging and will update this thread if I find a resolution. In the meantime, if anyone knows what MAME setting(s) in particular would apply to this case, please let me know.
Thanks again .
I think so too, but that's kind of where I'm stuck. I'll continue digging and will update this thread if I find a resolution. In the meantime, if anyone knows what MAME setting(s) in particular would apply to this case, please let me know.
Thanks again .
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Re: Rotary controller
dee2eR,
Probably the most obvious way to demonstrate the issue I'm having is to launch into the game Discs of Tron.
Granted, this game wasn't originally designed for rotary joysticks. Rather, the aim direction was controlled with a dedicated spinner. Nevertheless, the aim was intended to function independently from the controller that moves the player character in the game.
When I am in the DoT, the cursor that appears on the wall is supposed to be tied to the spinner control. However, in my case, moving my joystick left or right not only moves the in-game player, but it also moves the aim cursor position. This should not happen. Moving the joystick left or right should NOT cause the aim cursor position to change. This is the behavior I'm trying to defeat.
Unfortunately, I can't figure out the 'magical' option (or combination of options) in the MAME settings that will do this. I don't understand what is causing joystick-left/joystick-right in games like Discs of Tron, Ikari Warriors, etc. to change the aim direction.
When you run Discs of Tron, does the aim cursor position change when you move the joystick left or right?
Probably the most obvious way to demonstrate the issue I'm having is to launch into the game Discs of Tron.
Granted, this game wasn't originally designed for rotary joysticks. Rather, the aim direction was controlled with a dedicated spinner. Nevertheless, the aim was intended to function independently from the controller that moves the player character in the game.
When I am in the DoT, the cursor that appears on the wall is supposed to be tied to the spinner control. However, in my case, moving my joystick left or right not only moves the in-game player, but it also moves the aim cursor position. This should not happen. Moving the joystick left or right should NOT cause the aim cursor position to change. This is the behavior I'm trying to defeat.
Unfortunately, I can't figure out the 'magical' option (or combination of options) in the MAME settings that will do this. I don't understand what is causing joystick-left/joystick-right in games like Discs of Tron, Ikari Warriors, etc. to change the aim direction.
When you run Discs of Tron, does the aim cursor position change when you move the joystick left or right?
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Re: Rotary controller
Looks like the poster of this thread had the same issue I'm having:
https://retropie.org.uk/forum/topic/164 ... spinning/9
Unfortunately, it appears a resolution was never found.
In that scenario, a spinner is controlling the aim direction, but it's the same problem - i.e., the joystick is getting in the way.
https://retropie.org.uk/forum/topic/164 ... spinning/9
Unfortunately, it appears a resolution was never found.
In that scenario, a spinner is controlling the aim direction, but it's the same problem - i.e., the joystick is getting in the way.
Re: Rotary controller
does the rotary knob send joystick, keyboard or mouse presses? What are the actual signals sent by it? I don't have the hardware to check things but if I understand more about it may still be able to help.
- triggerhappy
- Super Contributor
- Posts: 59
- Joined: Thu Sep 17, 2020 11:49 pm
Re: Rotary controller
Problem solved!
Solution:
1. Edit AdvanceMAME config file:
2. Change the following lines:
to:
3. Save changes
Even tho I'm not using a mouse in my setup, mapping the dial controls to the mouse evidently prevents them from being mapped to the joystick. Joystick left/right no longer changes the aim direction!
Solution:
1. Edit AdvanceMAME config file:
Code: Select all
nano /home/pi/.advance/advmame.rc
Code: Select all
input_map[p1_dialx] auto
input_map[p1_dialy] auto
Code: Select all
input_map[p1_dialx] mouse[0,x]
input_map[p1_dialy] mouse[0,y]
Even tho I'm not using a mouse in my setup, mapping the dial controls to the mouse evidently prevents them from being mapped to the joystick. Joystick left/right no longer changes the aim direction!
Re: Rotary controller
Woo Hoo. I'll give this a try. Appreciate the posting.