What's new

Getting the rumble going!

sultanoswing

New member
With the latest version of Mupen64 (1.4) just released with support for the N64 rumble feature I'm interested in how to compile a kernel module which will get the force feedback working on my Thrustmaster Firestorm Dual Power 3.

According to the Mupen64 force feedback FAQ, all is working, permissions are good and the stick works without FF. The error is:

"[blight's SDL input plugin]: No rumble supported on N64 joystick #1"

Which I'm assuming is due to a lack of a kernel driver for the FF. A program, fftest, detects the stick properly, but says the rumble functions are "not defined" (http://www.koders.com/?s=features&scope=LPGUEGWYHUAYAT7AP2NNF7XSZE&la=C)

There is apparently some kernel support for the Dual Power 2 in the current kernels, but was wondering how I can use this information (http://howto.wikia.com/wiki/Howto_configure_the_Linux_kernel/drivers/usb/input) to get a module compiled which I can then modprobe or insmod?

Your help / advice much appreciated!!
 
Last edited:

Richard42

Emulator Developer
There is apparently some kernel support for the Dual Power 2 in the current kernels, but was wondering how I can use this information (http://howto.wikia.com/wiki/Howto_configure_the_Linux_kernel/drivers/usb/input) to get a module compiled which I can then modprobe or insmod?

Your help / advice much appreciated!!

Argh.. I looked into a couple of nights ago. Building a kernel is normally pretty easy, but it looks like Ubuntu discourages it altogether. There is a page here which tells you how to build a custom kernel for Ubuntu:

https://help.ubuntu.com/community/Kernel/Compile

You may be able to find out what modules are built into your kernel without building one though. Normally you would install some kernel modules, they may be called kernel-headers, kernel-devel, or kernel-source. The open a console window and 'cd /usr/src' then 'ls'. Look for a kernel source directory with the exact same name as your kernel version (which you can get with 'uname -r').

'cd' into that directory and run 'make menuconfig'. Go to Device Drivers, then HID Devices. Make sure that "USB Human Interface Device (full HID) support", "Force Feedback Support (EXPERIMENTAL)", and your Thrustmaster Firestorm are all checked. If they are all starred, then your kernel probably has it already but it doesn't work. If they are not selected then just drop a line here and I can tell you how to compile the driver into a module.
 
OP
S

sultanoswing

New member
Thanks for your expertise!!

Perhaps I should get my keyboard dirty again and go back to an 'under the hood distro' like Gentoo or Arch, where I started playing with *nix, before realising I didn't have the time to compile everything from scratch. Boy that Ubuntu wiki really didn't want n00bs like me tinkering with the motor!

To answer: the "Force Feedback Support [EXPERIMENTAL]" was not [*]'d, so your further help will be...well...helpful.

Regards (and not wanting to distract you too much from your busy schedule updating Mupen64Plus!).
 
Last edited:

Richard42

Emulator Developer
One of the reasons why Ubuntu doesn't want people building their own kernels is that they push new kernels through the software update, and if you rely on a custom-built one then you must either disable the kernel upgrades (which they also probably don't like), or else rebuild every time a new one comes down.

So the ubuntu kernel didn't have the FF driver installed. No problem, it's easy to build new modules. First, make sure you actually have the kernel source code. You can go into the /usr/src/linux-xxxxx directory and do "ls -lR |less" and look to see if you have the .c files - not just the .h headers. If not, you'll need to install the kernel source package (could be kernel-source, or linux-source, ubuntu-source or something like that).

Then go back to your config menu (sudo make menuconfig, Device Drivers, etc). Go to "USB Human Interface Device (full HID) support" and press "M" to make it build as a module. Then make sure your Force Feedback Support and Thrustmaster drivers are starred. Then exit, exit, exit, and save the config. Now all you gotta do is "sudo make" and it should build the kernel image and all the modules.

To put the module into the right place, you can either "sudo make modules_install", which will install all of the modules into /lib/modules/<version>/.... Or you can copy just the HID module (which will be located at drivers/hid/usbhid/usbhid.ko from the kernel build dir) into your own place and insmod it.

Let me know how it goes.
 

Tillin9

Mupen64Plus Dev.
Just the weigh in, compiling the "old fashioned Debian way" is very easy, especially if you're just recompiling an installed kernel which either has its config in /boot/ or /proc/config.gz support. And the kernel package integrates fine with the package manager.
 
OP
S

sultanoswing

New member
Sadly no dice...same error message.

In the end I used Tillin's method, as there was an error with the 'new' way listed on the above link. Selected the appropriate modules in kernel config, compiled successfully then copied the resultant usbhid.ko file into the modules>drivers>usb>usbhid directory of my current kernel.

Everything is still working as it was before messing about, and so nothing 'broke', but still no rumble. I wonder if this is due to the linux kernel supporting the Dual Power 2, but not the 3, in the force feedback module. Interestingly, the device is listed (lsusb) as the Dual Power 2, even though it's a 3 (and supports rumble). Somewhat annoying since the 3 has been around since about 2003.
 
Last edited:
OP
S

sultanoswing

New member
Did you 'modprobe' the new module and check 'lsmod' to make sure that it loaded before testing? Usually you have to manually load these things at first.

Not officially yet...I simply copied the new module, overwriting the old one in /lib/modules/drivers/usb/usbhid

lsmod lists the module (usbhid), but I'm not sure it's the new one.

Because I have a USB keyboard it's a little more involved, since I have to rmmod the existing one before modprobing the new one, which is hard to do when the keyboard won't type! I saw a script somewhere which automates this, so I'll give it a go tonight and report back.

EDIT:

Ok I tried using:
Code:
sudo rmmod usbhid && insmod /home/username/usbhid.ko

But came up with an error, "-1 Unknown symbol in module"

I'm gonna recompile, since they just released a different kernel version and try, try, try again!
 
Last edited:
OP
S

sultanoswing

New member
I finally got a successful compile - ended up using x64 Hardy on my laptop, and the instructions here:
http://beginlinux.com/index.php/desktop_training/ubuntu/ubfile_m/ub_compile

Booted up and (despite missing the modules for sound and wifi), got the holy grail message:

Code:
[blight's SDL input plugin]: Rumble activated on N64 joystick #1

All was enabled in the blight_input configuration window "Rumble Pack" selected etc. The stick worked and I was happily playing, but...

.....still no rumble sadly! I give up (for now ... )

Of minor possible interest to the devs, the 'Rumble' box was selected in the Blight's config page, but on loading Conker's BFD, the pub screen said "Insert Rumble Pack".

EDIT: Thanks for your advice below, nmn, I'll give it a try....the rumble didn't work on Mario 64 either though - does Mario 64 also require the rumble pack to be activated via keystroke once in-game? Is this how the rumble generally is supposed to be activated in Mupen64?
 
Last edited:

nmn

Mupen64Plus Dev.
Of minor possible interest to the devs, the 'Rumble' box was selected in the Blight's config page, but on loading Conker's BFD, the pub screen said "Insert Tumble Pack".

You likely need to assign a button to the Rumble Trigger and press it when appropriete.
 
OP
S

sultanoswing

New member
You likely need to assign a button to the Rumble Trigger and press it when appropriete.

OK! Finally got a kernel compiled with all firmware drivers and modules in place and all is working (sound, wifi, bluetooth) AND rumble!!

How is the feature supposed to work however? When I press the Rumble Pack Switch or the Memory Pack Switch buttons I've assigned, the device rumbles. It doesn't rumble when it should during gameplay however e.g. in Mario 64 with the butt-stomp, or when Conker gets knocked off the ledge by the gargoyle in scaredy birdy.
 

Richard42

Emulator Developer
I didn't know Mario 64 had rumble; I'll have to try that one. The only game that I tested with the rumble feature is Starfox 64 - crashing into things activates the rumble.

edit: I just tried Super Mario 64, and butt-stomping did not give me any rumble either. But it's working in other games, so either this SM64 ROM does not support rumble, or else it's using some different signaling mode which isn't supported by Mupen64Plus.

edit 2: This link: http://www.gamefaqs.com/console/n64/data/198848.html shows that the "rumble" version of Super Mario 64 was released only in Japan, in 1997. So the (U) rom probably doesn't support rumble.
 
Last edited:
OP
S

sultanoswing

New member
Wow - I guess it's been so long since I played my actual N64 and Mario - that Alzheimer's kicking in early!!

Thanks for the heads up, guys. I'll give it a whirl on Lilat Wars (as Starfox was known in this part of the world).

Cheers!
 
OP
S

sultanoswing

New member
Well I'll be.....working rumble!!!!!

Star Fox rumbling away perfectly. Thanks again to all you guys for your advice in this thread. I now wonder when Force Feedback will move from 'Experimental' to 'New' in the kernel so I don't have to 'roll my own' just to play Mupen with rumble - are you reading this thread, Linus?!
 

Top