Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • scotty
    Participant
    Post count: 8

    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?

    scotty
    Participant
    Post count: 8

    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.

    scotty
    Participant
    Post count: 8

    File is too big, darn

    goochbuntu
    Participant
    Post count: 7

    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.

    goochbuntu
    Participant
    Post count: 7

    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.

    siemprepe
    Participant
    Post count: 4

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

    goochbuntu
    Participant
    Post count: 7

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

    siemprepe
    Participant
    Post count: 4

    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.

    goochbuntu
    Participant
    Post count: 7

    thank you so much.

    siemprepe
    Participant
    Post count: 4

    No problem, hopefully it works for you!

    goochbuntu
    Participant
    Post count: 7

    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.

    feederchain
    Participant
    Post count: 83

    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

    feederchain
    Participant
    Post count: 83

    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.

    feederchain
    Participant
    Post count: 83

    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.

    ginkos
    Participant
    Post count: 2

    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?

    feederchain
    Participant
    Post count: 83

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

    http://www.petrockblock.com/forums/topic/autofire-on-the-axis/page/2/#post-91680

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.