PC ver. Suggestion - Custom Device Profiles

JJaVMeTaL, OpenELEC is really great as a media center: http://openelec.tv/

The generic OSS version uses the open source radeon drivers which should give us access to KMS mode, provided we can find out how to compile RetroArch and make the OS do the necessary things through XBMC (shut down XBMC and X, run RetroArch, then launch XBMC again).

Thanks man, i know about OpenELEC and XBMC stuff, on my Win7 i´ve got XBMC+Advanced Launcher to get Retroarch working (dont know why theres so much people complaining this days about the GUI when with a few steps you can get an awesome interface to get your roms working).

I think i´ll try Ubuntu, a few years ago i started using it, so now the wait to have some files to install with this thing and start testing it!

Best regards,

@JJaVMeTaL Ubuntu is super-easy to get going and I have packages in my Launchpad PPA for RetroArch and the various libretros. Once you get the system installed, open a terminal and type:

sudo add-apt-repository ppa:hunter-kaller/ppa
[enter your password]
sudo apt-get update && sudo apt-get install retroarch retroarch-phoenix libretro-*

I don’t have my packages up for Raring Ringtail yet (13.04; it was just released a couple of days ago), but I plan to get them up tomorrow.

I will install Ubuntu 13.04 today or tomorrow, so if you get your repository ready i will try it and start testing everything :slight_smile:

Best regards,

Sorry to hijack/piggbacky the thread, but I figured the idea is somewhat related. First off, just want to say that I think the retroach/libretro project is something the emulation community has desperately needed. It’s a brilliant idea and I’m thankful to all the people contributing! Now onto the suggestion:

Earlier in the thread, hotplugging on Windows was mentioned. I’d like to help test if anyone is willing to tackled this. Unfortunately, I’m not much of a coder, my skills lie on the database side of things.

I’ve been searching for workarounds, hacks, etc. to standardize controller hot plugging for the various emulators I use. Looked at Xpadder, ppjoy, vJoy, etc. While they do work in some fashion, limits do exist and the solution lacks the cohesiveness of native controller support. Since stumbling upon Retroarch, I was thrilled to find a one stop shop for all my emulators, where the inputs are mapped once and used for all the cores (hotplugging issue aside). So much configuring, instantly solved. Retroarch already being leauges above the rest, adding hotplugging functionality would really give it the local multiplayer experience we all grew up with!

I have no idea what goes into patching for hotplugging, but I imagine its not simple. I’m not sure how everyone feels about workarounds / hacks being implemented to emulate such a feature, but here’s a suggestion:

Use case: I have four 360 controllers pre-configured for retroarch, but I’m currently only have one turned on. I’m playing one of the many classic 4 player side scrolling beat-em-ups, and the wife wants to hop in as player 2.

The workaround: A special save state slot that can be used to quickly save and reload the state of rom, causing the rom to re-initialize input devices. This should work if the inputs were already pre-configured for players 2,3,4 etc (I can test this tonight). Then, being able to bind this functionality to a controller button (or maybe if there was an option for the core to hook into the OS and see if a new device gets plugged in and have perform this functionality automatically. This piece can be optional.

Of course hotplugging support would be even better, but the above might be easier to implement.

I’d love to help in any way I can, let me know what I can do!

Savestates what? Anyways, for hotplugging + autoconfiguration to be implemented I need:

  • A way to detect when a new DirectInput device has been connected and/or disconnected. It cannot be slow (i.e. enumerate every device every poll).
  • A way to grab device names (this should be trivial).

On Linux I use inotify to listen to /dev/input, which works quite well.

This is kinda low-prio for me atm, but if anyone can point me in the right direction (to documentation or articles), it increases the chance this’ll be added.

Savestates was probably the wrong way to describe it. Basically a macro that would save the current state of the game, reinitialize the core you are using, then reload said game state. This should allow the core to see the newly added controller and let everyone continue playing where they left off.

I’ll dig around and see what I can find about the direct input device detection.

Forgive me for posting in such an old thread. This popped up again on my radar as I was playing tonight. I paused the game for a bit, and when I came back, the controller had turned off. When I turned it back on, RetroArch failed to see it, and the only way of fixing it was to restart RetroArch.

I did some digging and found this cmd line tool and library: http://support.microsoft.com/kb/311272

I did a comparison of the lists that ‘devcon find *’ gave me with the controller turned on and with it turned off. There were two extra devices when the controller was turned on:

USB\VID_045E&PID_02A1&IG_00\7&81C6991&0&00 : USB Input Device HID\VID_045E&PID_02A1&IG_00\8&3599F23C&0&0000 : HID-compliant game controller

Maybe when RetroArch configures a controller, it can store the game controller identifier. After starting the emulator, if it detected no controllers present, maybe then it could silently wait and listen for this identifier to pop up again through the use of the library. Or if not automatically, have a menu command in RGUI to rescan / reinitialize controllers

Let me know if you need me to dig more on this, I’d love to help in anyway I can.

DirectInput and XInput drivers would just need hotplugging support. Unfortunately, I have no idea how, and I couldn’t find out how to do it, so it’s a missing feature for those drivers. (Enumerating all devices every poll is not an acceptable solution, too slow).

Maybe just a simple option in the RGUI menu then at least for now?

If you’re playing a game and the controller is turned off or loses battery, you can at least grab a keybpard, save state, restart RetroArch, and load up the save state to get back to where you were. However, if you are using a core that doesn’t support save states, you’re dead in the water. You would have to revert to your last save state / in-game save / restart from the beginning.

You could map your keyboard to game controls in addition to your pad in your config as a backup in case that happens. Keyboard controls are anything without _btn or _axis. For example: input_player1_a = “z” maps the A button to Z on the keyboard.

Something I love about the Mayflash PC adapter for the Wii U Pro controller is how it keeps it as an active controller even when the actual controller is off. So I can turn it on mid game and it will just work. And if I ran out of battery I could plug in the charging cord and it’d start working without having to restart the program; no hotplugging support needed.

Maybe a redetect controllers in RGUI?

If only the 360 adapter did that, we would be in business. The ability to hop in and out of a game really adds to the whole experience that RetroArch offers. If I start a game in MAME2013 now, and someone wants to join in they can’t. We have to quit the rom and reload retroarch, essentially starting from the beginning of the game.

Who doesn’t remember filling that last spot on the TMNT machine in the arcade. Playing with a full group is fantastic!

Maybe a redetect controllers in RGUI?[/quote] I guess that’s not too bad of a solution. Should be doable.

Maybe a redetect controllers in RGUI?[/quote] I guess that’s not too bad of a solution. Should be doable.[/quote]

Brilliant! I did some more searching, found this discussion about how Steam manages it: https://code.google.com/p/x360ce/issues/detail?id=401

Someone mentions they are able to do it via SDL 2.0 via DI8: http://hg.libsdl.org/SDL/file/0cd3e2e9b … yshaptic.c

OV2 just added “hotplugging” support to Windows. Check it out.

Excellent, I’ll build the branch tonight and test it out.

Built RetroArch from OV2’s commit. Works very well!

I did some preliminary testing using mame2013 and FBAlpha using 3 Xbox360 Wireless controllers. FB worked well, mame 2013 had an issue with player 3 but I believe that is a mapping issue to the core itself. I’ll see if I can find some more controllers to test out further, along with other emulators.