[uae] Re: Joystick Configuration

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 2 Dec 2004 01:20:08 -0500

Hi Floyd

On Tuesday 30 November 2004 10:21 pm, Floyd Resler wrote:
> I'm happy to report that my favorite shoot 'em game of all time, Deluxe
> Galaga, works great with E-UAE!  However, is there any way to change the
> fire button key?  It is currently mapped to the 5 key on the keypad - makes
> it kind of hard to play.

Joystick emulation can be set with the options:

joyport0=
joyport1=

Both of these options accept the same range of values:

joy0  - get input from the first joystick on the host 
joy1  - get input from the second joystick on the host
mouse - get input from mouse pointer movements 
kbd1  - emulate joystick input with the keypad
kbd2  - emulate joystick input with Right Ctrl or Right Alt for fire
kbd3  - emulate joystick input with the keys T,F,H,B and Left Alt for fire

The option 'joyport0=' option configures the Amiga mouse port. It defaults to 
'mouse' what is generally what you want. 'joyport1=' configures the joystick 
port. It now defaults to 'joy0' if you have a joystick or 'kbd1' if you 
don't.

The 'kbd2' layout isn't useful with the OS X version at the moment. The 
problem at the moment - as I understand it - is that OS X 10.2 reports the 
same keycodes for both the left and right flavours of the Ctrl, Shift, Alt 
and Option keys - and so SDL doesn't distinguish between them either. AFAIK, 
this will be fixed when SDL 1.2.8 is available and if you're using OS 10.3.


In theory it should be possible to completely redefine all the keys with E-UAE 
when using raw key-mapping (set sdl.map_raw_keys=true), but this isn't 
currently working at the moment (and even if it did, it'd currently be pig to 
configure with some kind of GUI to do it).

You should be able to do things like:

input.1.keyboard.0.button.38=KEY_B.0

If it worked, on Linux this would make the A key produce a B key press (under 
OS X the keycode for A is 0, so you'd replace the 38 with 0).

More interestingly, you could assign joystick events to keys:

input.1.keyboard.0.button.36=JOY2_FIRE_BUTTON.0

This should, on Linux, make the enter key emulate a fire button on the 
joystick port.


I need to have a sit down and think about how to improve the keymap stuff - 
and how to get the configuration working.

Cheers,
Rich

Other related posts: