Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • theboat
    Participant
    Post count: 9

    I’ve gone through and installed RetroPie on my Raspberry Pi using the SD card image. I downloaded and installed all updates, as well as the xboxdrv items for my controller. When I enter the code, however, I get an error.

    This is the code I was told to use “xboxdrv -D i 0 –next-controller -i 1 –next-controller -i 2 –next-controller -i 3 –deadzone 4000 –dbus disabled &”

    The controller works but when I calibrate it with GnGEO, RetroArch, or DGen, I get a “script error”

    What am I doing wrong?

    trimmtrabb
    Participant
    Post count: 480

    Hi, try this, assuming xboxdrv is installed (sudo apt-get install xboxdrv)

    via command line or SSH run:

    sudo nano /etc/rc.local

    You need to add this line for a wireless pad:

    xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
    sleep 1

    or for a wired pad

    xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent &
    sleep 1

    just before ‘exit 0’

    so it reads:

    fi
    xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1
    exit 0

    Reboot and your pad should connect.

    Then follow post #2 in this thread to configure your pad: https://www.petrockblock.com/forums/topic/need-help-with-setting-up-retropie/

    To control Emulation Station with your Xbox pad:

    cd .emulationstation
    sudo rm es_input.cfg

    Reboot and follow the prompts on screen.

    theboat
    Participant
    Post count: 9

    I tried your method and it didn’t work. I still get a script error when trying to configure the controller for anything other than RetroArch.

    The error I get when I use “xboxdrv -D i 0 –next-controller -i 1 –next-controller -i 2 –next-controller -i 3 –deadzone 4000 –dbus disabled &” can be seen in the attached image.

    trimmtrabb
    Participant
    Post count: 480

    You don’t need to run

    xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &

    if you have edited /etc/rc.local to start xboxdrv on boot, your pad should connect automatically.

    In this thread gizmo98 confirmed the joypad config was broken and suggested this command:

    # cp /home/pi/RetroPie-Setup/supplementary/settings.xml /home/pi/supplementary/supplementary/ES-config/

    and trying the joypad config again. You will need to place a blank file ‘gngeorc’ in /home/pi/.gngeo/ and and a file ‘dgenrc’ in home/pi/RetroPie/configs/all/

    Regarding Dgen, I recommend you switch to Picodrive for Genesis emulation, it has better performance and compatibility and supports Sega CD/32X. It is also configured through Retroarch. It is the default emulator in the latest RetroPie image 1.9.1 or you can install it via the setup script. I made a guide here a while ago, should still be the same process: https://www.petrockblock.com/forums/topic/change-dgen-to-picodrive-in-retropie-image-1-7/

    theboat
    Participant
    Post count: 9

    I’m sorry but I really have no idea what any of this means. I’m pretty lost and have been following the Wiki/your instructions but still nothing. Are there other controllers that will just work with out all these lines of code? Other than the controller, everything works great. ROMs are loading fine, etc…

    trimmtrabb
    Participant
    Post count: 480

    which emulators are you wanting to run? can you confirm that your xbox pad connects properly, i.e. the first led on the home button lights up?

    peanut
    Participant
    Post count: 65

    # cp /home/pi/RetroPie-Setup/supplementary/settings.xml /home/pi/supplementary/supplementary/ES-config/

    I’m not sure what is meant by that… where is the file located that needs to be edited?

    I did some research: There seems to be a typo in two files
    (im not sure if that is the thing gizmo98 pointed out)
    First is located at:
    /home/pi/RetroPie/supplementary/ES-config/settings.xml

    <changeConfigPath from="retroarch.cfg" to="/home/pi/RetroPie/configs/all/retroarch.cfg" />
    <changeConfigPath from="dgen.cfg" to="/home/pi/RetroPie/configs/dgen/dgenrc" />
    <changeConfigPath from="gngeo.rc" to="/homepi/.gngeo/gngeorc" />

    as you can see there is a / missing between home and pi

    The same typo is is found in
    /home/pi/RetroPie-Setup/supplementary/settings.xml

    <changeConfigPath from="retroarch.cfg" to="/home/pi/RetroPie/configs/all/retroarch.cfg" />
    <changeConfigPath from="dgen.cfg" to="/home/pi/RetroPie/configs/dgen/dgenrc" />
    <changeConfigPath from="gngeo.rc" to="/homepi/.gngeo/gngeorc" />

    if both are changed you can fill in the Gngeo configuration
    it overrides the file located in /home/pi/.gngeo

    Be carefull above configuration overrides the whole file leaving you with just the joysticksettings ;o

    but the joystick settings are based on gngeo 0.7 version as the config settings joystick wise differ from the 0.85 version

    theboat
    Participant
    Post count: 9

    [quote=5196]which emulators are you wanting to run? can you confirm that your xbox pad connects properly, i.e. the first led on the home button lights up?[/quote]

    No, the center Xbox light is always flashing. And I would like to be able to run them all.

    trimmtrabb
    Participant
    Post count: 480

    [quote=5215]
    No, the center Xbox light is always flashing. And I would like to be able to run them all.
    [/quote]

    Ok, so your pad is not connecting, you will need to fix this before anything else. What type of pad is it, official? wired or wireless?

    theboat
    Participant
    Post count: 9

    [quote=5218]

    <div class=”d4p-bbt-quote-title”>theboat wrote:</div>
    No, the center Xbox light is always flashing. And I would like to be able to run them all.

    Ok, so your pad is not connecting, you will need to fix this before anything else. What type of pad is it, official? wired or wireless?
    [/quote]

    Official, wired

    trimmtrabb
    Participant
    Post count: 480

    ok i’m assuming the pad is connected directly to the pi and not through an unpowered usb hub which may cause issues. Also ensure your power supply is sufficient (a 1Amp good quality PSU)

    Then start with a new RetroPie image 1.9.1

    run:

    sudo apt-get install xboxdrv

    then you need to edit rc.local with the nano txt editor:

    sudo nano /etc/rc.local

    add this line just before exit 0:

    xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent & sleep 1

    so it reads:

    fi 
    xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent & sleep 1 
    exit 0

    (make sure you save it, ctrl-x and press y)

    then run:

    cd .emulationstation 
    sudo rm es_input.cfg

    then reboot and follow the on screen prompts.

    If you follow those instructions exactly your pad should connect on reboot and the top left led should light up instead of flashing constantly. Once you have done this we can move on to the next part.

    theboat
    Participant
    Post count: 9

    Ok, the fresh install and following your directions seemed to work. The top left (player 1) LED is now the only one lit. What would be the next step? I have already loaded various ROMs using my USB flash drive.

    trimmtrabb
    Participant
    Post count: 480

    Ok, are you able to navigate Emulation Station with your pad now?

    The next step is to set your controls up. *Most* of the emulators are configured with retroarch.cfg which is a config file located in /home/pi/RetroPie/configs/all/

    I have attached my retroarch.cfg which is setup with my Xbox 360 pad so should work with yours. You need to unzip the file & place it in /home/pi/RetroPie/configs/all/

    You should now be able to use your pad with most of the emulators including SNES, NES, Megadrive & Playstation. If you want to swap some of the buttons around you can just edit the retroarch.cfg with:

    nano /home/pi/RetroPie/configs/all/retroarch.cfg

    Also you may want to set up different configs for specific emulators, you just need to copy the retroarch.cfg and place it in the relevant folder, e.g. for Megadrive put it in /home/pi/RetroPie/configs/megadrive

    This will override the default retroarch.cfg in /home/pi/RetroPie/configs/all/

    I have set the ‘hotkey’ button to the ‘back’ button on the pad. This means that if you press the back button and specific buttons you can access different options:

    back & start = emulator exit
    back & home button = Retroarch GUI (useful for setting frameskip)
    back & left shoulder button = load save file
    back & right shoulder button = save file
    back & left trigger = select save state decrease
    back & right trigger = select save state increase

    There are other options you can configure with retroarch.cfg:
    https://github.com/libretro/RetroArch/blob/master/retroarch.cfg

    Also you may want to look at overclocking your Pi (needed for Playstation emulation and even then the Pi will struggle)

    There are a few emulators that aren’t configured through Retroarch, hopefully you can play the ones you want now.

    theboat
    Participant
    Post count: 9

    I configured the RetroArch controls through the Emulation Station and have been able to play Master System, Game Gear, SNES, NES, and Atari games without an issue. Should I still try to do it using the method above? Are there any downsides to setting up the controls through the Emulation Station interface? Everything seems to be working, oddly enough even non-RetroArch emulators (Master System, Game Gear)

    trimmtrabb
    Participant
    Post count: 480

    [quote=5243]I configured the RetroArch controls through the Emulation Station and have been able to play Master System, Game Gear, SNES, NES, and Atari games without an issue. Should I still try to do it using the method above? Are there any downsides to setting up the controls through the Emulation Station interface? Everything seems to be working, oddly enough even non-RetroArch emulators (Master System, Game Gear)[/quote]

    The Emulation Station joypad config only maps the basic buttons, the retroarch.cfg I posted has a lot more buttons configured for the Xbox pad like the hotkeys etc as I mentioned. You can backup your retroarch.cfg by renaming it retroarch2.cfg or something and copy mine over.

    theboat
    Participant
    Post count: 9

    I used these commands to create my own controls.

    cd RetroPie/emulators/RetroArch/installdir/bin

    ./retroarch-joyconfig >> ~/RetroPie/configs/all/retroarch.cfg

    I felt as if just loading yours would be cheating, since I am trying to teach myself the process. It seems everything is good, although I heard I should go into the configure file and delete certain key maps. Is this required for an Xbox 360 controller?

    trimmtrabb
    Participant
    Post count: 480

    You just insert the keymaps you want to use, you don’t need to delete any unless you’ve got conflicting keymaps. Have a look at mine for guidance. Use jtest to determine which buttons are which:

    sudo apt-get install joystick

    then run:

    jstest /dev/input/js0

    As I mentioned in the post above there are a lot more options you can configure with retroarch.cfg (anything with a # is commented out):

    https://github.com/libretro/RetroArch/blob/master/retroarch.cfg

    theboat
    Participant
    Post count: 9

    Ok, thanks a bunch!

    Last question… is it possible to sync a PS3 controller without breaking the Xbox 360 sync? So I can swap them out if need be or even use one for player 1 and the other for player 2? (I have a USB Bluetooth dongle from ASUS)

    trimmtrabb
    Participant
    Post count: 480

    Yes it is possible to use a PS3 pad and an Xbox pad at the same time. Info here of setting up a PS3 pad:
    https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-a-PS3-controller
    I think if you plug your bluetooth module in the second (lower) usb port it will be assigned /dev/input/js1 instead of js0

    So in your retroarch.cfg you would configure player 2 controls like this:

    input_player2_joypad_index = “1″
    input_player2_a_btn = “13″
    input_player2_b_btn = “14″

    etc

    Here is the list of known working bluetooth adapters: http://elinux.org/RPi_USB_Bluetooth_adapters#Working_Bluetooth_adapters

    I don’t think you will be able to hot swap the bluetooth/Xbox pad, either leave both plugged in or swap and reboot.

    ex0r
    Participant
    Post count: 26

    I’ve copied your file over replacing the one in my directory, and I still cannot get my xbox 360 controller to work inside the emulators. It doesn’t work in ANY of them. It does however work in emulation station, and I have one green light on.

    lp88
    Participant
    Post count: 5

    I am having the exact same issues. I have followed all the above instructions but I cannot get my 360 controller to run in any emulations (works fine from menu). I am new to RetroPie and would love to get this working, can anyone can help?
    Thanks.

    trimmtrabb
    Participant
    Post count: 480

    Try copying the contents and editing with nano manually rather than transferring over.

    lp88
    Participant
    Post count: 5

    Tried that, but still no joy. Thanks for the suggestion. I have also tried the setup and selected “Register controller for RetroArch emulator”. No joy again, even though it is clearly getting inputs from the controller. I am totally puzzled by this.

    trimmtrabb
    Participant
    Post count: 480

    are you getting any output when running:

    jstest /dev/input/js0

    lp88
    Participant
    Post count: 5

    I’m not sure what you mean by this command, it does not appear top be a valid command. Thanks.

    trimmtrabb
    Participant
    Post count: 480

    run this then try again:

    sudo apt-get install joystick

    lp88
    Participant
    Post count: 5

    I noticed that from your previous post, but it simply says joystick is already the newest version and jstest is not a command that I can find

    trimmtrabb
    Participant
    Post count: 480

    apologies, should be jtest not jstest

    lp88
    Participant
    Post count: 5

    mmmm, command still not found :S

    trimmtrabb
    Participant
    Post count: 480

    It is supposed to be jstest not jtest… second guessing myself

    try jstest /dev/input/js1

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