Homebrew Snes9x GX forked: Added Retrode 2 SNES gamepad adapter

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
Hi folks, I'm proud to present a patched version of Snes9x GX which supports the Retrode 2: An USB adapter for the original SNES controllers:

https://github.com/revvv/snes9xgx-retrode

I published also a small test app for the SNES gamepads. (It also supports my Speedlink Hornet gamepad, which is very unlikely that you have one :lol:, so it's an undocumented feature)

As I don't have a SNES mouse I didn't add support for it. However my test app shows its output. (Contact me, tell me what you see and I'll add it to Snes9x.)
In theory it supports 4 players (2 SNES controllers and 2 Genesis controllers), but I also did not test that. I never had 4 player games back in the days...
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela
Hi folks, I'm proud to present a patched version of Snes9x GX which supports the Retrode 2: An USB adapter for the original SNES controllers:

https://github.com/revvv/snes9xgx-retrode

I published also a small test app for the SNES gamepads. (It also supports my Speedlink Hornet gamepad, which is very unlikely that you have one :lol:, so it's an undocumented feature)

As I don't have a SNES mouse I didn't add support for it. However my test app shows its output. (Contact me, tell me what you see and I'll add it to Snes9x.)
In theory it supports 4 players (2 SNES controllers and 2 Genesis controllers), but I also did not test that. I never had 4 player games back in the days...

This looks very nice for Retrode users, reminds me of how useful HID support would be. Why not make a pull request to integrate it in GX and RX?
 
Last edited by niuus,

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
This looks very nice for Retrode users, reminds me of how useful HID support would be.

Thanks :)

Why not make a pull request to integrate it in GX and RX?

I already asked before I finished my project, but he refused. That's was a pity, because I had do it all by myself. :rofl2:
On the other hand, I understand their decision: Starting support for USB gamepads is like a can of worms.
I'm surprised that Nintendont and RetroArch did it.

In RetroArch the USB support got broken for the Wii after 1.7.0 and nobody seems willing to fix it. I guess, the market is very small now :cry:
 
  • Like
Reactions: Humanity

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela
In RetroArch the USB support got broken for the Wii after 1.7.0 and nobody seems willing to fix it.
The controllers weren't detected because the PID/VID were wrong. It was fixed 18 days ago: https://github.com/libretro/RetroArch/pull/9099

I guess, the market is very small now :cry:
It is normal because of the Wii's age, though the console has proven very reliable and incredibly good for homebrew and emulation, which is why the scene is not dead, far from it.

If you want to submit a pull request to Snes9x RX, to add the Retrode support , you're more than welcome, i'll check it, compile, and approve it. I don't have the means to test it because i don't have the Retrode, but someone could check it out.
 
  • Like
Reactions: revvv

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
Thanks :)



I already asked before I finished my project, but he refused. That's was a pity, because I had do it all by myself. :rofl2:
On the other hand, I understand their decision: Starting support for USB gamepads is like a can of worms.
I'm surprised that Nintendont and RetroArch did it.

In RetroArch the USB support got broken for the Wii after 1.7.0 and nobody seems willing to fix it. I guess, the market is very small now :cry:

I will try to add it to Snes9x GX, if its added could you test it?
I don't own a Retrode 2: An USB adapter.
 
  • Like
Reactions: Maeson and revvv

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
@revvv just compiled the emulator (see attachment), could you test it?

Left out the part where you can check if its connected or not.

Thanks in advance.

Works like a charm! Thank you!

Tested with Super Mario World, Street Fighter 2, Doom and Super Bomberman.
(For 4 players you have to enable 4 controllers)

Some notes:
  • If the Retrode does not react, you just have to restart Snes9x GX. I never had to restart HBC or the Wii. This happens with my fork, too. But not very often.
  • Doom is a good testcase: My first build had a huge lag, but only with this game. After polling the Retrode only for player 1, the lag disappeared. (Doom is a single player game, so it's strange that they poll player 2.)
 

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
Works like a charm! Thank you!

Tested with Super Mario World, Street Fighter 2, Doom and Super Bomberman.
(For 4 players you have to enable 4 controllers)

Some notes:
  • If the Retrode does not react, you just have to restart Snes9x GX. I never had to restart HBC or the Wii. This happens with my fork, too. But not very often.
  • Doom is a good testcase: My first build had a huge lag, but only with this game. After polling the Retrode only for player 1, the lag disappeared. (Doom is a single player game, so it's strange that they poll player 2.)

Thank you for testing and the quick response. I will send the change in so it can be merged.

I had to adjust the code a little bit, it was not compiling Snes9x GX for the Gamecube.
 
  • Like
Reactions: Maeson

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
I was aware of that, now I really have a bad conscience :ph34r:
But as the GC has no USB ports my fork will never release GC builds...

Don't worry, the change I implement only adds the code to support Retrode in the Wii build not to the GC build, actually the GC build skips all of that. :)

You can see the changes and compare over here, I only used the code needed, left out the check:
https://github.com/dborth/snes9xgx/pull/870/commits/349b1d044050bba7cc4259ea5493bc2613491c0c
 
Last edited by Bladeoner,
  • Like
Reactions: revvv

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
Fine. Merged your ifdefs.

I just realized that I always do the USB call even if there is no Retrode present. :cry:
https://github.com/revvv/snes9xgx-retrode/commit/fe22adc7b9f8d47cdef3071c76b45995c1478880

@niuus and I invested a lot of time getting an elder devkitpro version to run with his fork on my PC. Unfortunately the USB device gets closed somewhere. So reading the Retrode right after opening works, but not in the next decodepad() call. If you have any idea where this happens...?
The Retrode is also an USB mass storage device which contains 1-3 files (Retrode config, ROM, savegame) if this information helps...
 
  • Like
Reactions: Bladeoner

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands
Fine. Merged your ifdefs.

I just realized that I always do the USB call even if there is no Retrode present. :cry:
https://github.com/revvv/snes9xgx-retrode/commit/fe22adc7b9f8d47cdef3071c76b45995c1478880

@niuus and I invested a lot of time getting an elder devkitpro version to run with his fork on my PC. Unfortunately the USB device gets closed somewhere. So reading the Retrode right after opening works, but not in the next decodepad() call. If you have any idea where this happens...?
The Retrode is also an USB mass storage device which contains 1-3 files (Retrode config, ROM, savegame) if this information helps...

Thanks for pointing to the change, I added it in my Pull Request.
 
  • Like
Reactions: revvv

revvv

Well-Known Member
OP
Newcomer
Joined
May 11, 2019
Messages
73
Trophies
0
XP
390
Country
Germany
@revvv Retrode support has been added to Snes9x GX, Tantric slightly modified the PR before merging:
https://github.com/dborth/snes9xgx/commit/4c15d552473882e559b1b829d9432cc67031524f

@niuus you could try backport the above commit into Snes9x RX and let @revvv test see if that works.

Perfect header file! Thank you. I intended to do it later, but [...whatever excuse you like..] :rofl2:
@niuus fork turns off all USB interrupts during emulation. I could not indentify what line of code is the root of all evil. This really drives me nuts.
 
  • Like
Reactions: niuus

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,454
Country
Venezuela

Bladeoner

Well-Known Member
Member
Joined
Oct 15, 2018
Messages
264
Trophies
0
Age
39
XP
1,098
Country
Netherlands

revvv

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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    Batman joined the Trans Justice League
    +2
  • Sicklyboy @ Sicklyboy:
    based af
    +2
  • Sonic Angel Knight @ Sonic Angel Knight:
    Forget the base, get on the roof.
  • K3Nv2 @ K3Nv2:
    Is that a bat in your buckle or are you just happy to have me
  • Psionic Roshambo @ Psionic Roshambo:
    Wonder "Woman" lol you wonder if they are a woman?
  • Psionic Roshambo @ Psionic Roshambo:
    The Riddler has questions...
  • K3Nv2 @ K3Nv2:
    Played a little of snow day glad I didn't spend $30
  • K3Nv2 @ K3Nv2:
    It's asthetic is okay maybe a good $10 grab
  • Psionic Roshambo @ Psionic Roshambo:
    Lol is it a game about doing cocaine?
  • K3Nv2 @ K3Nv2:
    Probably in pvp
  • Psionic Roshambo @ Psionic Roshambo:
    I tried Balders Gate II on the PS2 a few minutes ago, not bad lol
  • Psionic Roshambo @ Psionic Roshambo:
    My back catalog of games is like that scene at the end of Indiana Jones where the arc of the covenant is being stored in a giant ass warehouse
  • K3Nv2 @ K3Nv2:
    At least I can will my game catalog to family members
    +1
  • K3Nv2 @ K3Nv2:
    It's your problem now bitches
  • Psionic Roshambo @ Psionic Roshambo:
    Put it in your will that in order to receive any money they have to beat certain games, hard games and super shitty games...
  • Psionic Roshambo @ Psionic Roshambo:
    Say 20 bucks per Ninja Gaiden on the NES lol 60 bucks for all 3
  • Psionic Roshambo @ Psionic Roshambo:
    People you like "Beat level 1 of Ms Pacman" lol
  • K3Nv2 @ K3Nv2:
    Hello kitty ds is required
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Beat Celebrity Death Match on the PS1 omg tried it earlier today .... Absolutely trash
  • Psionic Roshambo @ Psionic Roshambo:
    Like -37 out of 10
  • Psionic Roshambo @ Psionic Roshambo:
    One of the worst games I have ever played
  • K3Nv2 @ K3Nv2:
    Make them rank up every cod game out
  • K3Nv2 @ K3Nv2:
    "Now I know why he took his own life"
    K3Nv2 @ K3Nv2: "Now I know why he took his own life"