AmethystViper: 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.
[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=true
autofire=false
swap34=false
buttonwrap=false
AmethystViper: 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 "mapper-0.74.map" 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:
http://i.imgur.com/Ac83yEV.png 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
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.
It supports joysticks with as many as 16 axises.