[uae] Re: Joystick button mapping

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Sun, 4 Mar 2007 05:42:10 -0500

Hi Fabien

On Saturday 03 March 2007 15:50, Fabien Meghazi wrote:
> I tried input.2.joystick.0.button.X=JOY1_FIRE_BUTTON.0 but it doesn't work

What are you trying to do here?

First of all I should refer you to this mail:
//www.freelists.org/archives/uae/07-2006/msg00037.html

If you are trying to reconfigure the events produced by physical joysticks, 
then I should point out that that in the default set-up for custom 
inputdevice configurations (i.e., when input.config > 0), then both the first 
mouse and the first joystick are both configured to produce events for the 
first Amiga port (i.e., the mouse port). Yeah. That doesn't make much sense. 
The second physical joystick is disabled.

So, if you wanted to map your first joystick to port 2, then you'd need to do:
input.1.joystick.0.axis.0=JOY2_HORIZ.0
input.1.joystick.0.axis.1=JOY2_VERT.0
input.1.joystick.0.button.0=JOY2_FIRE_BUTTON.0
input.1.joystick.0.button.1=JOY2_2ND_BUTTON.0
input.1.joystick.0.button.2=JOY2_3RD_BUTTON.0

If you then wanted to map your second joystick to port 1, add
input.1.joystick.1.axis.0=JOY1_HORIZ.0
input.1.joystick.1.axis.1=JOY1_VERT.0
input.1.joystick.1.button.0=JOY1_FIRE_BUTTON.0
input.1.joystick.1.button.1=JOY1_2ND_BUTTON.0
input.1.joystick.1.button.2=JOY1_3RD_BUTTON.0

And you'd probably also want to disable the default mouse-mapping or you'd get 
conflicting events on port 1. So:
input.1.mouse.0.disabled=1

Also remember to set input.confg=1 (you're configuring the fist custom 
inputdevice set-up here with these input.1.#? options).

Cheers,
Rich

Other related posts: