RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Wiimote as mouse/lightgun not working

    Scheduled Pinned Locked Moved Help and Support
    wiimotewminputduckhuntlightgundolphin bar
    2 Posts 1 Posters 959 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      polygaryd
      last edited by

      Pi 4b 8gb
      cannakit psu
      Image made directly from retropie.org.uk download
      retropie 4.7.1

      retropie 4b 8gb
      sd image made from retropie.org
      retropie 4.7
      i have a usb keyboard and 2.4ghz wireless mouse (not bluetooth) plugged in while doing these tests. I have tested without the wireless mouse plugged in with same results.

      ***I am using an oem Nintendo Wii sensor bar that was modded to work in a standard usb A ports and NOT a mayflash Dolphin bar. This was done by cutting off the wii proprietary connector and soldering the wires into a usb A connector as well as removing 4 LEDs out of ten to bring the voltage down to under 5v. It works perfectly fine for wiimote tracking. ***

      Almost all the guide I see for using wiimotes in lightgun games such as duck hunt use a dolphin bar and not a standard wii sensor bar. Why am I using an oem sensor bar? Because the dolphin bar went way up in price after the tariff war with china, and I have quite a few oem wii sensor bars so why not.

      Here's what I've tried so far:

      Using wminput aka method 1 in the wiki I was able to get the wiimote to work as a mouse tilt wiimote up and down side to side left mouse button mapped to wiimote button b and right mouse button mapped to wiimote button a. The other buttons and d pad on the wiimote are mapped to keyboard keys. No thanx to the guide on using the ir tracking functions .

      You have to read up on the wminput github page as to how to get the wiimote to map as a mouse/keybpard vs a joystick. You need to use
      Plugin.acc.X = REL_X
      Plugin.acc.Y = REL_Y
      and map at least a left mouse button to a wiimote button. This turns the wiimote into a mouse/keyboard configuration and this works in lxde in the Retropie menu and in the retroarch menu in game but wont work as a controller (even though some of the buttons on the wiimote are mapped to keyboard keys and keyboard itself works) or mouse (real mouse also works fine) to use in games such as duck hunt. I've tried nestopia and fceumm emulator that comes preinstalled with retropie.

      I could also use the motion/tilt as a joystick input using :
      Plugin.ir_ptr.X = ~ABS_X
      Plugin.ir_ptr.Y = ~ABS_Y
      in the wii button mapping config file. This works in retropie menu and in the retorarch menu as well as being able to somewhat(very difficult) control a game in an emulator BUT still doesnt work as a pointer or mouse in duck hunt. So you still can't use it as a shooting device.

      I have tried a couple different emulators along with different configurations in retroarch to try to get this wiimote to work as a mouse in the duck hunt game. It works fine everywhere else as mentioned but not in the game. This is so frustrating.

      I realize I could make it work with a mayflash dolphin bar but thats not the spirit of the pi and now I'm really intrigued as to how to get this to work using the hardware currently I have. With that said please dont post "buy a dolphin bar" as that's not helpful in the least.

      1 Reply Last reply Reply Quote 0
      • P
        polygaryd
        last edited by polygaryd

        So I was able to make this work by simply unplugging the mouse from the pi, leaving the controller settings in retroarch for fceumm set to auto NOT zapper, and then under settings change zapper mode to mouse.

        My wminputA file is as follows:

        #IR for mouse REL - fps style
        #Plugin.ir_fps.X = REL_X
        #Plugin.ir_fps.Y = REL_Y

        #ir_ptr
        Plugin.ir_ptr.X = ~ABS_X
        Plugin.ir_ptr.Y = ~ABS_Y

        #custom buttons
        Wiimote.A = BTN_RIGHT
        Wiimote.B = BTN_LEFT
        Wiimote.Up = KEY_UP
        Wiimote.Down = KEY_DOWN
        Wiimote.Left = KEY_LEFT
        Wiimote.Right = KEY_RIGHT
        Wiimote.Minus = KEY_ESC
        Wiimote.Plus = KEY_ENTER
        Wiimote.Home = KEY_LEFTALT

        Wiimote.1 = KEY_LEFTCTRL
        Wiimote.2 = KEY_SPACE

        Nunchuk.C = KEY_C
        Nunchuk.Z = KEY_Z

        #plugin for nunchuk stick
        Plugin.nunchuk_kb.Up = KEY_W
        Plugin.nunchuk_kb.Down = KEY_S
        Plugin.nunchuk_kb.Left = KEY_A
        Plugin.nunchuk_kb.Right = KEY_D

        Plugin.led.Led1 = 1

        #EOF


        #IR for mouse REL - fps style
        #Plugin.ir_fps.X = REL_X
        #Plugin.ir_fps.Y = REL_Y

        works as a mouse in zapper games BUT not even close to as well as

        #ir_ptr
        Plugin.ir_ptr.X = ~ABS_X
        Plugin.ir_ptr.Y = ~ABS_Y

        so I'd use the ir_prt not ir_fps mapping.

        I've found that if you forget to unplug your mouse before you start the game you can simply unplug it and the wiimote will take over immediately as the mouse.

        If using a wireless mouse you must unplug the dongle not just turn the power off to the mouse. This could be problematic for wireless keyboard/mouse combos as you have to unplug the dongle and lose both keyboard and ouse function.

        So far I havent been able to get the hot keys to work in game (even thought they work fine in emulationstation) to exit the game and have to use the keyboard for that unless you have a gamepad installed (which doesnt interfere with the wiimote as a mouse as a zapper) then you can use the game pad to exit the game.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.