Homebrew Snes9x GX forked: Added Retrode 2 SNES gamepad adapter

Ch3ma1980

Member
Newcomer
Joined
Aug 6, 2019
Messages
7
Trophies
0
Age
43
XP
144
Country
Spain
I usually use this ps4 controller on pc ... it would be great to implement the use of ps4 controls on your fork!
shopping
 
  • Like
Reactions: revvv

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela
I usually use this ps4 controller on pc ... it would be great to implement the use of ps4 controls on your fork!
shopping
Beautifull controller!

--------------------- MERGED ---------------------------

Added XBOX360 controller support! :toot::yayone:

For the moment I only checked in the sources. Binary will follow later.

Rumble is also possible, but I'm not sure if Snes9x GX uses this feature in games :unsure:
And by default this is for player 1 only. Maybe XBOX button could iterate through players. (LED control works, too.)

Ah yeah, I tested with the wired controller, wireless has the same VID/PID, so it should work, too.
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,
  • Like
Reactions: revvv

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
I usually use this ps4 controller on pc ... it would be great to implement the use of ps4 controls on your fork!

Maybe it's already supported by RetroArch. Check if your VID/PID appears in joypad_connection.h.

--------------------- MERGED ---------------------------

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?

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,

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
Added XBOX360 controller support! :toot::yayone:

For the moment I only checked in the sources. Binary will follow later.

Rumble is also possible, but I'm not sure if Snes9x GX uses this feature in games :unsure:
And by default this is for player 1 only. Maybe XBOX button could iterate through players. (LED control works, too.)

Ah yeah, I tested with the wired controller, wireless has the same VID/PID, so it should work, too.

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.
 
  • Like
Reactions: revvv

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
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.
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.
 

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
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.

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
 

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
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

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.
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela
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.
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,

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
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.

Yes I always have an usb drive attached but not for the emulators and games I play from sd card.
 

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
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

So how do you start a game if the game list is empty?

Yes I always have an usb drive attached but not for the emulators and games I play from sd card.

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:
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela
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:
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,

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
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,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Z @ Zurdonx: he's already banned nevermind