BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
643 stars 86 forks source link

Dragonrise USB encoders not working properly #114

Closed thewarroom closed 6 years ago

thewarroom commented 7 years ago

Hi Guys, running amiberry on a pi3b, retropie 4.2 usb encoders are detected however the up-down directions on the joystick won't work, left-right and buttons work fine. Any advice appreciated. Also exactly the same issue on UAE4ARM

thewarroom commented 7 years ago

is there a different type of usb encoder i can use if this issue cannot be solved?

thewarroom commented 7 years ago

i believe the dragonrise encoder is very popular with cabinet builds?

midwan commented 7 years ago

@thewarroom Hi there, thanks for the feedback. I've been away for a while due to some personal issues, but I'm slowly getting back into the project.

I'm entirely sure what that USB encoder you mention is supposed to be doing? Could you give me a little documentation on it, so I can dig through it perhaps?

midwan commented 7 years ago

@thewarroom Ping!

midwan commented 6 years ago

@thewarroom I'm assuming that Dragonrise is seen as keyboard input in the system? If so, this should be possible to use with the upcoming improvements in the controller section.

HoraceAndTheSpider commented 6 years ago

Dragon rise controllers work as a joystick.

Fixed with new control system :)

My arcade sticks appear as dragon rise so I have tested this and it is verified by users on the Facebook group

midwan commented 6 years ago

@HoraceAndTheSpider Thanks for confirming! :)

WulfmanGer commented 6 years ago

Hey,

I use an dragonrise usb encoder with recalbox and amiberry 2.1 (RPi3). Left/Right-Movement works, Button0 works (Button1 i don't know), but Up/Down doesn't work.

I've tested the amiberry 2.5beta-binary - but i can't join the config-menu (my Hotkey = F11) => back zu Emulationstation / Crash.

Dragonrise works in Emulationstations, SNES-Emulation - but Amiga ... no chance :|

Any ideas?

thx Wulfman

PS: works fine @ windows ....

HoraceAndTheSpider commented 6 years ago

I am sure this will work following the controller branch merge, but for now, could you please post a copy of your controller .cfg file from RetroArch/EmulationStation and I hope I may be able to diagnose the cause.

Thanks

WulfmanGer commented 6 years ago

I've configured @ ES: dpad up/down/left/right and A/B for the "firebuttons"

`

    <input name="b" type="button" id="1" value="1" code="289" />
    <input name="down" type="axis" id="3" value="1" code="3" />
    <input name="left" type="axis" id="0" value="-1" code="0" />
    <input name="right" type="axis" id="0" value="1" code="0" />
    <input name="up" type="axis" id="3" value="-1" code="3" />
</inputConfig>`

no RetroArch-Config.

I use this implementation from amibery into recalbox: https://github.com/Voljega/amiga4recalbox ...

HoraceAndTheSpider commented 6 years ago

Ok. For the new version you will need to create a retroarch control Config file, and this will automatically map your controller for universal use.

I can see for your above layout, your left/right are on axis 0 and you up/down are on axis 3

This won’t work in the older versions of Amiberry, because it is hard coded for axis 0/1, which explains the problem you are having.

You’ll be able fix this in the new version , as this picks up aany numbered axis for x/y separately :)

HoraceAndTheSpider commented 6 years ago

Just to clarify, to make this work you will only need one text file cfg and all will be sorted in the next version :)

HoraceAndTheSpider commented 6 years ago

Also the crash you are experiencing is likely due to a missing icon file, mentioned in another thread here on GitHub

WulfmanGer commented 6 years ago

I think RetroArch is a "problem" - or i don't understand your "solution". The Amiberry-Integration in Recalbox is not official - it don't use RetroArch (retropie does this?!). I've started amiberry directly from ES - not over RetroArch :|

WulfmanGer commented 6 years ago

ok i forgot the controller.png ;) GUI works now ... but no selectable joystick (dragon), gamepad (ps3). I need the config-file? How can i create this?

HoraceAndTheSpider commented 6 years ago

Amiberry will not require you to use RetroArch itself, so the fact you are using RecallBox will not matter. However the new version will use RetroArch "conventions" for recognition of controller layouts.

This means that just liks selecting the 'roms' path in the Amiberry Panel, there will now be a 'Controllers' Path also which can be scanned. This can use a default (from say, RetroPie) but for you, you will be ble to use a path you prefer (probably the default: amiberry/conf/controllers/)

In order to detect the unique layout of your controller/USB device it will search for a text file called DragonRise Inc. Generic USB Joystick .cfg

This file, will need to contain all of the information required to map your controller within Amiberry. We use the RetroArch 'style' for this for a more universal recognition. Therefore following these conventions here: https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration

The following would work for your device, based on what you have told me above. (at a guess) but if you have other buttons you have not previously mapped, you could add those also.

input_device = "DragonRise Inc. Generic USB Joystick "
input_driver = "udev"
input_a_btn = "0"
input_b_btn = "1"
input_down_axis = "+3"
input_up_axis = "-3"
input_left_axis = "-0"
input_right_axis = "+0"
input_x_btn = "-1"
input_y_btn = "-1"
input_select_btn = "-1"
input_start_btn = "-1"
input_l_btn = "-1"
input_r_btn = "-1"
input_enable_hotkey_btn = "-1"
input_exit_emulator_btn = "-1"
input_menu_toggle_btn = "-1"
input_reset_btn = "-1"

Hope this helps to explain.

WulfmanGer commented 6 years ago

yes - i think i understand ...

with "new version" do you means not 2.5beta (from binary - zip)? I see a screenshot from Amiberry/RetroPie -> looks completly different to "my" 2.5beta .. mhhh


I need a retroArch-Style-Inputconfig. Path to the "DragonRise Inc. Generic USB Joystick .cfg" (Spaces): /recalbox/share/emulateurs/amiga/uae4arm/conf (or ... controllers/)... voljegas Script set an ramdisk and copy all files into this. I see in putty: .cfg is in this directory.

In the Menu: "Path" -> Configurationfiles - path is correct (to the ram-drive - but .cfg is there!)

=> no Joystick under "Input" - and no function ingame

I see in evtest the name is "DragonRise Inc. Generic USB Joystick " (more spaces) ... i change name of config-file and "input_device" => no

I've added Vendor/Product (https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/DragonRise_Inc.___Generic___USB__Joystick__.cfg) input_vendor_id = 121 input_product_id = 6 => no

Mhhhh ...

I've saved the config and see: input.1.joystick.0.friendlyname=Kb Arrows as Joystick input.1.joystick.0.name=JOY0 input.1.joystick.0.empty=true input.1.joystick.1.friendlyname=DragonRise Inc. Generic USB Joystick
input.1.joystick.1.name=JOY1 input.1.joystick.1.empty=true same on input.2, 3

My PS3-Gamepad works without .cfg - directly ...

HoraceAndTheSpider commented 6 years ago

The function won’t work in v2.5

You will either need to use the”controller” branch/fork or wait for the branch to be merged... (this is planned soon)

WulfmanGer commented 6 years ago

ohhh ... ok i think we are talk about this 2.5beta - SORRY for this misunderstanding.

I've found an binary from you (@ ultimateamiga) -> IT WORKS! ;) Thanks for your help!!

Voljega commented 6 years ago

Don't worry @WulfmanGer I will update my solution as soon as 2.5 final is released ;) For now in 2.1 the right part in your generated uae for your controller is that one :

joyport1=joy0
joyport1autofire=normal
joyport1mode=djoy
joyportname1=JOY1

Some 0/1 should be different in there from what I post there.

The whole part you posted is totally useless and unused by amiberry

HoraceAndTheSpider commented 6 years ago

Since the controller branch has now been merged into the dev branch, I’m closing this.