Skip to content

Guide:Setting up joysticks in DOSBox‐X

Wengier edited this page Sep 3, 2020 · 11 revisions

Setting up joysticks in DOSBox-X

Table of Contents

Overview

While game consoles and most home-computers back in the day had two or more Joystick ports, the IBM PC and its clones typically had none. IBM did provide a DA-15 game-port adapter option, but few people had it, or a matching PC compatible Joystick. As such most PC games are designed to be played with the keyboard, or for later games with the mouse.

The IBM game port, just the the PC, was cloned and found its way onto multi-IO cards and soundcards of the era. But even if PCs had a game port, few owned a matching joystick. And even nowadays games on the PC are often played with a keyboard and mouse.

This is also reflected in most DOS games. Joystick support is not universal, and even if the game supports a joystick, the game often has to be specifically configured for it.

The game port’s DA-15 connector includes inputs for a total of four analogue channels and four buttons. These were almost always implemented as two joysticks with two buttons each. To connect two joysticks to one port, a separate Y-splitter cable was needed.

DOSBox-X uses SDL for input, which includes gamepads. Any SDL supported gamepads will automatically become available within DOSBox-X as a joystick.

For games that do not support Joysticks natively, DOSBox-X provides the possibility to map joystick inputs to keyboard presses.

DOSBox-X config settings

This section will list the available configuration options that DOSBox-X provides that are relevant to joysticks.

[joystick] options

joystick_type

  • Default value: auto

  • Possible values: auto, none, 2axis, 2axis_2, fcs, ch

Note
If changing this setting, or if you saved the mapperfile without joystick connected or with a different joystick, remember to reset dosbox’s mapperfile. Otherwise the new setting will not work properly (or at all).

2axis

With this option, you can have two joysticks, but each joystick will only have two axis and two trigger buttons. Most PC games with joystick support are compatible with this mode.

With a modern gamepad, the two axis will be mapped to the left analogue stick. And the trigger buttons to two of the face buttons.

4axis

With this option, you can only have a single joystick, but the joystick will have four axis and four trigger buttons. Alternatively, depending on the gamepad, you can also have two axis, and six trigger buttons.

Few PC games really support more than 2 axis and 2 trigger buttons. But this mode is compatible with those games.

With a modern gamepad, the axis will be mapped to both the left and right analogue sticks. And the trigger buttons to the four face buttons.

4axis_2

Same as the 4axis option, but as the second joystick.

fcs

Emulate a legacy Thrustmaster FCS (Flight Control Stick).

Only select this option, if the game specifically supports this joystick.

Only supports one controller, with 3-axes, 4 buttons and 1 hat.

ch

Emulate a legacy CH Flightstick.

Only select this option, if the game specifically supports this joystick.

Only supports one controller, with 4-axes, 6 buttons and 1 hat. But you cannot press more than one button at the same time.

none

Disables joystick emulation.

auto

Chooses emulation depending on real joystick(s).

If only a single gamepad is detected, it will be set to 4axis. While if two gamepads are detected, it will be set to 2axis.

timed

  • Default value: true

  • Possible values: true, false

Enable timed intervals for axis. Experiment with this option, if your joystick drifts (away) or does not calibrate properly inside DOSBox-X, while it works fine outside DOSBox-X.

autofire

  • Default value: false

  • Possible values: true, false

Continuously fires as long as you keep the button pressed.

swap34

  • Default value: false

  • Possible values: true, false

Swap the 3rd and the 4th axis. can be useful for certain joysticks.

buttonwrap

  • Default value: false

  • Possible values: true, false

Enable button wrapping at the number of emulated buttons.

joy1deadzone1

  • Default value: 0.25

  • Possible values:

Deadzone for joystick 1, thumbstick 1.

joy1deadzone2

  • Default value: 0.25

  • Possible values:

Deadzone for joystick 1, thumbstick 2. Only applicable if emulating a joystick with more than 2 axis.

joy2deadzone1

  • Default value: 0.25

  • Possible values:

Deadzone for joystick 2, thumbstick 1. Only applicable if two joysticks are attached, and set to 2axis mode.

joy1response1

  • Default value: 1.00

  • Possible values:

Response for joystick 1, thumbstick 1.

joy1response2

  • Default value: 1.00

  • Possible values:

Response for joystick 1, thumbstick 2. Only applicable if emulating a joystick with more than 2 axis.

joy2response1

  • Default value: 1.00

  • Possible values:

Response for joystick 2, thumbstick 1. Only applicable if two joysticks are attached, and set to 2axis mode.

joy1axis0

  • Default value: 0

  • Possible values: 0-7

Axis for joystick 1, axis 0.

This allows to remap the axis analogue controls. For instance if you want to use the right analogue stick, instead of the left.

joy1axis1

  • Default value: 1

  • Possible values: 0-7

Axis for joystick 1, axis 1.

joy1axis2

  • Default value: 2

  • Possible values: 0-7

Axis for joystick 1, axis 2.

joy1axis3

  • Default value: 3

  • Possible values: 0-7

Axis for joystick 1, axis 3.

joy1axis4

  • Default value: 4

  • Possible values: 0-7

Axis for joystick 1, axis 4.

joy1axis5

  • Default value: 5

  • Possible values: 0-7

Axis for joystick 1, axis 5. Only applicable if emulating a joystick with more than 2 axis.

joy1axis6

  • Default value: 6

  • Possible values: 0-7

Axis for joystick 1, axis 6. Only applicable if emulating a joystick with more than 2 axis.

joy1axis7

  • Default value: 7

  • Possible values: 0-7

Axis for joystick 1, axis 7. Only applicable if emulating a joystick with more than 2 axis.

joy2axis0

  • Default value: 0

  • Possible values: 0-7

Axis for joystick 2, axis 0. Or if using 4axix_2 mode.

joy2axis1

  • Default value: 1

  • Possible values: 0-7

Axis for joystick 2, axis 1. Only applicable if two joysticks are attached, and set to 2axis mode. Or if using 4axix_2 mode.

joy2axis2

  • Default value: 2

  • Possible values: 0-7

Axis for joystick 2, axis 2. Only applicable if two joysticks are attached, and set to 2axis mode. Or if using 4axix_2 mode.

joy2axis3

  • Default value: 3

  • Possible values: 0-7

Axis for joystick 2, axis 3. Only applicable if two joysticks are attached, and set to 2axis mode. Or if using 4axix_2 mode.

joy2axis4

  • Default value: 4

  • Possible values: 0-7

Axis for joystick 2, axis 4. Only applicable if using 4axix_2 mode.

joy2axis5

  • Default value: 5

  • Possible values: 0-7

Axis for joystick 2, axis 5. Only applicable if using 4axix_2 mode.

joy2axis6

  • Default value: 6

  • Possible values: 0-7

Axis for joystick 2, axis 6. Only applicable if using 4axix_2 mode.

joy2axis7

  • Default value: 7

  • Possible values: 0-7

Axis for joystick 2, axis 7. Only applicable if using 4axix_2 mode.

[mapper] options

When using the mapper to map gamepad inputs to keyboard presses, additional deadzone options are offered.

joy1deadzone0-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 0-

joy1deadzone0+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 0+

joy1deadzone1-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 1-

joy1deadzone1+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 1+

joy1deadzone2-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 2-

joy1deadzone2+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 2+

joy1deadzone3-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 3-

joy1deadzone3+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 3+

joy1deadzone4-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 4-

joy1deadzone4+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 4+

joy1deadzone5-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 5-

joy1deadzone5+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 5+

joy1deadzone6-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 6-

joy1deadzone6+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 6+

joy1deadzone7-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 7-

joy1deadzone7+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 1, axis 7+

joy2deadzone0-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 0-

joy2deadzone0+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 0+

joy2deadzone1-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 1-

joy2deadzone1+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 1+

joy2deadzone2-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 2-

joy2deadzone2+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 2+

joy2deadzone3-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 3-

joy2deadzone3+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 3+

joy2deadzone4-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 4-

joy2deadzone4+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 4+

joy2deadzone5-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 5-

joy2deadzone5+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 5+

joy2deadzone6-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 6-

joy2deadzone6+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 6+

joy2deadzone7-

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 7-

joy2deadzone7+

  • Default value: 0.60

  • Possible values:

Deadzone for joystick 2, axis 7+

Known issues

PS3 controller

PS4 DualShock4 controller

There are three modes of operation:

  • Direct USB attached

    • It will appear as both an input device, and as an audio device.

  • Regular Bluetooth attached

    • It will work as a wireless controller. The headphone jack will not work.

  • Sony DUALSHOCK 4 USB Wireless Adapter

    • With this optional (and rather expensive) adapter, it will appear to the operating system as being USB attached with support for both input and audio.

Note
Since the DualShock4 has an integrated 3.5mm headphone jack, audio may get redirected to this headphone jack when plugged in.

On Linux the PS4 controller will immediately work when plugged in over USB, no special configuration is required. This includes the headphone jack, and the touchpad which will control the mouse.

Likewise connecting it over Bluetooth is as simple as putting the controller into pairing mode (hold the 'share' button and then the PS button, until it starts to blink rapidly), and discover it in your Bluetooth settings where it will show up as a "Wireless Controller".

On Windows it is necessary to manually install drivers. See https://github.com/Ryochan7/DS4Windows for the download and instructions.

Xbox 360 controller

The Xbox 360 Wireless controller does not work when plugged in over USB, and cannot be connected over Bluetooth.

This is a limitation of the Xbox 360 Wireless controller. Its special USB cable can only be used for charging and identification. All controller inputs are transmitted wireless using a proprietary RF protocol. As such, when used with a PC requires the Xbox 360 Wireless Gaming Receiver USB dongle.

Due to its proprietary wireless protocol, it will also not work with other Bluetooth wireless dongles like the 8BitDo Wireless USB Adapter.

The Xbox 360 Wired controller is not effected, and works when plugged in over USB.

XBox One controller

Both the XBox One Wired and Wireless controllers work when connected over USB.

For wireless, it depends on the hardware revision of the controller. Original controller models use a proprietary RF protocol and require the Xbox One Wireless Adapter USB dongle for use with a PC.

Later hardware revisions (with a 3.5mm headphone jack to the bottom of the controller), can optionally connect over Bluetooth.

Note
The USB Wireless dongles for the Xbox 360 and Xbox One controllers are not interchangeable.
Clone this wiki locally