| Home | Articles | Projects | University | Gallery | Guestbook | About |
First and foremost we need to configure our kernel. To do that, I have used a kernel version 2.6.21, although any 2.6 kernel would be all right. Basically, the USB gamepads and joysticks work using the uhid (USB Human Interface Device) in Linux, which contains support for keyboards, mouse and other USB input devices. Apart from this, to make Xmame or Dgen detect the device, we'll have to use another driver called Joystick Interface.
To let Xmame and Dgen work correctly, we need to enable the driver Joystick Interface 1.x. Any 2.6 kernel will have a 1.x or higher version of Joystick Interface driver; moreover, in the 2.6.21 kernel, actually, there's a Joystick driver 2.0. So we just need now to enable the following options in our menuconfig:
With this, basically, that's all. Now we recompile the kernel and reboot the system to use the new code. Needless to say, the fanatics of modules can build everything separately in modules and then load them without any problem. I do it this way because I like to include everything in kernel since I do an intensive use of everything.
Once we have our new kernel up and running, we have to install the package joystick, which will provide the userland support for gamepads and joysticks. In Debian, just do as it follows:
Alternatively, you can use a software named jscalibrator to calibrate the joysticks and gamepads. However, many modern games (such as TORCS) have a built-in gamepad calibrator.
I only use it with xmame and dgen emulators. To use it with other programs you'd need to read the manual or surf a bit on Internet. I'll explain how to use the gamepad with the two emulators mentioned above.
Just that. To use it with the dgen emulator you'll need to do:
Notice that you will have to manually edit your ~/.dgenrc in order to set up the keymap for other users.