Problems (#1) - wminput button matching (#79) - Message List

wminput button matching
 unsolved

Hello,

I'm using Ubuntu 7.10 and following the instructions on the ubuntuforums to get cwiid working, and it was fairly painless to get it up and running. Very cool!

But now, I'm trying to actually use it with zsnes to play some games (Mario All-stars.. I only need A+B for it :) ), and am running into something strange when configuring the buttons.

I first launch "wminput -c buttons", since I only need the buttons, and it picks up the wiimote fine and all that.

I then go into zsnes, and configure the buttons for the keyboard input, and as I go through it, I notice that the code for the right direction, button 1, and button 2 all show the same code. The up, left, down directions, and home key show up as something unique at least.

However, when I launch wmgui, all of the buttons show up correctly.

Any ideas?

Thanks, Dave

  • Message #24331

    Are you using cwiid from the Ubuntu repositories, or did you compile it yourself? The packages in the Ubuntu repositories are stale, and I've had bad luck with them recently. I haven't run into any problems with wminput when I compile it myself (I usually just check out the latest from svn).

    • Message #24332

      Ubuntu repositories :) I had a feeling that might be what it was especially when I noticed that a number of the command line options that I saw in the source didn't work!

      I'll try and build it out of SVN and see how that goes. I'm an experience embedded developer, but inexperienced with linux development and tools. Can you post what packages I need to download and how to do the build? I've seen some posts with parts of the information, but a step-by-step would be greatly appreciated :)

      Thanks! Dave

      • Message #24336

        All requirements, as well as configuration and installation instructions, are listed in the README file. Let us know if you run into any problems.

        • Message #24337

          I didn't (don't) know the names of the actual packages I need that are described in the README, but I came across this link,  https://help.ubuntu.com/community/CWiiD, and I started grabbing packages that were listed in the pre-ubuntu 7.10 instructions, and I got further along.

          the ./configure worked fine, and so I tried to build it with make. I'm now getting these errors like this when building py_plugin.c: py_plugin.c:555: error: ‘PyObject?’ undeclared (first use in this function) py_plugin.c:555: error: ‘PyObj?’ undeclared (first use in this function)

          I'm not sure if I'm missing a dependancy or something?

          Thanks, Dave

          • Message #24338

            Are you getting anything about "Python.h not found"? If so, sounds like you are missing python development packages.

            • Message #24339

              Yup, I'm getting that too so that's probably what it is. I'll check when I get home. Ubuntu comes with python 2.5 installed, and the README only indicated needing python 2.4 or greater. But I guess the dev packages are seperate.

              Thanks! Dave

              • Message #24340

                Good call - I'll fix that.

                • Message #24341

                  Cool, thanks. sudo apt-get install python-dev picked up the last missing package for me, and I was able to build it.

                  But unfortunately, I'm still getting the same problem. I grabbed 0.6rc3 (and checked that with a wminput -v, which previously didn't do anything when I used the package in the ubuntu repositories).

                  It looks like the right, +, -, 1 and 2 buttons all come up as the same key when I use wminput -c buttons and try and configure my keys with zsnes.

                  • Message #24342

                    Well, it looks like the problem may be in zsnes specifically. I wonder if it cannot handle events greater than a certain number. Based on the ones in the buttons map file, everything that's over 0x69 (which is everything except for left, up, and down) gets mapped to 0x64 (an even 100 :) ). Oh well, I guess I can make a zsnes map that the app can handle.

                    On that note... does anyone know what KEY_xxx values you would have to use to mimick the cursor keys? It doesn't appear to be KEY_LEFT, for example, but I could be wrong (I am quite new to linux).

                    Thanks, Dave

                    • Message #24348

                      To see the available button and key options for configurations, check the action_enum.txt file in the wminput source directory.

                      It looks like you're right. it should be KEY_LEFT, KEY_RIGHT, etc.

    • Message #24335

      So while waiting for a response, I started plugging away and trying to get this thing to build on my Ubuntu 7.10 machine. After running ./configure, I get this error (from the conf.log)

      Configure:2091: checking for C compiler default output file name configure:2118: gcc conftest.c >&5 /usr/bin/ld: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status

      Any ideas?

      Thanks, Dave

Attachments

No attachments created.