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

    advmame, dolphin bar, and wii controller gun

    Scheduled Pinned Locked Moved Help and Support
    advmame 3.9pi4mayflashdolphin barwii controller
    13 Posts 3 Posters 1.3k 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
      painttoad
      last edited by

      are you sure that your lightgun is being seen as mouse 0? maybe its mouse 1?

      input_map[p1_lightgunx] mouse[0,x]
      input_map[p1_lightguny] mouse[0,y]

      1 Reply Last reply Reply Quote 0
      • J
        jmbooth2000 @mitu
        last edited by jmbooth2000

        @mitu When I try advm I get nothing on mouse0 when I move. Interestingly if I cat /dev/input/mouse0 it shows lots of activity so at the kernel level there is definitely action.

        One possible complication is that I have a logitec K400+ wireless keyboard which is also plugged in. That I switched the order of the usbs and it shows up a mouse1 and when I press a button / move sure enough advm see the activity as mouse1 (it works).

        I tried swapping to device_mouse raw from sdl as part of the debugging I have swapped back still nothing.

        Thanks
        Jonathan

        J 1 Reply Last reply Reply Quote 0
        • J
          jmbooth2000 @jmbooth2000
          last edited by

          @jmbooth2000 I look in the xorg logs and sure enough the wii appears with input from both js0 and mouse 0. See below. As I said it works as a mouse in X but this confirms that the hardware is working and its at least somewhat setup. I'm not sure why udev is tagging the wii remote as a joystick...

          [ 1359.980] (II) config/udev: Adding input device HJZ Mayflash Wiimote PC Adapter Mouse (/dev/input/event1)
          [ 1359.980] () HJZ Mayflash Wiimote PC Adapter Mouse: Applying InputClass "libinput pointer catchall"
          [ 1359.980] (II) Using input driver 'libinput' for 'HJZ Mayflash Wiimote PC Adapter Mouse'
          [ 1359.982] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 24 paused 0
          [ 1359.982] (
          ) HJZ Mayflash Wiimote PC Adapter Mouse: always reports core events
          [ 1359.982] () Option "Device" "/dev/input/event1"
          [ 1359.982] (
          ) Option "_source" "server/udev"
          [ 1359.986] (II) event1 - HJZ Mayflash Wiimote PC Adapter Mouse: is tagged by udev as: Mouse
          [ 1359.987] (II) event1 - HJZ Mayflash Wiimote PC Adapter Mouse: device is a pointer
          [ 1359.987] (II) event1 - HJZ Mayflash Wiimote PC Adapter Mouse: device removed
          [ 1359.987] () Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:0079:1802.0005/input/input1/event1"
          [ 1359.987] (II) XINPUT: Adding extended input device "HJZ Mayflash Wiimote PC Adapter Mouse" (type: MOUSE, id 8)
          [ 1359.987] (
          ) Option "AccelerationScheme" "none"
          [ 1359.987] () HJZ Mayflash Wiimote PC Adapter Mouse: (accel) selected scheme none/0
          [ 1359.987] (
          ) HJZ Mayflash Wiimote PC Adapter Mouse: (accel) acceleration factor: 2.000
          [ 1359.987] () HJZ Mayflash Wiimote PC Adapter Mouse: (accel) acceleration threshold: 4
          [ 1359.992] (II) event1 - HJZ Mayflash Wiimote PC Adapter Mouse: is tagged by udev as: Mouse
          [ 1359.992] (II) event1 - HJZ Mayflash Wiimote PC Adapter Mouse: device is a pointer
          [ 1359.995] (II) config/udev: Adding input device HJZ Mayflash Wiimote PC Adapter Mouse (/dev/input/js0)
          [ 1359.995] (II) No input driver specified, ignoring this device.
          [ 1359.995] (II) This device may have been added with another device file.
          [ 1359.997] (II) config/udev: Adding input device HJZ Mayflash Wiimote PC Adapter Mouse (/dev/input/mouse0)
          [ 1359.997] (II) No input driver specified, ignoring this device.
          [ 1359.997] (II) This device may have been added with another device file.
          [ 1359.999] (II) config/udev: Adding input device HJZ Mayflash Wiimote PC Adapter Consumer Control (/dev/input/event2)
          [ 1359.999] (
          ) HJZ Mayflash Wiimote PC Adapter Consumer Control: Applying InputClass "libinput keyboard catchall"
          [ 1359.999] (II) Using input driver 'libinput' for 'HJZ Mayflash Wiimote PC Adapter Consumer Control'

          Thanks for any additional help
          Jonathan

          J 1 Reply Last reply Reply Quote 0
          • J
            jmbooth2000 @jmbooth2000
            last edited by

            @jmbooth2000 Pulling my hair out here with the dolphin bar. Current advmame.rc config file is,

            device_mouse raw
            device_raw_firstkeyhack no
            device_raw_mousedev[0] /dev/input/by-id/usb-HJZ_Mayflash_Wiimote_PC_Adapter-if01-event-mouse
            device_raw_mousedev[1] /dev/input/mouse1
            device_raw_mousedev[2] /dev/input/mouse2
            device_raw_mousedev[3] /dev/input/mouse3
            device_raw_mousetype[0] ps2
            device_raw_mousetype[1] ps2
            device_raw_mousetype[2] ps2
            device_raw_mousetype[3] ps2

            When I run advm I get,
            Driver event, mouses 1
            mouse 0 '0079_1802', axes 1, buttons 0
            axe 0 [hwheel]

            Press Break to exit
            mouse 0, [], [ 0] ( 0 ms)
            which shows there are no buttons and only one axes.

            when I run "evtest /dev/input/by-id/usb-HJZ_Mayflash_Wiimote_PC_Adapter-if01-event-mouse" in another window i get,
            Input driver version is 1.0.1
            Input device ID: bus 0x3 vendor 0x79 product 0x1802 version 0x1001
            Input device name: "HJZ Mayflash Wiimote PC Adapter Mouse"
            Supported events:
            Event type 0 (EV_SYN)
            Event type 1 (EV_KEY)
            Event code 272 (BTN_LEFT)
            Event code 273 (BTN_RIGHT)
            Event code 274 (BTN_MIDDLE)
            Event code 275 (BTN_SIDE)
            Event code 276 (BTN_EXTRA)
            Event type 2 (EV_REL)
            Event code 8 (REL_WHEEL)
            Event type 3 (EV_ABS)
            Event code 0 (ABS_X)
            Value 414
            Min 0
            Max 512
            Event code 1 (ABS_Y)
            Value 358
            Min 0
            Max 400
            Event type 4 (EV_MSC)
            Event code 4 (MSC_SCAN)
            Which is total correct and better yet when I press the buttons / move the gun they update.

            Even when the are both running in parallel evtest outputs the right results and advj outputs nothing... Arg...

            Any suggestions or pointers greatly appreciated. The wii gun works perfectly with pixel and in the retroarch gui but behaves like a joystick in advmame.

            Is there anyway to get advm to output more logging? Something weird is going on as there are both pointing to the same device.

            Thanks
            Jonathan

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              You can add -log parameter to advm and it will produce an advm.log file in the current folder. Open it and paste its contents on pastebin.com.

              1 Reply Last reply Reply Quote 0
              • J
                jmbooth2000
                last edited by

                result https://pastebin.com/B83gPae7

                Some key sections pasted below - first the good news
                event: open device /dev/input/event1
                event: driver:1.0.1
                event: device vendor:0x0079 product:0x1802 version:0x1001 bus:0x0003 (usb)
                event: name:"HJZ Mayflash Wiimote PC Adapter Mouse"
                event: physical_location:"usb-0000:01:00.0-1.3/input1"
                event: EV_0x0: 0x0 0x1 0x2 0x3 0x4
                event: EV_KEY: BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_SIDE BTN_EXTRA
                event: EV_REL: REL_WHEEL
                event: EV_ABS: ABS_X[val:0,min:0,max:512,fuzz:0,flat:0] ABS_Y[val:0,min:0,max:400,fuzz:0,flat:0]
                event: EV_MSC: 0x4
                event: desc:"HJZ Mayflash Wiimote PC Adapter Mouse"

                Which seems like good news until you read on and see,
                event: open device /dev/input/event1
                mouseb:event: not a mouse on device /dev/input/event1

                Which seems to say the device on event1 isn't a mouse and explains why it doesn't treat it as a mouse. As a reminder evtest /dev/input/event1 confirms it is a mouse and detects key presses and movement correctly. It also works as a mouse in pixel and retroarch.

                Seems like either I have a weird configuration issue that is tricking advm into not recognizing this is a mouse or perhaps a software bug?

                Thanks for any help
                Jonathan

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @jmbooth2000
                  last edited by

                  @jmbooth2000 said in advmame, dolphin bar, and wii controller gun:

                  Seems like either I have a weird configuration issue that is tricking advm into not recognizing this is a mouse or perhaps a software bug?

                  Advmame doesn't consider the device a mouse, it's looking at EV_REL and not EV_ABS (https://github.com/amadvance/advancemame/blob/9873ffe3dce1e65746f88e3667e771ee5045b621/advance/linux/event.c#L2243). Looks like it's not supporting absolute pointing devices ?

                  1 Reply Last reply Reply Quote 0
                  • J
                    jmbooth2000
                    last edited by

                    Ouch. Sounds like i may be at a dead end if advmame doesn't support absolute pointing devices - argh.

                    J 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator
                      last edited by

                      Can't say for sure, but it doesn't seem to try the raw input option, which would search for /dev/input/mouseX.

                      1 Reply Last reply Reply Quote 0
                      • J
                        jmbooth2000 @jmbooth2000
                        last edited by

                        @jmbooth2000 thanks anyway.

                        1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator
                          last edited by mitu

                          That being said, you should try one of the other MAME emulators - Mame2003 has mouse support and RetroArch seems to detect your mouse. As a plus, it supports absolute pointing devices.

                          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.