[supermeatboy] buttonmap.cfg

Evandro Giovanini efgiovanini at gmail.com
Sun Jul 29 12:10:46 EDT 2012

On Wed, Dec 14, 2011 at 12:09 PM, Lubosz Sarnecki <lubosz at gmail.com> wrote:
> Hi,
> where do i change the controller button mapping? My PS3 gamepad has
> confirm on SELECT and back on LEFT ANALOG CLICK. Changing the
> buttonmap.cfg config file does not seem to influence the mapping. Also
> useanalog="false"; does not seem to do anything.

I was looking for a solution to this as well. The problem with Super
Meat Boy is that the buttonmap.cfg file only affects in-game controls,
not the menus.

You can try to figure out which button is which and remap them with
jscal, but the easiest and optimal solution for this game is to just
emulate an Xbox 360 controller using xboxdrv. So for example if your
Dual Shock 3 is /dev/input/js0, xboxdrv creates /dev/input/js1 that
maps the correspondent buttons as games expect.

xboxdrv is packaged in Debian. The options are well documented; as you
can see from the line below, I had to invert the vertical axis on both
analog sticks:

$ sudo xboxdrv -s --axismap -Y1=Y1 --axismap -Y2=Y2 -c

-c specifies the ps3 configuration file, and -s runs the program
silently so it doesn't eat up all your CPU. I'd recommend only using
-s when you've tested the program and made sure it's working.

Then to set this virtual 360 controller as your default in games use
the environment variable:
export SDL_JOYSTICK_DEVICE=/dev/input/js1

Finally, the action button is not mapped correctly in the
buttonmap.cfg file included with Super Meat Boy. To map it to the R1
button (RB on a 360 controller), change it to '6':


It's a shame joystick support doesn't "just work" on Linux, but after
banging my head a bit I was able to get it working on most games with
no additional configuration. For example, Bastion only supports the
360 controller and with xboxdrv I was able to play it just fine with
the dual shock.

Hope this helps!


More information about the supermeatboy mailing list