Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: Joelf on April 26, 2017, 10:30:21 PM

Title: An issue with extra controllers and a temporary solution
Post by: Joelf on April 26, 2017, 10:30:21 PM
Retropie 3: I have two DragonRise controllers in slot 0 and 1. In retroarch/emulation station they are mapped properly.

I have a usb port, and i've set it up so when I put in my two game pads, they become 0 and 1, and dragon rise becomes 2 and 3. This works well in ES and retroarch, but not in AM.

If I have sticks in those slots attract mode maps them as 2 and 3 instead of what retroarch see them as. This means if they are in the machine when AM starts, they will be given the incorrect dragon Rise mapping config, and I can't browse around attract mode.

My solution has been to always make sure they are unplugged before starting attract mode, but is there a better solution I don't know about?

Thanks.
Title: Re: An issue with extra controllers and a temporary solution
Post by: hermine.potter on April 26, 2017, 11:10:19 PM
a script, thats disable USB > starting AM > enable USB
similar this:
Code: [Select]
echo 0 > /sys/devices/platform/bcm2708_usb/buspower
attract
echo 1 > /sys/devices/platform/bcm2708_usb/buspower
Title: Re: An issue with extra controllers and a temporary solution
Post by: Joelf on April 27, 2017, 08:39:07 AM
Good plan, but it will still lead to the same issue - I need to turn on the dragon rise arcade controllers first, then the external ports after.

Does bussuspend or buspower allow me to turn on certain ports?
 
AFAIK: In AM the first joystick to be turned on is #0, but in retroarch, it doesn't care when it was plugged in, only that the JS is in the correct port.

Would this help?
   
Code: [Select]
echo suspend > /sys/bus/usb/devices/usb1/power/level   # turn off
echo on > /sys/bus/usb/devices/usb1/power/level            # turn on

So I tried turning on and off #0, but it didn't work.

These are teh USB devices I have...

(https://i.imgur.com/gsXWZdS.png)

I'm not sure if the devices have changed where they are referenced though.  I'm not sure where anything is.
Title: Re: An issue with extra controllers and a temporary solution
Post by: Joelf on May 01, 2017, 01:33:39 PM
Ok I figures this out, but not by turning on and off USB ports.

My issue was attract mode maps js0 - the dragonrise differently than the Logitech game pads. Up on the dragonrise is actually mapped as "upos" and down is "uneg". When I started attract with the Logitech game pads in up and down don't work because up isn't "upos" it's just up.

I was trying to figure out how to make it so am never used the game pads as 0 or 1 but I couldn't do it. Then I realized I don't have to turn anything off at all. I just need to map all the premutations and variations of up and down on to every joystick in the cfg.

Up is now:
Joy0 Upos
Joy0 Up
Joy0 YNeg

Etc. No more issues.