Snes9x GX forked: Added Retrode 2 SNES gamepad adapter

Discussion in 'Wii - Emulation and Homebrew' started by revvv, Jul 29, 2019.

  1. Ch3ma1980

    Ch3ma1980 Newbie

    Newcomer
    1
    Aug 6, 2019
    Spain
    I usually use this ps4 controller on pc ... it would be great to implement the use of ps4 controls on your fork![​IMG]
     
    revvv likes this.
  2. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Beautifull controller!

    — Posts automatically merged - Please don't double post! —

    Excellent job, @revvv!

    You mean a wireless controller with one of those Play & Charge cables? (i think that's how they are called). Or by using the official wireless adapter?

    Never been a 360 user, though i own 1 wireless controller (unused, as i don't have any batteries, nor the adapter).
     
    Last edited by niuus, Aug 20, 2019
    revvv likes this.
  3. revvv
    OP

    revvv Member

    Newcomer
    2
    May 11, 2019
    Germany
    Maybe it's already supported by RetroArch. Check if your VID/PID appears in joypad_connection.h.

    — Posts automatically merged - Please don't double post! —

    I haven't such a thing, but if it uses the same VID/PID, it "should" work.
    A look in the Linux driver is a little bit overwhelming: There are all combinations in the wild. So it might be necessary to add additional PIDs, but without testing, it's impossible to say.
     
    Last edited by revvv, Aug 20, 2019
  4. Bladeoner

    Bladeoner GBAtemp Regular

    Member
    4
    Oct 15, 2018
    Netherlands
    Yesterday I tried to add it into Snes9x GX but it didn't work. I will test with your version to see if it works with my controller.
     
    revvv likes this.
  5. revvv
    OP

    revvv Member

    Newcomer
    2
    May 11, 2019
    Germany
    Have I told you, that in such case, you have to replug the XBOX360 controller and open the credits dialog? :yayone: [It triggers openXBOX360()]
    It shows its status in the last line and the LED1 turns on.

    At the moment I can't reproduce this case any more. LED1 is on right after startup, so you immediately know, that you don't have to replug.
     
  6. Bladeoner

    Bladeoner GBAtemp Regular

    Member
    4
    Oct 15, 2018
    Netherlands
    Tested it out, my Xbox 360, the leds start flashing and I see 0x81 but it doesn't work in game.

    I also got an empty game list I had to remove the settings.xml
     
  7. revvv
    OP

    revvv Member

    Newcomer
    2
    May 11, 2019
    Germany
    That's bad. LED1 should be on. No flashing. @niuus says the same. :cry:
    Do you have an USB drive connected? I always run Homebrew from SD card.

    I also updated my RetroArch fork. I had to disable USB completely, but this is because they have a thread trying to mount new USB drives every second. And the XBOX device class 0xff seems to be everything, this fails and USB_CloseDevice() is called, which would make the XBOX controller unusuable.
     
  8. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Yes, leds always flashing, though it always works once connected and "activated", you just can't unplug it while the emulator is on. No real reason to do that under normal conditions, but it's worth mentioning that you can't hotswap 360 gamepads. I would love to try it with 360 arcade sticks or driving controllers!
     
    Last edited by niuus, Aug 25, 2019
  9. Bladeoner

    Bladeoner GBAtemp Regular

    Member
    4
    Oct 15, 2018
    Netherlands
    Yes I always have an usb drive attached but not for the emulators and games I play from sd card.
     
  10. revvv
    OP

    revvv Member

    Newcomer
    2
    May 11, 2019
    Germany
    So how do you start a game if the game list is empty?

    I tried with an USB stick and indeed the game list is empty. Had to push Wii's off button. First push: blank screen, then had to hold off button.
    I assume that scanning for USB drives is harmful. XBOX360 has device class 0xFF which could be everything and trying to open the XBOX360 as drive results in such behavior.

    My conclusion is, that XBOX360 and USB drives cannot be supported at the same time. :cry:
     
  11. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    I think the full emulator input handling would have to be revamped in order for it to work along USB drives. Helluva job.

    At least there's 98% support for the controller, though. (sans the selective led input choice and no Menues input)
     
    Last edited by niuus, Aug 25, 2019
  12. revvv
    OP

    revvv Member

    Newcomer
    2
    May 11, 2019
    Germany
    I released a new version with minor updates:
    • Use USB_DeviceRemovalNotifyAsync() callback, but I still don't recommend to unplug your controller once it is detected. (I have simply not tested it. :D)
    • Controller status message now has three states: not found, please replug, connected
    • XBOX button to switch players: one push for next player, before it depended on how long you push the button. So it seemed like random. :evil:
    UPDATE: To generate maximum diff I cleaned up the code. :ph34r: I also noticed that if I defer the USB setup to ButtonsHeld() the gamepads are available at game startup without the need to open the credits dialog. And last but not least I added support for my Hornet gamepad, which probably no one else is using, but I love it. :wub:
     
    Last edited by revvv, Aug 26, 2019
Loading...