It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

high rated
This is something that has been bugging me whenever I see a problem concerning DOSBox and being able to use a Xbox 360 or XInput controllers to play older DOS games. Usually when this problem crops up, the most common answer I see is "use programs like Xpadder or JoyToKey" to get around this. The thing is the answer is already within DOSBox, it just requires a few config edits.

# 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.

Here are the default settings DOSBox's joystick settings, but the glaring problem these settings for Xbox 360 or XInput controllers is not being able to use the D-Pad and the analog stick not working properly. After fiddling around the settings and looking up the solutions to these problems, these are the settings I use for some of the DOS games I play under DOSBox. You might also want to reset the mapper file (usually it's "" by default for v0.74) or delete it before you change anything; you can save a new one once you made the appropriate changes. What you need to do is set "joysticktype" to fcs and "timed" needs to be set to false. By doing this, your D-Pad should work (thanks to [fcs] enabling the D-Pad/Hat swtiches) and the analog sticks won't drift away (caused by "timed" being set to [true]).

Now what if a particular game doesn't give you the ability to rebind the inputs for the controller or calibrate the analog sticks, either in-game or as a separate set-up program? This is where DOSBox's keymapper comes in (special thanks to F4LL0UT for this). By pressing Ctrl+F1, you'll get a screen like this: </span> The keymapper is kinda like DOSBox's Xpadder though not as advanced but gets the job done for the most part. If you want to bind a certain key to a controller input, let's say binding the arrow keys to the Xbox 360's controller's D-Pad, first you click the key on the on-screen keyboard for the arrow keys, then click on "Add" on the menu where you will be prompt to add another input to the command (e.g. bind Arrow Key Up to D-Pad Up, Return/Enter Key to Start, Gamepad Button 1 on the Xbox 360 controller's A Button). The same can be done for keyboard inputs, like mapping WASD to the Arrow Keys for [url=]Abuse.

Unfortunately this isn't the "end-all-be-all" solution for rebinding inputs on a controller. So far this worked on some fighting games like One Must Fall 2097 or Super Street Fighter II: Turbo, shoot 'em ups like Tyrian 2000, and platformers Jill of the Jungle or Genocide 2: Master of the Dark Communion. Older first-person shooter games like Doom aren't to keen when it comes to rebindable inputs for a controller as the horizontal axis on the right stick doesn't work for some reason; the SVM Duam build does get around this but for some reason I can't sprint and shoot at the same time (it could be something I did with the config file though). There's also the inability to rebind mouse inputs such as the left or right click, mouse movement, and the scroll wheel on the original DOSBox's keymapper, so you're out of luck for point-and-click games or if you're planning to play Abuse on a controller unless you get Xpadder or similar programs.

I hope this can help some people out with playing games on DOSBox.
Really great post! I've looked into a few different topics trying to get xbox 360 controllers to play Commander Keen (among other things) and this worked like a charm.

Thank you for this.
Well, tried that, didn't work. I keep my analog sticks and d-pad not working.
My DOSBox build (DOSBox ECE) now supports all the axis (up to ten) and the hat (up to two) even when joysticktype isn't set to fcs. So you should be able to use/map it even with default config.
This is all a bit confusing at first. I wanted to use the D-Pad on my X360 controller to control DOS games, just like an old-fashioned Gravis gamepad.

The problem: By default, Dosbox assigns the left analog stick as the main controller axis. This cannot be changed in the config. For most games, this means you cannot use the D-Pad to control the game natively.

The solution: Your only option is to switch your game to keyboard mode, then remap the keyboard arrow keys to your D-Pad using the DOSBox mapper tool. Start DOSBox, press CTRL+F1 to bring up the mapper tool, click one of the arrow keys in the upper right corner, click "add" at the bottom, then press the corresponding direction on the D-Pad. Repeat for the other directions, then click "save" at the bottom. As the game is now in keyboard mode, you will also have to remap all the remaining keyboard actions to the controller.

I know this has already been described at the beginning, I just wanted to give a quick explanation and solution for anyone who has the same problem.
Post edited April 15, 2018 by jballhgg