spekkio
Arcane
- Joined
- Sep 16, 2009
- Messages
- 8,295
BROs, how about a nice cup of tl;dr ?
Advanced options (button / axis remapping, deadzone) for all types of joysticks / gamepads
In my case it's good old Dual Shock 2 gamepad for Playstation 2 (2 x 2axis a-stick, 10 buttons, 4-directional d-pad):
Plus simple PS2 -> USB adapter (no Win7 drivers for this bitch):
So, you have some simple gamepad, with close to zero configuration options (cheap shit, no drivers for newshit OS):
Yet you want to change some of its options? Well, it's possible...
A) Gamepad is DirectInput only, game is Xinput only
You will need an XInput emulator, preferably x360ce. Newest versions require .NET 3.5 or .NET 4.6.
Extract it to the game's .exe directory and launch. You'll get this:
Create the dll (some old games require different type / name of dll - more on this later). You can check if your pad is in the Internet database:
But most likely you'll have to configure it manually.
Before:
After:
You can map buttons in any way you want, set deadzone, sensitivity, etc., etc.:
If your game requires older/newer version of XInput .dll, there's special section for that:
That is all.
B) Gamepad is DirectInput or Xinput, game is DOS-only
You'll have to use DOSBox.
All versions of DOSBox have inbuilt Mapper, accessed by pressing CTRL+F1:
But first, enable joystick emulation in dosbox.ini:
PROTIP
If you want to use exclusive hat instructions (game supports joystick's hat and certain events ingame can be done ONLY by using the hat), switch to:
This will enable direct hat emulation:
This is not required if you want to use d-pad / hat to perform some event which is done ingame by pressing any other input device than the hat.
For example, if you want to map your "d-pad up" gamepad button to the "a" keyboard input, any joystick type will do.
Now you have to map buttons to inputs.
For example: you want to use "a" keyboard input with the "d-pad up" button (pressing "d-pad up" leads to the game receiving the "a" keyboard input).
1) Click "a" on the Mapper's keyboard display:
As you can see, "Event: key_a" ("a" keypress ingame) is bound to "a" button on real keyboard ("BIND: Key a").
2) Click "Add" to add second binding to the event:
3) Press "d-pad up" on gamepad:
That is all. Repeat with other buttons / axes.
PROTIP
In most cases, you don't need most of "virtual joystick" settings. It's better to map gamepad binds to keyboard events.
For example, Archimedean Dynasty supports 2axis analogue joystick with four fire buttons:
But what if you want to use these buttons to perform some other actions / use more buttons? Well:
1) Remove ALL "virtual joystick" binds in Mapper, except the analogue movement (Axis 1/2: X+ X- Y+ Y-):
In case of AD, it boils down to removing all "Fire" buttons (1-4), since 2nd axis isn't supported anyway. Like this:
2) Now add gamepad binds to any virtual keyboard / joystick events you want.
My Archimedean Dynasty input:
Looks like this on my gamepad:
This part:
requires two events ("left alt" & "n") bound to one bind (real gamepad's d-pad down):
This way, pressing "d-pad down" will result in pressing "alt+n" on virtual keyboard.
As you can see, I can control the game almost exclusively via gamepad...
But there's one problem with regular DOSBox... No fucking deadzone!
This is fucking outrage. In case of many games (X-wing for example) this leads to ship drifting away slightly - virtual joystick is too sensitive / real gamepad is too loose and you can do shit about it (enabling timed intervals won't help):
But there's a solution!
Just grab a special build of DOSBox from David Walter Development page:
DosBox DWD
It has some audio fixes for Terra Nova and Wizardry 6&7, but the most important thing is a joystick deadzone patch.
Just set your preferred deadzone in dosbox.conf:
From my experience, even 5% of deadzone is enough to fix the drifting in X-wing.
BTW, my X-wing gamepad input looks like this:
Only one thing left...
C) Gamepad is DirectInput or Xinput, game is Windows only
Well, now shit gets tricky... You will need two things, this:
vJoy
And also this:
Universal Joystick Remapper
How does it work? Well, when using real joystick / gamepad, stuff works like this:
And when using the above programs, it changes to something like this:
Or something.
Anyway:
1) Install vJoy. You will end up with second joystick:
2) Run "Configure vJoy" app. Enable required axes, buttons and hats:
Consult your real gamepad properties to learn what should be enabled:
Virtual pad's properties should look p. much the same as your real one's:
PROTIP
Experiment with different axes / hats in case of trouble (application doesn't recognize it). I had to use Continuous hat to make it work.
2) Extract UJR somewhere convenient. It has to be running in the background to work. Run it. Configure all axes (+ deadzone, sensitivity, etc.):
Buttons:
And hats:
You're pretty much done now. Just remember that now you have TWO gamepads, so you have to make sure that the game uses the proper one (virtual):
And not the physical one:
If the game doesn't have input device selection, you can fuck around with the default device in Win:
That allmost all. Except using normal / abnormal DOSBox.
For example, I wanted to use Daum's DOSBox for X-wing. Daum's build has additional options like quicksaves, MT-32 support and more. But it doesn't have the "deadzone" patch.
So...
D) Using vJoy with Daum's DOSBox
1) Prepare vJoy and UJR, make sure everything is configured (see above).
2) Modify dosbox.conf from:
to:
With this option, DOSBox will recognize 2 gamepads, and use the second one.
3) Launch the Mapper. vJoy should now replace your physical joystick / gamepad automagically (as long as UJR works in the background):
If you still get the real gamepad as input device, you're doing sth wrong:
Old binds (made with real gamepad) should work fine, as long as you mapped virtual buttons to corresponding real buttons (real button 1 = virtual button 1). If not, modify the bindings.
And that's p. much it:
4) Run the game:
Thanks for (not) reading.
Advanced options (button / axis remapping, deadzone) for all types of joysticks / gamepads
In my case it's good old Dual Shock 2 gamepad for Playstation 2 (2 x 2axis a-stick, 10 buttons, 4-directional d-pad):
Plus simple PS2 -> USB adapter (no Win7 drivers for this bitch):
So, you have some simple gamepad, with close to zero configuration options (cheap shit, no drivers for newshit OS):
Yet you want to change some of its options? Well, it's possible...
A) Gamepad is DirectInput only, game is Xinput only
You will need an XInput emulator, preferably x360ce. Newest versions require .NET 3.5 or .NET 4.6.
Extract it to the game's .exe directory and launch. You'll get this:
Create the dll (some old games require different type / name of dll - more on this later). You can check if your pad is in the Internet database:
But most likely you'll have to configure it manually.
Before:
After:
You can map buttons in any way you want, set deadzone, sensitivity, etc., etc.:
If your game requires older/newer version of XInput .dll, there's special section for that:
That is all.
B) Gamepad is DirectInput or Xinput, game is DOS-only
You'll have to use DOSBox.
All versions of DOSBox have inbuilt Mapper, accessed by pressing CTRL+F1:
But first, enable joystick emulation in dosbox.ini:
Code:
[joystick]
# joysticktype: Type of joystick to emulate: auto (default), none,
# 2axis (supports two joysticks),
# 4axis (supports one joystick, first joystick used),
# 4axis_2 (supports one joystick, second joystick used),
# fcs (Thrustmaster), ch (CH Flightstick).
# none disables joystick emulation.
# auto chooses emulation depending on real joystick(s).
# (Remember to reset dosbox's mapperfile if you saved it earlier)
# Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.
# timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).
# autofire: continuously fires as long as you keep the button pressed.
# swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.
# buttonwrap: enable button wrapping at the number of emulated buttons.
joysticktype=auto
timed=false
autofire=false
swap34=false
buttonwrap=false
If you want to use exclusive hat instructions (game supports joystick's hat and certain events ingame can be done ONLY by using the hat), switch to:
Code:
joysticktype=fcs
This is not required if you want to use d-pad / hat to perform some event which is done ingame by pressing any other input device than the hat.
For example, if you want to map your "d-pad up" gamepad button to the "a" keyboard input, any joystick type will do.
Now you have to map buttons to inputs.
For example: you want to use "a" keyboard input with the "d-pad up" button (pressing "d-pad up" leads to the game receiving the "a" keyboard input).
1) Click "a" on the Mapper's keyboard display:
As you can see, "Event: key_a" ("a" keypress ingame) is bound to "a" button on real keyboard ("BIND: Key a").
2) Click "Add" to add second binding to the event:
3) Press "d-pad up" on gamepad:
That is all. Repeat with other buttons / axes.
PROTIP
In most cases, you don't need most of "virtual joystick" settings. It's better to map gamepad binds to keyboard events.
For example, Archimedean Dynasty supports 2axis analogue joystick with four fire buttons:
But what if you want to use these buttons to perform some other actions / use more buttons? Well:
1) Remove ALL "virtual joystick" binds in Mapper, except the analogue movement (Axis 1/2: X+ X- Y+ Y-):
In case of AD, it boils down to removing all "Fire" buttons (1-4), since 2nd axis isn't supported anyway. Like this:
2) Now add gamepad binds to any virtual keyboard / joystick events you want.
My Archimedean Dynasty input:
Looks like this on my gamepad:
Code:
left a-stick: analogue joystick (ship's direction) [only thing controlled by analogue "virtual joystick" events]
triangle: q (afterburner)
square: enter (next torpedo)
circle: tab (fire torpedo)
cross: space (fire gun)
R1: a (max acceleration)
R2: z (max deceleration)
L1: l (lock reticle object)
L2: u (lock nearest enemy)
Select: t (lock next sensored object)
Start: p (pause)
d-pad up: n (next navpoint)
d-pad down: alt+n (lock navpoint)
d-pad left: g (lock next incoming torpedo)
d-pad right: j (lock next attacker)
right a-stick up: keypad 1 (target chase view)
right a-stick down: keypad 0 (player chase view)
right a-stick left: keypad 7 (target camera)
right a-stick right: keypad 5 (player camera)
This part:
Code:
d-pad down: alt+n (lock navpoint)
This way, pressing "d-pad down" will result in pressing "alt+n" on virtual keyboard.
As you can see, I can control the game almost exclusively via gamepad...
But there's one problem with regular DOSBox... No fucking deadzone!
This is fucking outrage. In case of many games (X-wing for example) this leads to ship drifting away slightly - virtual joystick is too sensitive / real gamepad is too loose and you can do shit about it (enabling timed intervals won't help):
But there's a solution!
Just grab a special build of DOSBox from David Walter Development page:
DosBox DWD
It has some audio fixes for Terra Nova and Wizardry 6&7, but the most important thing is a joystick deadzone patch.
Just set your preferred deadzone in dosbox.conf:
Code:
[joystick]
# deadzone: specify the percentage of motion to ignore. Use 100 for a fake digital effect.
deadzone=5
BTW, my X-wing gamepad input looks like this:
Code:
left a-stick: analogue joystick (ship's direction) [controlled by analogue "virtual joystick" events]
triangle: x (firing settings)
square: w (weapon settings)
circle: ctrl (keep pressed and use left a-stick to roll)
cross: fire [controlled by "virtual joystick" event]
L1: r (target nearest enemy)
L2: y (previous target)
R1: s (shield settings)
R2: t (next target)
Select: shift+a (assign target to wingmen)
Start: p (pause)
d-pad up: i (identification / targeting mode)
d-pad down: . (cockpit on/off)
d-pad left: f9 (laser recharge rate)
d-pad right: f10 (shield recharge rate)
right a-stick up: ; (shield energy to lasers)
right a-stick down: ' (laser energy to shields)
right a-stick left: - (decrease throttle)
right a-stick right: + (increase throttle)
Only one thing left...
C) Gamepad is DirectInput or Xinput, game is Windows only
Well, now shit gets tricky... You will need two things, this:
vJoy
So, it's basically a framework for virtual joystick.vJoy is a device driver that bridges the gap between any device that is not a joystick and an application that requires a joystick
And also this:
Universal Joystick Remapper
So, it's a virtual joystick.- Uses the free open source app vJoy to create a virtual joystick
- Configure UJR to tell it which physical joystick axis/button controls which axis/button of the virtual joystick - each axis and button of the virtual stick can be mapped to a different physical joystick
How does it work? Well, when using real joystick / gamepad, stuff works like this:
Code:
hardware (pad) -> API (DirectInput / XInput) -> software (game)
And when using the above programs, it changes to something like this:
Code:
hardware (pad) -> API (DirectInput / XInput) -> wrapper (vJoy + UJR) -> software (game)
Or something.
Anyway:
1) Install vJoy. You will end up with second joystick:
2) Run "Configure vJoy" app. Enable required axes, buttons and hats:
Consult your real gamepad properties to learn what should be enabled:
Virtual pad's properties should look p. much the same as your real one's:
PROTIP
Experiment with different axes / hats in case of trouble (application doesn't recognize it). I had to use Continuous hat to make it work.
2) Extract UJR somewhere convenient. It has to be running in the background to work. Run it. Configure all axes (+ deadzone, sensitivity, etc.):
Buttons:
And hats:
You're pretty much done now. Just remember that now you have TWO gamepads, so you have to make sure that the game uses the proper one (virtual):
And not the physical one:
If the game doesn't have input device selection, you can fuck around with the default device in Win:
That allmost all. Except using normal / abnormal DOSBox.
For example, I wanted to use Daum's DOSBox for X-wing. Daum's build has additional options like quicksaves, MT-32 support and more. But it doesn't have the "deadzone" patch.
So...
D) Using vJoy with Daum's DOSBox
1) Prepare vJoy and UJR, make sure everything is configured (see above).
2) Modify dosbox.conf from:
Code:
joysticktype=auto
to:
Code:
joysticktype=4axis_2
With this option, DOSBox will recognize 2 gamepads, and use the second one.
3) Launch the Mapper. vJoy should now replace your physical joystick / gamepad automagically (as long as UJR works in the background):
If you still get the real gamepad as input device, you're doing sth wrong:
Old binds (made with real gamepad) should work fine, as long as you mapped virtual buttons to corresponding real buttons (real button 1 = virtual button 1). If not, modify the bindings.
And that's p. much it:
4) Run the game:
Thanks for (not) reading.
Last edited: