Xbox One Controller freezes MAME

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
MarioNintendo
Posts: 57
Joined: Wed May 15, 2013 9:35 pm

Xbox One Controller freezes MAME

Post by MarioNintendo »

I was wondering if anyone else experienced this bug. I am using an Xbox One controller for the first time. It works fine with Steam games, right out of the box. However, for some reason beyond my understanding, if I open a game in MAME while the controller is plugged via USB, MAME freezes to a black screen (in fact, pretty much my whole PC freezes). Weirder even, as soon as I unplug the controller, everything loads fine without a hitch. Plugging it back brings the freeze once more. I know that MAME recognizes the controller, since I can successfully navigate in the game list using my controller's joystick and can even start a game by pressing A.

I tried looking at cfg and ctrlr files in MAME, and I must admit I am unable to say if my setup is OK or not. The fact that I am able to use the joystick in the game list is what is puzzling me the most. I am using MAMEUI64 v. 0.170 (Jan 27 2016). If you ever experienced this problem before (maybe with an Xbox 360 controller? I don't own one for testing), please let me know. Especially if you have a clue about what is going on!

Thanks for your time.

Edit: Curiously, the same deal happens with Kega Fusion. Now I'm really wondering what's going on.
DejahThoris
Posts: 734
Joined: Sat Oct 19, 2013 10:26 pm
Location: Riverside, CA

Re: Xbox One Controller freezes MAME

Post by DejahThoris »

No experience running MAME with an Xbox One controller, but I've used it with Kega Fusion, both the standard controller and the Elite without any issues. Windows 10 here for whatever that's worth.

I know that "no problems here" doesn't help a lot, but it rules out complete incompatibility between the controller and the emulator at least.
User avatar
MarioNintendo
Posts: 57
Joined: Wed May 15, 2013 9:35 pm

Re: Xbox One Controller freezes MAME

Post by MarioNintendo »

Thanks for the reply DejahThoris. I'll test it out once more tonight. Just to confirm: your standard controller is plugged via usb, correct? And you did not have to mess with any driver or cfg file?
Firehawke
Posts: 198
Joined: Thu Apr 21, 2005 6:37 pm
Location: Western USA

Re: Xbox One Controller freezes MAME

Post by Firehawke »

It's believed to be a Windows 10 bug at this point, as all of the affected users seen so far are on Win10. It's also been reported as fixed in the fast rung testing, so it'll probably be fixed for mainline 10 users soonish.
DejahThoris
Posts: 734
Joined: Sat Oct 19, 2013 10:26 pm
Location: Riverside, CA

Re: Xbox One Controller freezes MAME

Post by DejahThoris »

MarioNintendo wrote:Thanks for the reply DejahThoris. I'll test it out once more tonight. Just to confirm: your standard controller is plugged via usb, correct? And you did not have to mess with any driver or cfg file?
Everything is plugged in USB, and I didn't touch anything at all, just plug and play.
IseeThings
Posts: 534
Joined: Thu Dec 16, 2010 6:38 pm
Location: California

Re: Xbox One Controller freezes MAME

Post by IseeThings »

Yeah, looks very much like something got screwed up with DirectInput and the XB1 drivers in a recent Microsoft update.

XINPUT mode still works if you use "-joystickprovider xinput" when launching MAME (as of 0.172) but that does limit you to xinput compatible controllers, which of course the XB1 controller is as the Xinput stuff is more modern.
User avatar
Emuser
Posts: 746
Joined: Wed Sep 24, 2008 5:48 pm

Re: Xbox One Controller freezes MAME

Post by Emuser »

Wanted to mention it as I have had the same issue so far.

After you start up a game in MAME, it freezes, but if you unplug the controller then replug back in once the game's boot screen shows up, you should be able to use it until you switch games. It's incredibly annoying but if you must use the XBONE controller, it's the only way I've gotten it to work so far.
User avatar
MarioNintendo
Posts: 57
Joined: Wed May 15, 2013 9:35 pm

Re: Xbox One Controller freezes MAME

Post by MarioNintendo »

Emuser wrote:Wanted to mention it as I have had the same issue so far.

After you start up a game in MAME, it freezes, but if you unplug the controller then replug back in once the game's boot screen shows up, you should be able to use it until you switch games. It's incredibly annoying but if you must use the XBONE controller, it's the only way I've gotten it to work so far.
Wanted to bump this topic to confirm that this method seems to work for me. I have been able to successfully configure my xbox one controller to use with MAME, and luckily my configuration is not reset every time I boot a game. However, I have to unplug/replug every time I load a game, otherwise it loads indefinitely. I cannot wait for this bug to be fixed... pain!

One small comment I might add for anyone willing to test, I wanted to set the xbox button to do the same action as the tab button in mame. However, it seems like mame does not notice when I press this button (even though it detects bumper trigger presses just fine, which surprises me).
IseeThings wrote:Yeah, looks very much like something got screwed up with DirectInput and the XB1 drivers in a recent Microsoft update.

XINPUT mode still works if you use "-joystickprovider xinput" when launching MAME (as of 0.172) but that does limit you to xinput compatible controllers, which of course the XB1 controller is as the Xinput stuff is more modern.
Being a total mame noob, this post took me by surprise. I have never used the command line version of mame. Is this something that can be set in MAMEUI? Thanks for the advice, though.
User avatar
Iaspis
Posts: 150
Joined: Wed Oct 04, 2006 8:48 pm
Location: Greece

Re: Xbox One Controller freezes MAME

Post by Iaspis »

MarioNintendo wrote:I have never used the command line version of mame.
Look for mame.ini (if there isn't one, create it using -createconfig command) and open it with Notepad. Scroll down until you find OSD INPUT OPTIONS. Modify "joystickprovider" value from "auto" or "dinput" (if that's the case) to "xinput". Exit / save and run MAME.
Firehawke
Posts: 198
Joined: Thu Apr 21, 2005 6:37 pm
Location: Western USA

Re: Xbox One Controller freezes MAME

Post by Firehawke »

I really don't recommend the use of MAMEUI. It's prone to additional bugs not in mainline MAME based on how the UI attachments have to mangle the MAME source. If you really need a front-end user interface, get QMC2 or another front-end. It'll be a hell of a lot less buggy in the long run.
User avatar
MarioNintendo
Posts: 57
Joined: Wed May 15, 2013 9:35 pm

Re: Xbox One Controller freezes MAME

Post by MarioNintendo »

Thank you both for the very informative replies! I will give both a shot whenever I can. :)
User avatar
MarioNintendo
Posts: 57
Joined: Wed May 15, 2013 9:35 pm

Re: Xbox One Controller freezes MAME

Post by MarioNintendo »

Well, just wanted to give an update; It seems that windows 10 updated itself automatically, and that now this issue disappeared by itself. I am now fully able to use the xbox one controller with mame without having to resort to any hack or modification. Sweet!

One last issue: it seems like it is impossible (for me) to map the xbox button of the controller. I wanted to use it to access the Mame menu. If anyone has an idea what to do with that, please let me know. Thanks!

Edit: Fixed the issue. If you have that issue as well, simply press Win+G to open the windows game bar, and uncheck this box in the settings:
Image
Now the xbox button is fully usable in the emulator!
User avatar
Master O
Posts: 272
Joined: Sun Sep 09, 2007 4:19 am

Re: Xbox One Controller freezes MAME

Post by Master O »

Iaspis wrote:
MarioNintendo wrote:I have never used the command line version of mame.
Look for mame.ini (if there isn't one, create it using -createconfig command) and open it with Notepad. Scroll down until you find OSD INPUT OPTIONS. Modify "joystickprovider" value from "auto" or "dinput" (if that's the case) to "xinput". Exit / save and run MAME.
The -createconfig switch can also be typed as:

Code: Select all

mame -cc

or

mame64 -cc
Post Reply