Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#233860 - 18/09/2004 05:42 Remapping joystick buttons by editing the registry?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Okay, I've got the perfect joystick for my PC. It's a GameCube controller plugged into the PC via the "Super Joybox 13" interface from Mayflash.

It's currently got one problem, though. I can't remap its buttons in Need For Speed Underground. Something about that stick's device driver makes it refuse to show up in the controller configuration screen in that game. I've been around in circles trying to get help from both EA Games and from Mayflash on this problem, and can't get anywhere with them.

So now what I want is an external way of altering the configuration of the joystick buttons, so I can put the throttle on button 1 instead of button 2 as it is now, and put the Nitrous on button 2 instead of button 5 as it is now. Right now button 1 is the brake, and I don't want that.

Before you start pointing me to programs like "Joy to Mouse" which will let me assign keystrokes to joystick buttons, please understand that I've been through about a dozen of these utilities, and they all have the same fatal flaw: Although they work well to allow a keystroke or mouse action to result from a button-press, they don't make the original joystick button-press disappear. So even if I remapped button 1 to be the key-uparrow command, which would apply the throttle, it would also still register as the original button 1, meaning it would apply the brake at the same time, too.

Now, I've figured out how to remap the axes of the joystick by editing the registry. Example:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
MediaProperties\PrivateProperties\Joystick\OEM\VID_0926&PID_8888\Axes\0]
@="X Axis"
"Attributes"=hex:01,81,00,00,01,00,30,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
MediaProperties\PrivateProperties\Joystick\OEM\VID_0926&PID_8888\Axes\1]
@="Y Axis"
"Attributes"=hex:01,81,00,00,01,00,31,00


If I switch that 30 and 31 around, I can swap the X-Y axis. Ditto for all six axes on the joystick.

But I can't find anywhere to do the same thing with the buttons. I've been digging through this section of MSDN trying to find the answer, but I'm not seeing it. That's where I found out where the axis information was stored, but there doesn't seem to be anything on the buttons.

Anyone got any knowledge of this stuff?
_________________________
Tony Fabris

Top
#233861 - 18/09/2004 19:00 Re: Remapping joystick buttons by editing the registry? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Aw never mind... I reverse-engineered enough of the game's configuration file to be able to remap the buttons. Couldn't figure out how to remap the joystick axes using the same technique, though. In any case, I think I'm happy with what I've got now.
_________________________
Tony Fabris

Top