Advmame-0.94.0 button mapping for MAME game (Forgotten Worlds) not working
Reys 128GB RetroPie image
Retropie 4.3 (I think, but "uname -a" returns retropie 4.4.13-v7)
USB Devices connected: N/A
Joysticks used: X-Arcade Tankstick
Power Supply Used: Smraza Direct 5V/2.5A with On/Off Switch
Game and Setup
Forgotten Worlds is a shooter that allows you to rotate your character to shoot in any direction.
There are three buttons: Fire, Dial Decrement, and Dial Increment.
Under the UI I have set these buttons in the "Input (this Game)" for player 1 and 2, and they work but have an additional "bug".
Whenever I Dial Decrement or Dial Increment they function as they should and the player rotates. But if I am using the joystick and moving left or right (j:stick:x+ or j:stick:x-) the player acts as though the Dial Decrement or Dial Increment is also pressed.
I searched the advmame's rc file to see if my button configs took place and to see if there are any other settings:
pi@retropie:/opt/retropie/configs/mame-advmame $ grep forgottn *
advmame-0.94.0.rc:forgottn/input_map[p1_button1] joystick_button[0,1] --Shoot player 1
advmame-0.94.0.rc:forgottn/input_map[p2_button1] joystick_button[1,1] --Shoot player 2
advmame-0.94.0.rc:forgottn/input_map[p2_dial_left] joystick_button[1,2] --Rotate left player 2
advmame-0.94.0.rc:forgottn/input_map[p2_dial_right] joystick_button[1,0] --Rotate right player 2
advmame-0.94.0.rc:forgottn/input_map[p1_dial_left] joystick_button[0,2] --Rotate left player 1
advmame-0.94.0.rc:forgottn/input_map[p1_dial_right] joystick_button[0,0] --Rotate right player 1
Anyone else have this issue? And why is the Dial(+ and -) happening (both players have this problem) when I move left or right as well as when I push the buttons to rotate?
@wiggy808 Assuming you start using a supported, real RetroPie image, you might run into this again, as MAME default mapping often includes mapping joystick digital controls to the analog inputs. "Dial" is actually an analog spinner whenever I have seen it referenced in AdvanceMAME. It looks like the mapping configuration for that game includes a digital replacement (uses the joystick, usually for users who do not have real analog controls). If you are comfortable using buttons to rotate the player, you probably just need to UNMAP the digital controls over the analog DIAL. Open the MAME GUI <TAB> menu and remap controls for THIS GAME. Find the Dial + and - line and remap to NONE (map it to the UI cancel command, often ESC). This will remove the joystick from sending inputs to the DIAL control.
@caver01 Yeah, I'm assuming (99% sure) that this is a AdvanceMAME issue and not the image issue, mostly because its specific to the controls in the rc file and has nothing to do with the file / system structure / applications installed etc.
I see what you are saying in your solution and I'll try it tonight, but I have a question. If I map the Dial + and - to NONE, wouldn't that clear out all button mapping? Or do I set it to NONE to clear out the issue, save it, then go back in and set the Dial + and - back to the buttons I desire?
I think you're saying (for player one dial left for example) its currently this in the advmame configuration files:
forgottn/input_map[p1_dial_left] joystick_button[0,2] (+ a digital replacement for joystick)
and after I set it to NONE, save it, then go back in and set it to the button I want it will be:
Is that about right?
The image is still an issue if you want support from this community.
@herb_fargus I'd like to move over to a supported image but I need help determining that the image is indeed a problem. Can anyone in the community please confirm this issue does not exist in the supported images? That would make the decision to move over to one of them much easier. Otherwise that's a lot of work for naught haha.
Thank you sir!
@wiggy808 I guess all I was saying is that it sounded like the dial increment and decrement was mapped to your joystick. That is pretty typical with MAME defaults since not everyone will have a spinner. I am not running that game to compare, but in the MAME GUI menu, if there is a rotate left and a rotate right input that is separate from the dial +- controls, map your buttons to the rotates, and leave dial mapping set to NONE.
@caver01 Yeah, I hear ya buddy, been playing with it all night to figure it out. I attached the screen shot of what I see. Dials are set to a and c for each joystick. Movement to each joystick as well. It checks out in the rc file as also (see below).
I did find this article in github that talks about this issue at the bottom in the "unmapping joysticks section".
But for whatever reason, the issue remains. I decided to grep again and paste everything set for that game, here it is:
pi@retropie:~ $ grep forgottn /opt/retropie/configs/mame-advmame/advmame-0.94.0.rc
It is interesting that the dial is "joystick_button" while the movement is "joystick_digital", which sounds correct and seems to demonstrate that it sees the joystick as digital.
Anyway, still hacking at it, no luck yet.
markwkidd last edited by markwkidd
@wiggy808 What happened when you set the Dial mappings to NONE?
Edit: You can do this by selecting something like
Dial Decin the MAME input mapper and then pressing right twice or delete twice instead of pressing a button. Right twice clears the mapping.
@markwkidd I'll try that now. I need to get my keyboard hooked back up to it, haha. Side note, the joystick setting IS set in the MAME UI under Input (general) for Dial + and - . So I'm assuming thats where the default joystick input is coming from.
For now I'll test it by setting the input of the Input (this Game) dials to NONE and see how it goes, one minute please, haha!
@markwkidd well, with them set to none, the "dial" effect is seen only during joystick inputs (when I'm moving left or right on the screen), but now the buttons obviously don't do anything and I can't rotate the guy with the buttons. Worth a shot though.
Did I test it correctly? I set Dial Inc and Dial Dec to <none> using that cool trick (worked with the X-arcade, didn't need the keyboard).
@wiggy808 by the way, your grep is finding items for forgottn, but those are only the settings that you have made that vary from the defaults. All other settings in the .rc still apply. So, the game is using all input mapping’s, and in addition, these in your grep are overriding. So, now I am wondering what else in your .rc file is setup on the dial_left and right inputs. Maybe you can pastebin your .rc instead of only sharing snippets.