What's new

Force Feedback Woes - Blight Input - Logitech Wingman

DarkJezter

New member
Hi ho everyone. Back as usual, and always excited to see all the interest the project's been enjoying. I noticed that someone had gone through the trouble of getting the force feedback working, and decided to upgrade to the latest svn of the source.

The plugin consistently fails to find the path of the event device on my system, giving the error:
Code:
Couldn't find input event for rumble support.

Anyways, after looking at the code, it appears that in Gentoo, or perhaps just with my hardware setup that the entries of the /sys/class folder differ slightly, and the following patch got the code working on my system, but will undoubtedly break the existing implementation.

I'm wondering if there's perhaps a different way that we can track down the proper device file. I mean, we could probably generalize the existing code and make it work for both systems, however, I can't help but wonder if this is inherently an unreliable way of tracking this down. Too bad there's no sign yet of force feedback support in SDL.

So here's the patch I used to get it working, if anyone else is having similar issues try the patch and leave a note on the forum here. I'm curious to see what other distributions this will/will not work with.
Code:
--- trunk/blight_input/plugin.c (revision 234)
+++ trunk/blight_input/plugin.c (working copy)
@@ -1043,10 +1043,10 @@

     while ((ep = readdir (dp)))
     {
-        if (!strncmp(ep->d_name,"input:event",11))
+        if (!strncmp(ep->d_name,"event",5))
         {
-            sscanf(ep->d_name,"input:%s",temp2);
-            sprintf(temp,"/dev/input/%s",temp2);
+            //sscanf(ep->d_name,"input:%s",temp2);
+            sprintf(temp,"/dev/input/%s",ep->d_name);
             iFound = 1;
             break;
         }
 

Richard42

Emulator Developer
Hi ho everyone. Back as usual, and always excited to see all the interest the project's been enjoying. I noticed that someone had gone through the trouble of getting the force feedback working, and decided to upgrade to the latest svn of the source.

Thanks for the info; I updated the code to work with your system as well. I actually developed this on my own Gentoo box - it had a symbolic link from the input:event* file to the event* file. It appears that your box had no such link, but now the code will work with either system.

This is probably something that's likely to change with successive kernel versions until they finally stabilize on "the one true way" to do it.
 

Richard42

Emulator Developer
BTW DarkJezter are you going to start working on the project again? You still have SVN access and I can add you to the Google Code team list if you like.
 
OP
D

DarkJezter

New member
Lol, well this is probably the opposite of what you usually hear, but I'm currently looking for full time work. My last gig went the way of the dodo, and while I'm enjoying my abundance of free time, I'm enjoying it by NOT spending all of it in front of the PC. ;)

I still interested in the project, and will be more than happy to contribute to it when I have the chance to stay on top of the development that's already in progress. I think I still want to see if I can boost any extra performance out of the mips emulation, but any work I do in that respect will probably be limited to the 32-bit dyna-rec. I've never built one myself from scratch, but I've looked at how the recompiler already works and have had a few ideas.

That is most likely the path I'll take unless I look into upgrading my mythtv box which is my primary machine I run the emulator on. Heh, if I had the hardware I'd like the chance to try get an osx build up and off the ground, but the only mac I have is an old 500Mhz powerbook with no monitor. So I wouldn't be able to much more than see if it compiles/etc.

I'm consistently impressed by the developments I've seen lately, I think a lot of overdue cleanup has been done, as well as some measures to make the emulator more accessible (like pulling the code for all the extra plugins into the trunk)

Sadly, I fear though that the biggest obstacles that the emulator faces is in refining the compatibility issues in the various video plugins. There are games that I still have to switch plugins for, and sadly, I've only a basic familiarity with opengl hardware T&L support. It'd be some time before I'd be able to contribute on those issues, and I've noticed in another thread that graphics plugins are very prone to regression. Speaking of, I'm interested in working on the regression tests you mentioned earlier. I'm thinking something roughly equiavent to a macro to load save points and take screenshots.

Sorry I'm rambling on, we'll be in touch.
 

Tillin9

Mupen64Plus Dev.
Considering my main machine is a P3, I for one would love any improvements that make the core go faster.

As far as the automated regression testing, that was my first thought too, but it seems the first round will just be game intros. Granted, there are a lot of video bugs, especially why you get to less popular games, so this should do for now.
 

Richard42

Emulator Developer
Lol, well this is probably the opposite of what you usually hear, but I'm currently looking for full time work. My last gig went the way of the dodo, and while I'm enjoying my abundance of free time, I'm enjoying it by NOT spending all of it in front of the PC. ;)

I got laid off in Jan 2003 and didn't find another job until May 2004. I was so busy working on other things for the first year that I didn't figure out how to game the system and make connections. After I discovered how to do that, the job search picked up a lot. Enjoy your time off and work on the things you want to; I rebuilt a turbo motor in my car. :)

Speaking of, I'm interested in working on the regression tests you mentioned earlier. I'm thinking something roughly equiavent to a macro to load save points and take screenshots.

I plan to write the test controller in Python; I can put it in SVN if you want. I'm going to start simple at first and just sample the screenshots at selected times from the beginning intro/title screen/demo of certain games. We could always extend the system later.
 
OP
D

DarkJezter

New member
I'm a big fan of Python, and I definitely think you should put your work in svn.

By the way, I've been playing with the debugger and have just gotten it to compile. Looks like it's in dire need of some work. Anyone else played with setting DBG=1?

If no one already has, I may just sink my teeth into getting the debugger up and running. I think it may be a nice foundation to build some tools for profiling the dyna-rec code.
 

Richard42

Emulator Developer
I'm a big fan of Python, and I definitely think you should put your work in svn.

By the way, I've been playing with the debugger and have just gotten it to compile. Looks like it's in dire need of some work. Anyone else played with setting DBG=1?

If no one already has, I may just sink my teeth into getting the debugger up and running. I think it may be a nice foundation to build some tools for profiling the dyna-rec code.

Yeah Python is great; I'll make a new tools directory to store things like this.

The Mupen64 debugger has been broken since before 0.5. I looked at it a little bit when I first started the project and it is in bad shape. It may be useful to get the debugger running again for some purposes, but not for profiling. I already added new functionality to the dynamic recompilers to assist in profiling using OProfile. That stuff should still be working. Unfortunately the profiles show that there's no major bottleneck right now, so speeding things up is going to be very difficult.
 

lifning

New member
...
I'm wondering if there's perhaps a different way that we can track down the proper device file. I mean, we could probably generalize the existing code and make it work for both systems, however, I can't help but wonder if this is inherently an unreliable way of tracking this down. Too bad there's no sign yet of force feedback support in SDL.
...
It's funny that you should mention this; it's being done as a Google Summer of Code project this year.
http://code.google.com/soc/2008/sdl/appinfo.html?csaid=B5C9E98EE23C2168
Might be worth following!
 

Top