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
391
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,455
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
391
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,455
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
391
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
391
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
391
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,455
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
391
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.
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    B @ btjunior: @Xdqwerty 16