Retroarch Control issue

Hi

I’ve started setting up my cabinet with Attract Mode and Debian Linux. Everything seems to be going smoothly so far but I’ve hit a bit of an issue that I don’t understand.

When I first load attract mode up from CLI

xinit attract

Everything works and I’m able to use my sticks and my keyboard as normal. After launching a rom which uses the following commands in the mame.cfg file in emulators foloder:

executable           retroarch
args                 -L "/home/blackcab/libretro-super/libretro-mame/mame_libretro.so" "[romfilename]"
workdir              /home/blackcab/.attract/romlists/mame-latest/arcade/mame
rompath              /home/blackcab/.attract/romlists/mame-latest/arcade/mame
romext               .zip
system               arcade
info_source          listxml
...

Retroarch runs the rom (mame_libretro.so) and I’m able to use my sticks and buttons as normal however upon exiting and returning back to Attract Mode no controller works. The keyboard is non-responsive (although it’s still getting power to the lock lights), cabinet sticks and buttons don’t do anything and there is only one thing I can do which is press the power button.

I should also point out that Attract Mode is still fully functional even though I’m unable to control anything or supply input.

It was only when I went into retroarch front end that I realised that I had the same issue. Upon plugging in a USB controller (playstation style controller) I was able to control everything.

I have not been able to successfully get the sticks and buttons setup that connect to the minipac device I have. I think the minipac is picked up as a usb controller if I’m not mistaken as I’m sure I remember using joy2key type software when windows was installed on this pc.

After trying Attract Mode again, entering a game and exiting back to Attract Mode I can confirm that it diverts the input to the usb joypad (playstation style joypad).

Can anyone help please?

Debian GNU/Linux 9.4 (Stretch)

Attract Mode V2.3.0-44 (Linux SFML 2.4 +FrontConfig +SWF)

avcodec 57.64.101 / avformat 57.56.101

swscale 4.2.100 / swresample 2.3.100

Xserver 1.19.2

Retroarch 1.3.6

ultimarc Minipac (1313?)

Does it still happen if you use RetroArch on its own? That is, without Attract Mode in the equation? It would also be nice to know if updating to v1.7.3 would treat you any better, but I know Debian likes to keep super-old packages around.

When starting retroarch front end i.e. retroarch from the CLI and getting into the blue and white menus does not allow me to control anything other than by using a USB playstation style controller. Keyboard is unresponsive and minimac controls are both unresponsive.

Running retroarch -L "/home/blackcab/libretro-super/libretro-mame/mame_libretro.so" "/home/blackcab/libretro-super/libretro-mame/3countb.zip" for instance from the CLI results in retroarch launching the game and a yellow notice which tells me that some joypad has been recognised/connected (too quick + to long to remember exactly what it said). After which, keyboard and minipac/arcade controls do not work and only playstation joypad works.

I ran the same command again with the joypad disconnected but nothing responded again. Not even Ctrl+C to end. I actually needed to just turn the power off in both cases as it was impossible to exit the game/retroarch.

Try launching retroarch from CLI with --menu (i.e., without loading a core/game) and then go to settings > input and disable autoconfig. Quit retroarch via the menu and then try your regular launch again and see if it prevents the input from changing.

Hi hunterk, thanks for your response.

I followed them steps and tried both launching from CLI and within Attract Mode

CLI Launch: Resulted in no input working including the playstation game pad.

Attract Mode: After restarting the system, I tried AM. This was exactly the same, sticks work, game works with sticks, upon exiting back to AM, playstation game pad is now the thing that holds control and nothing else.

Cheers Dal1980

So it worked okay while RetroArch was running but then stopped working when you quit back to Attract Mode?

Yes, exactly

Attract Mode loads up,

Arcade sticks and buttons work for navigation and game selection

I select a game and the game loads

I can play the game with the same sticks and buttons.

Once I exit out of the game and return back to Attract Mode, sticks and buttons no longer respond, keyboard no longer responds either, which previously would work alongside the sticks and buttons (sticks and buttons working off minipac and keyboard standard usb). The only thing that works after returning is the usb game pad. Having that plugged in or not does not make a difference to the outcome of the loss of control either.

It was only by chance and desperation that I tried a usb game pad in the first place

Hmm, wonder if it’s related to udev permissions or something :confused:

Have you done this? https://docs.libretro.com/guides/input-joypad-drivers/#setting-up-udev-permissions

The other option, I guess, would be to try changing your input/joypad drivers to linuxraw in settings > driver

I followed the instructions to add user to the input group which seemed to be fine (no errors). I then looked at /etc/udev/rules.d/ for the file 99-evdev.rules but this directory was completely empty. I though perhaps using the command sudo udevadm control --reload-rule would have created this file but after checking the directory again, there were still no files.

I restarted and checked Attract Mode again but unfortunately the problem remains.

I then checked retroarch directly from the CLI and was surprised to find that keyboard and sticks now work. The left stick has full directional control and the only button that works brings up search box. I did find that all directions and buttons correspond to a keyboard key so at least there’s that. I had to use the keyboard to exit the search screen and then exit retroarch.

I then tried launching a ROM directly from CLI

retroarch -L "/home/blackcab/libretro-super/libretro-mame/mame_libretro.so" "/home/blackcab/libretro-super/libretro-mame/3countb.zip"

Which resulted in the sticks and buttons working

So the only thing that isn’t working now is when retroarch quits and passes control back to Attract Mode. I’m going to see if changing drivers to linuxraw makes any difference here…

Worse, when I start retroarch front end (blue menu) I still have control with the sticks and keyboard but when launching a ROM with linuxraw settings I can’t use my sticks anymore. Attract Mode remains exactly the same (as in full control but upon exiting I lose control and only input is joypad).

Cheers Dal1980

hmm Changing video driver from gl to xvideo solves the problem with the control (almost). I just realised that I’ve not actually got all buttons mapped properly. Instead of before where I was able to kick or perform a special now doesn’t seem to do anything. There’s also one of the buttons that seems to speed up the emulation too as well as the game rendering only in about of a 3rd of the screen size (doesn’t fill the screen).

However upon exiting the game (which thankfully still works) I was able to continue using my sticks in AM.

The other problem with making this xvideo is that I get the segmentation fault error when trying to load just retroarch from the CLI. I need to prefix it with xinit retroarch but then for some reason it no longer wants to load and I need to put it back to gl in retroarch.cfg

I feel like instead of perhaps trying to line up retroarch to AM I should be lining up AM to retroarch. I don’t feel like XServer is treating me well and if I can get AM to load without it, it might solve all problems.

My knowledge is limited here so not sure what replaces XServer/Xinit for Attract Mode. I noticed xstart was used in early versions of Attract Mode on the RASPi but that has since been removed. There doesn’t seem to be a lot of info going around for standard X86 hardware when it comes to Attract Mode since the community are obviously concentrating on Pi land.

Does this give you any ideas of what my next move might be?

man, that’s a weird problem, for sure. The speedup thing means you’re hitting spacebar, which disables all sync to run as fast as possible. This suggests that maybe your keyboard/sticks are calling some keyboard events that conflict with some of RetroArch’s default hotkeys.

If you have a list of the keymaps, you can go through your retroarch.cfg and make sure the conflicting hotkeys are set to “nul” or you can map the hotkey enabler hotkey to something and then RetroArch will stop listening for hotkey events unless/until you hold down that key/button.

This may be relevant, although written for slightly earlier versions of RetroArch: (Pre-RetroArch 1.7.2) X-Arcade Tankstick & Dual Joystick Config

That guide is assuming that the MAME core simultaneously is reading the keyboard and reading the keyboard as a retropad input device, giving dual inputs that are mapped to different things by the time it reaches the core. I wonder if going through your launcher is causing this kind of dual input scenario in a way that is avoided when you test the alternative.

The only MAME core IMO that doesn’t due this simultaneous input mode is mame2003-plus but I’m not as sure about the recent cores as the earlier ones.

1 Like

Thanks guys

I’ve come across SFML which replaced XServer for Attract Mode a while back on the Pi. Clearly this worked better (I think SFML works faster from what I read). Since switching Retroarch to XDriver solves only some of the problems (half the controls now work) I’m still left with other problems such as resolution issues (not filling the screen) plus for some reason sluggish video/rendering in game.

After reading a little more on SFML and AM (pi) build I’m probing AM forum (which seems dead) for advice on getting AM to use SFML.

Does Retroarch use SFML drivers or is that the OpenGL (“gl”) selection?

Thanks for your help @hunterk and for that article link @markwkidd which did seem relevant. I just have a very bad feeling about using XServer now.

Think it’s probably worth linking the other forum topics but I’ll conclude this thread hopefully with a resolution. http://forum.attractmode.org/index.php?topic=2272.0

New thread for SFML avenue: http://forum.attractmode.org/index.php?topic=2273.0

It’s a shame I can’t continue on Retroarch forum for help with Attract Mode help.

Thanks so very much for the help.

1 Like

Hey guys

I still have this problem and I’ve been around the houses trying to debug.

I don’t know if this is an issue with X, Attract Mode, RetroArch or Debian but each of them work flawlessly when I test them individually. The problem only occurs when I combine them :confused:

I though I’d make a YouTube video to show the problem. Maybe you can see an issue with what I’m doing or it may just help with understanding the issue. It’s one of those problems that take 3 pages to explain and it’s way easier just showing it.

Thanks Dal1980

hi this may not be useful, as ive never tried Attract Mode, but have you considered using different hardware for your inputs? i use teensy boards, i think i got mine for like $20 if i remember correctly, i have a few of them. i had to compile a small program on it, but that was easy enough. and the teensy will show up as a HID device (instead of a keyboard device), like a normal gamepad. and you would have to solder your connections. i think mine are teensy 3.2. ive used these boards with a few of my control setups, and they work great, on retroarch,Lakka, regular mame, and other Emu’s, and im on linux. archlinux. in fact ive even hooked up my controllers to my tablet and they work. (not out of the box i had to do a little magic mapping in android)

also im looking into getting some boards called zerodelay, you can find them on amazon. and they should be just like gamepads (HID) devices on your system. just wanted to throw this at ya.

not sure if i can link in here but just search google for teensy 3.2 development boards. and the zerodelay boards on amazon just search word “zerodelay” on amazon they are around 10-20 US Dollars.

Hi all, please excuse my newbieness – I could not figure out how to start a new topic, so I searched for a topic with as close a subject line as possible and it’s letting me “Reply” to it.

I installed Retroarch v1.7.7 on Ubuntu 18.04 LTS and successfully connected a Sony PS3, Xbox One and Atari 2600 Joysticks (via 2600-daptor and Mayflash MD) – all of which can simultaneously navigate the menu (I have “All users can control the menu” set). So, I know the joysticks are providing input but, for the suspected reason explained below, they will not operate in the game – only keyboard control. I just want to play one of these games, can someone please help me out?

Below is a screen grab showing my User 1 Device Index set to the Atari controller, and also the set of messages I see every time Retroarch or a game starts. Notice that first message!

"SEJIN Electron INc. SEJIN USB IR Receiver configured in port #0"

This is a Bluetooth controller I sometimes use, but I cannot get Retroarch to ignore it, even when I pull it out of its USB port. My suspicion is that Retroarch is ignoring my User 1 setting and always binding “Player 1” to “port #0”.

Where does Retroarch get this list from, and can I edit it? Or do you suppose this is even the problem?

Any advice would be greatly appreciated.

Player 1 should be in port 0 (the port counting starts at zero).

Hi hunterk,

As you can see in the picture, I have “User 1 Device Index” set to the Mayflash MD. Are you saying Retroarch ignores this setting and always uses whatever lands in port #0? Unfortunately for me, that’s the SEJIN, which is not even a game controller, just a USB bluetooth dongle. The irony is the only reason I ever plugged it in was to try using PS3 / Xbox wireless controllers. Now Retroarch has remembered it and thinks its there even when it isn’t.

UPDATE: Setting “User 1 Device Index” to a hard-wired PS3 controller, it seems to be working in the games (even though the SEJIN still occupies port #0). So its just the Atari joysticks that work only in the menus… Weird! I did try reconfiguring them, setting the fire button to “Button B”, 4 joystick directions to the 4 D-Pad buttons, and letting the rest timeout. Still nothing in the games, though…

1 Like