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

    Driver for the Retro-Bit NES not working

    Scheduled Pinned Locked Moved Help and Support
    retro-bit nes
    10 Posts 2 Posters 483 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.
    • R
      rgrs
      last edited by

      Pi model: Pi B rev 2
      Power supply: Nokia 5V 2A
      RetroPie version: 4.4.14
      Built from: retropie-4.4-rpi1_zero.img
      USB devices connected: Retro-Bit NES Controller
      Controller used: Original NES controller
      Error messages received: No gamepad detected
      Guide used: https://github.com/msteinbeck/hid-retrobit
      Emulator: Emulation Station
      How to replicate the problem:

      I rebuild my old defective NES with an RPI and installed a clean retropie on it. I installed the drivers for the controller. They do show output when using the command: jstest /dev/input/js0

      When I start retropie, I get the message "no gamepad detected". I know this isn't the best controller, but I wanted to keep the original NES look and gamepads. Can't get them to work in retropie. I haven't looked into recompiling my own kernel yet.

      Out of the box it doesn't work at all.

      Any suggestions?

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

        @rgrs Did you copy the udev rules - as explained in the driver documentation ?

        Unfortunately, the driver hid-generic prevents hid-retrobit from binding your device. The file 99-hid-retrobit.rules contains some udev rules which unbinds all supported devices from hid-generic and rebinds them to hid-retrobit on the fly. Copy this file to /etc/udev/rules.d. To ensure the udev rules are able to rebind your devices, you finally need to copy the file hid-retrobit.conf to /etc/modules-load.d.

        1 Reply Last reply Reply Quote 0
        • R
          rgrs
          last edited by rgrs

          I did.

          I will have another go at it, as I have been messing around a lot.

          @mitu I did copy these files, however, this is for the manual installation.

          All I have to do is:

          Download the latest deb package from: https://github.com/retuxx/hid-retrobit/releases.
          Install linux headers and dkms:
          
          sudo apt-get install raspberrypi-kernel-headers dkms
          
          Install the driver:
          
          sudo dpkg -i hid-retrobit.deb
          
          Plugin your device.
          
          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @rgrs
            last edited by

            @rgrs OK, but did you check if those udev rules are added after the installation ? Maybe they're important and need to exist in order to have a functioning driver.

            R 1 Reply Last reply Reply Quote 0
            • R
              rgrs @mitu
              last edited by

              @mitu

              Before installation of the driver:

              etc/udev $ ls
              hwdb.d rules.d udev.conf

              Installation:

              udo dpkg -i hid-retrobit.deb
              Selecting previously unselected package hid-retrobit.
              (Reading database ... 96597 files and directories currently installed.)
              Preparing to unpack hid-retrobit.deb ...
              Unpacking hid-retrobit (1.0.0) ...
              Setting up hid-retrobit (1.0.0) ...

              Creating symlink /var/lib/dkms/hid-retrobit/1.0.0/source ->
              /usr/src/hid-retrobit-1.0.0

              DKMS: add completed.

              Kernel preparation unnecessary for this kernel. Skipping...

              Building module:
              cleaning build area.........
              make -j1 KERNELRELEASE=4.19.42+ -C /lib/modules/4.19.42+/build M=/var/lib/dkms/hid-retrobit/1.0.0/build..............
              cleaning build area.......

              DKMS: build completed.

              hid-retrobit:
              Running module version sanity check.

              • Original module
                • No original module exists within this kernel
              • Installation
                • Installing to /lib/modules/4.19.42+/kernel/extra/

              depmod.....

              DKMS: install completed.

              after installation:

              /etc/udev $ ls
              hwdb.d rules.d udev.conf

              So it seems there were no changes made. I will copy the files to the required dirs.

              1 Reply Last reply Reply Quote 0
              • R
                rgrs
                last edited by rgrs

                Well, I was looking in the wrong dir. But the files are there after installation

                No gamepads detected unfortunatly.

                dmesg output:

                [ 208.530291] usb 1-1.2: reset full-speed USB device number 4 using dwc_otg
                [ 209.281657] usb 1-1.2: USB disconnect, device number 4
                [ 220.180609] usb 1-1.3: new low-speed USB device number 5 using dwc_otg
                [ 220.325589] usb 1-1.3: New USB device found, idVendor=1292, idProduct=4643, bcdDevice= 2.01
                [ 220.325618] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
                [ 220.325631] usb 1-1.3: Product: NES Controller USB
                [ 220.325644] usb 1-1.3: Manufacturer: INNEX
                [ 220.351132] input: INNEX NES Controller USB as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:1292:4643.0005/input/input7
                [ 220.357206] hid-retrobit 0003:1292:4643.0005: input,hidraw0: USB HID v1.00 Gamepad [INNEX NES Controller USB] on usb-20980000.usb-1.3/input0

                Really weird: the inputs are working fine

                pi@retropie:~ $ jstest /dev/input/js0
                Driver version is 2.1.0.
                Joystick (INNEX NES Controller USB) has 2 axes (Hat0X, Hat0Y)
                and 4 buttons (BtnA, BtnB, BtnC, BtnX).
                Testing ... (interrupt to exit)
                Axes: 0:-32767 1: 0 Buttons: 0:off 1:off 2:off 3:off (Left)
                Axes: 0: 0 1: -32767 0 Buttons: 0:off 1:off 2:off 3:off (Up)
                Axes: 0:32767 1: 0 Buttons: 0:off 1:off 2:off 3:off (Right)
                Axes: 0: 0 1: 32767 0 Buttons: 0:off 1:off 2:off 3:off (Down)

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

                  The log shows the device is using the driver, jstest works, maybe SDL2 doesn't detect it. Try adding an udev rule for it - similar to what's described here. Replace Vendor/Product IDs with the values from the log. Reboot and see if it gets detected by Emulationstation.

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    rgrs @mitu
                    last edited by rgrs

                    @mitu
                    This is already in 99-hid-retrobit.rules

                    only match one vendor and product

                    ATTRS{idVendor}=="1292", ATTRS{idProduct}=="4154", GOTO="hid_retrobit_ok"
                    ATTRS{idVendor}=="1292", ATTRS{idProduct}=="4643", GOTO="hid_retrobit_ok"
                    ATTRS{idVendor}=="1292", ATTRS{idProduct}=="5346", GOTO="hid_retrobit_ok"
                    ATTRS{idVendor}=="1292", ATTRS{idProduct}=="4745", GOTO="hid_retrobit_ok"

                    Ok, I unloaded 99-hid-retrobit.rules to see what would happen. But jstest still works fine. I did not expect to see that.

                    1 Reply Last reply Reply Quote 0
                    • R
                      rgrs
                      last edited by

                      @mitu is it possible to setup the controller manuallly in retropie somehow? I can't figure out anything wrong with the driver.

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

                        @rgrs You can set it up manually, but if it's not detected by Emulationstation it will not work in it. You can however set it up in RetroArch - https://retropie.org.uk/docs/RetroArch-Configuration/#autoconfigurations. Get the button values and add them to a .cfg file named after your controller - there's an example in the doc page.

                        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.