Advmame - saving controller input settings

I’m trying to setup a PS3-like controller. The Shanwan USB Twin Joystick. The DPAD values are detected as hat values. How do we save hat values to the advmame.rc? I could not find any information regarding it. Once I know I will be able to modify the advmame input script to work with hat values.

Ok so I found the config value for the dpad needed to be stick4 so for up the follow config was needed.


What do you think would be the best way of detecting the dpads stick mechanism? Should it be added to the input config, what if a controller doesn’t recognize the input or it’s different? Should we just have it anyway?

I stumbled onto this issue when I was doing to auto config script, the way I did it was to configure my gamepad in AdvMame and tried to copy the values from there, but as for your question, I am not sure I have a solution. As you can see on my auto config script, the analogs seem to be the ones used and not the dpads, which should be fixed, yet I do not know how, way too many different gamepads in the market with different values.

Think I have a solution. In set_advmame_joy I changed it so it looks for in “/storage/.advance” the presence of a file the user can add: “ADD_DPAD” and it will check the value, and add it to the “stick” value. So all the user will need to do say for DPAD stick4 is:

echo 4 > /storage/.advance/ADD_DPAD

Then the will add the correct configs to advmame.rc. I can make a PR, just got to test it make sure it works ok.

I made a pull see: