Homepage Forums RetroPie Project Everything else related to the RetroPie Project Retrobit USB Genesis Adapter Driver Install?

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #76409
    scotty
    Participant

    I am trying to setup a Retrobit USB to Genesis Controller adapter and having no luck. I found that a driver was developed as well as a workaround to the issue that the Pi does not recognize left and up.

    https://github.com/robmcmullen/hid-atari-retrobit/blob/master/README.rst

    I am unable to compile the driver. The RetroPie image I used doesn’t have the right build modules or kernel headers (or whatever the term is) to make it work. Trying older versions of the give me an incompatible driver.

    The other workaround that I found involves recompiling the kernel by editing the hidinput driver. This seems like it would take way too long.

    Anyone have any luck with this using RetroPie that could help me out?

    #79399
    scotty
    Participant

    Ok, for anyone struggling with this adapter, I was able to get it to work by editing the /drivers/hid/hid-input.c using the “alternate method” listed in the link above. I had never compiled a kernel before, but I was able to make my way through it.

    At the end of hours and hours of compiling I had a new kernel.img file that I replaced with the edited code. I was shocked when it worked since I really had no idea what I was doing.

    I’ll try and post the edited img file for anyone else so they should be able to just copy and paste if you are using a 3.12.x Kernel rather than monkeying around and spending an entire day trying to compile linux from scratch.

    #79495
    scotty
    Participant

    File is too big, darn

    #81640
    goochbuntu
    Participant

    it was such a pain to do this i have found some interesting pages that may be of some use

    http://www.raspberrypi.org/documentation/linux/kernel/building.md

    http://www.raspberrypi.org/documentation/linux/kernel/configuring.md

    you can download the kernel here. when you get the linux kernel

    git clone –depth=1 https://github.com/raspberrypi/linux

    sudo nano /drivers/hid/hid-input.c

    ctrl w
    (copy and paste this)
    if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&

    (you will see this)

    if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
    (value < field->logical_minimum ||
    value > field->logical_maximum)) {
    dbg_hid(“Ignoring out-of-range value %x\n”, value);
    return;
    }

    now replace with you can right click to paste this below

    if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
    (value < field->logical_minimum ||
    value > field->logical_maximum)) {
    if(value < field->logical_minimum)
    value = field->logical_minimum;
    else
    value = field->logical_maximum;
    }

    ctrl x

    yes to save

    then

    make

    hopefully this helps you out.

    it took me a bit to even find this.

    if it wouldnt let you make the file like it did for me you can then do this

    sudo apt-get install libncurses5-dev

    make menuconfig

    save and exit the config
    then type

    make

    whew hopes this helps you all out.

    #81641
    goochbuntu
    Participant

    If i can pull the firmware img. file i can see if i can load it on my own server download link..

    to save everyone the time.

    #81785
    siemprepe
    Participant

    If anyone still needs a compiled kernel and modules with the fix, I have one (build on 10-16-2014). Just let me know.

    #81786
    goochbuntu
    Participant

    I couldn’t fully get it to work I’d love to get a link

    #81788
    siemprepe
    Participant

    https://dl.dropboxusercontent.com/u/4339608/raspi3.12.29.zip

    In the zip is a kernel.img file and a modules.tgz file.
    Just follow standard procedure for replacing the kernel on your pi and it should be ok.

    I used this kernel yesterday on two pies with a retropie image and it worked.

    #81790
    goochbuntu
    Participant

    thank you so much.

    #81793
    siemprepe
    Participant

    No problem, hopefully it works for you!

    #81877
    goochbuntu
    Participant

    i downloaded the kernel and mod from siemprepe

    i dropped the files in amiga folder then moved them.

    sudo mv /home/pi/RetroPie/roms/amiga/kernel.img /tmp/

    sudo mv /home/pi/RetroPie/roms/amiga/modules.tgz /tmp/

    (this brings you to step 14.
    http://sysprogs.com/VisualKernel/tutorials/raspberry/buildkernel/)

    follow the rest of the steps and you should be golden.

    cd /
    sudo mv /tmp/kernel.img /boot/
    sudo tar xzf /tmp/modules.tgz
    rm /tmp/modules.tgz

    oh by the way after you may need to move the file

    sudo mv /tmp/lib/modules/3.12.29+ /lib/modules/

    sudo reboot

    tested and works perfectly now

    thank you for the kernel build.

    #87470
    feederchain
    Participant

    So updated my pi and get the latest kernel (3.18.7). Of course the controller now doesn’t work. So I went through the steps to compile the latest kernel and modules.

    That didn’t work. So I tried to cross compile and install that. No go.

    Has anyone else tried with success, cuz I feel like an idiot that this didn’t work.

    Thanks

    This is only really an issue because I’d like to upgrade to the Pi2.

    Even tried using this tutorial, editing the source half way through.
    https://learn.adafruit.com/raspberry-pi-kernel-o-matic/build-a-kernel

    #87591
    feederchain
    Participant

    OK, after looking at the code that was changing for a bit, I noticed what was asked to be replaced above doesn’t quite match what is there. And replacing the entire thing wasn’t correct any more.

    So I’m going to suggest that only two lines need to be changed. (Which was the spirit of the suggestions above)

    The following is the snippet from the patch file.

    
    -		dbg_hid("Ignoring out-of-range value %x\n", value);
    -		return;
    +		if(value < field->logical_minimum)
    +            		value = field->logical_minimum;
    +        	else
    +            		value = field->logical_maximum;
    

    (line starting with – are being removed. + is the additions)

    Still have a problem. All the directions are pulsing very fast, when I check jstest, between 0 and 32767 (or whatever the number is). Haven’t had a chance to look into that yet.

    #87678
    feederchain
    Participant

    Found the issue. It looks like it was caused by the following commit

    https://github.com/raspberrypi/linux/commit/79346d620e9de87912de73337f6df8b7f9a46888

    In so far as if I remove that code and recompile, my controller works now.

    #91811
    ginkos
    Participant

    Hi everyone,

    I’m having the same issue as scotty’s original post. I’m using a retrolink usb to 2 SNES adapter and can’t get left and up to work.

    feederchain, would you be willing to upload the kernel you compiled for RPi2?

    #91827
    feederchain
    Participant

    Sure, you can find the latest kernel version that I created for another user last night here

    Autofire on the axis

Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.